Using Software: Modules

On complex computer systems like the HPC systems at Leeds, it can be quite difficult to set up the user’s environment to always find the required software and libraries. This is particularly true where there are several versions of compilers or software installed.

Modules provide a straightforward way to activate and deactivate modifications to the user environment which allow particular packages and versions to be used.

The modules command is installed on the system in order to facilitate this.

Full details of the software available to load via the module command can be access through the SOFTWARE menu. When a module is loaded or unloaded the user environment is altered in order that the desired software can be used.

common module options result
module shows the options available for use with the module command
module list to display which modules are currently loaded
module whatis to display the list of all available modules together with a short description
module avail to list all available modules (without a description)
module load loads a particular module
module unload unloads a particular module
module switch switches between the currently loaded module and the desired module e.g. module switch intel pgi will switch to using the PGI compiler from the currently loaded environment which uses the Intel compiler
module show shows what environment variables will be set if a particular module were to be loaded
module purge removes all currently loaded modules (use with care)

The Default Module Environment

The default environment (which is made available when each user logs in) makes available the most generic set of compilers and HPC-related libraries on the system. These are:

Intel compiler
Open MPI message passing library


Normally, the highest revision of a particular module will be loaded. e.g.:

$ module add fftw

will load the module for FFTW version 3.x (e.g. currently 3.2.2) into your environment. Should you wish FFTW version 2.1.5 to be loaded into your environment, the specific version can be forced by extending the name of the module with the version number, i.e.:

$ module add fftw/2.1.5