Skip to main content

Managing software models

MODULES

There are many software packages installed on the clusters in addition to those installed in the standard system directories. In order to manage these additional packages, the clusters use module files. These module files allow you to easily specify which versions of which packages you want use.

For more informations, visit https://lmod.readthedocs.io/en/latest/010_user.html and use the command “module man”.

Using Modules for Setting Application Environments:

Modules are used to set environment variables for the purpose of managing access to applications and libraries on CARC supercomputers and clusters. The command “module avail” lists only the modules which can directly loaded on the machine to which you are logged in. While the command “module spider” reports all the modules that are possible. To load a module, use the “module load” command. For example, to load the modules for the Intel compiler, use the command “module load intel/”. After issuing this command, the “module list” command will display.

Currently Loaded Modules:
1) intel/18.0.2.199

To use OpenMPI with the Intel compilers, use the command “module load openmpi” and press “tab”. This will list all the available openmpi modules including “gcc” and “intel”. Continuing the previous example, after using the “module load openmpi-1.10.1-intel-17.0.4-mjerrs7” command, the output of module list should look like the following:

Currently Loaded Modules:
1) intel/18.0.2.199   2) libpciaccess-0.13.5-intel-17.0.4-lvqy4il   3) libxml2-2.9.4-intel-17.0.4-mvzopxp 4) hwloc-1.11.7-intel-17.0.4-k3ovqkn   5) openmpi-1.10.1-intel-17.0.4-mjerrs7

To unload modules, use the “module unload” command. For example: “module unload intel/18.0.2.199”. To remove all loaded modules, use the command “module purge”.

To use modules in a PBS script based on csh/tcsh, include the following line after your #PBS specifications:
source /etc/profile.d/module.csh
Then load the relevant modules that you require, e.g.
module load openmpi-1.10.1-intel-17.0.4-mjerrs7

to run a code compiled with the intel compiler and the Open MPI message-passing library.