Modules

Both ALICE and SPECTRE use a Linux software feature called modules which dynamically alters the shell environment as necessary to make applications available. Most applications installed on the High Performance Computing (HPC) systems are managed this way.

Use the module command to manage modules.

You can find information on common module operations below. For full details, see the module man page.

List available modules

Use the module avail command to list all modules available on the system. A truncated example of the output is shown below.

> module avail

------------------- /cm/local/modulefiles ---------------------

cluster-tools/6.1              openldap
cmd                            openmpi/gcc/64/1.4.3-mlnx-ofed
dot                            shared
freeipmi/1.2.6                 torque/4.2.7
ipmitool/1.8.12                torque/4.2.8
module-git                     torque/4.2.9(default)
module-info                    use.own
mvapich/gcc/64/1.2.0-mlnx-ofed version
null

------------------- /cm/shared/modulefiles --------------------
abinit/7.2.2par                   lapack/gcc/3.4.2
abinit/7.6.2                      lapack/intel/3.4.2
abyss/1.3.7                       last/460
abyss/1.5.2                       llvm/3.4
affymetrix/1.16.1                 log4cxx/0.10.0
aladin/8.040                      lua/5.2
allpathslg/48894                  magics/2.18.15
amber/12                          makedepf90/2.8.8
amber/14                          mam/7.2.3
amos/3.1.0                        maple/17
apt/22.4.1                        matlab/2013a

 

Interrogate a module

Use the module disp command to list the actions that a module will perform on being loaded. Some modules do nothing except set some environment variables, so this is useful for finding out exactly what a module does:

> module disp python/2.7.9

--------------------------------------------------------------
/cm/shared/modulefiles/python/2.7.9:

module-whatis    Loads the Python 2.7.9 software environment
prepend-path     LIBRARY_PATH /cm/shared/apps/python/2.7.9/lib
prepend-path     LD_RUN_PATH /cm/shared/apps/python/2.7.9/lib
prepend-path     CPATH /cm/shared/apps/python/2.7.9/include
prepend-path     PKG_CONFIG_PATH /cm/shared/apps/python/2.7.9/lib/pkgconfig
prepend-path     PATH /cm/shared/apps/python/2.7.9/bin
prepend-path     MANPATH /cm/shared/apps/python/2.7.9/share/man --------------------------------------------------------------

Load a module

Use the module load command to make the specified application available. For example to make Python version 2.7.9 available:

> module load python/2.7.9

This would make the python command for this particular version and its associated libraries available.

Modules will take care of their own dependencies, and in general, loading one version of an application's module will unload another one already present in order to avoid conflicts.

List currently loaded modules

Use the module list command to see which modules are currently loaded:

> module list
Currently Loaded Modulefiles:
1) shared 4) gcc/4.8.1
  2) torque/4.2.9(default) 5) python/2.7.9
3) moab/7.2.7(default)

The modules shared, torque, moab and gcc are automatically when you log in and should always be available.

Unload a module

Use the module unload command to remove the specified module from the current environment. For example, to make Python version 2.7.9 unavailable:

> module unload python/2.7.9

Purge Modules

Use the module purge command to unload all modules, except for the torque and moab modules.  These cannot be removed as they are required for job submission

> module purge
> module list
Currently Loaded Modulefiles:
 1) shared                  3) moab/7.2.7(default)
2) torque/4.2.9(default)   4) gcc/4.8.1

Share this page: