Enviroment Modules

A lot of commonly used software has been built on the cluster and can be used by everyone through a system called environment modules, or just modules for short.

Environment Modules is a system for dynamically loading software packages into your environment using a command line tool called module. Software packages are installed in a central, read-only location by the HPC support team and then a modulefile is built for the software which modifies your environment when you load this module, so that the software becomes visible to you.

This system makes it easy for everyone to find and load pre-built software into their environment to use with their programs, and allows multiple versions of the same software to coexist on the system together.

List Available Software

module avail List all the software available in the shared area on the cluster,

$ module avail
--------------------------- /cm/local/modulefiles ------------------

cluster-tools/6.1 dot               ipmitool/1.8.12   module-info       openldap          use.own
cmd               freeipmi/1.2.6    module-git        null              shared            version

-------------------------- /cm/shared/modulefiles ------------------------


The output of module avail can be quite long, so you might want to pipe it into a pager like less, or grep the list if you know the name of something you want to search for.


The module command actually does some manipulation using stdout and therefore actually prints the output of it’s commands onto stderr – this makes using tools like less and grep not work so well. To get around this you can do the following,

$ module avail 2>&1 | less
$ module avail 2>&1 | grep mpi

To see a description of what a module is use,

$ module whatis fenics
fenics               : Adds dolfin 1.4.0 to your environment

The FEniCS Project is a collaborative project for the development of
innovative concepts and tools for automated scientific computing, with a
particular focus on automated solution of differential equations by finite
element methods.

... *SNIP*


To see what a module actually is doing you can use module show <module name>. Modules are typically not doing much more than prepending/appending things to key environment variables like $PATH, $LD_LIBRARY_PATH and so on.

$ module show fenics
module show fenics

module-whatis  Adds dolfin 1.4.0 to your environment

The FEniCS Project is a collaborative project for the development of

.. *SNIP*

module     load python
module     load boost
module     load swig
module     load cmake
prepend-path   PATH /cm/shared/apps/dolfin/1.4.0/bin
prepend-path   LD_LIBRARY_PATH /cm/shared/apps/dolfin/1.4.0/lib
prepend-path   INCLUDE_PATH /cm/shared/apps/dolfin/1.4.0/include
prepend-path   PKG_CONFIG_PATH /cm/shared/apps/dolfin/1.4.0/lib/pkgconfig
prepend-path   PYTHONPATH /cm/shared/apps/dolfin/1.4.0/lib/python2.7/site-packages
prepend-path   MANPATH /cm/shared/apps/dolfin/1.4.0/share/man

Load/Unload Modules

You can see what modules you have loaded with,

$ module list
1) sge/current

Modules can have multiple versions of the software, and you can see the various versions either with module avail or by doing,

$ module apropos cuda
cuda/5.5             : adds cuda to your environment
cuda/6.5             : adds cuda to your environment

You can load a module by doing

# Load the latest version of the module
module load module_name

# Load a specific version of a module
module load module_name/version

To unload a module:

module unload module_name

See man module for more detail on these and the other commands of the modules system.

Installing Software

If the software package you need isn’t available under the modules system then try to build it yourself first in your home directory. You can then contact the support team for assistance with doing this, or to request that the software is included in the modules system in the future – however if you have attempted to build it yourself then it may be included a lot faster as you can provide the support team with information you have learn’t when building the package.

So please have a try first!