Software environment

Environment Modules are predefined environmental settings which can be applied and removed dynamically. They are usually used to manage different versions of applications, by modifying shell variables such as PATH and MANPATH .

Modules are controlled through the module command.

If a module requires other modules to operate ("dependencies") these will be loaded automatically. In some instances a module may require other modules that conflict with ones that you already have loaded (e.g. you have thing 1.0 loaded and a module needs thing 2.0) in which case you have to unload the conflicting module first. Sometimes it is possible that a combination of modules will not work together. In those cases please contact the HPC team to ask for assistance.

Listing the Available Modules

To list the modules available, run module avail. The list is very long and may take some time to produce.

To restrict the listing you can add another word, for example: module avail make. That only lists modules which include "make" in the name.

 

$ module avail make

------------------------------ /apps/modules/all -------------------------------
   Automake/1.15-GCCcore-6.4.0             CMake/3.9.1-foss-2018a
   Automake/1.15.1-GCCcore-6.4.0           CMake/3.9.1-GCCcore-6.4.0
   Automake/1.15.1-intel-2018.4.274        CMake/3.9.1-intel-2018.4.274
   Automake/1.15.1-intel-2019.2.187        CMake/3.9.1-intel-2019.2.187
   Automake/1.16.1-GCCcore-6.4.0           CMake/3.9.5-GCCcore-6.4.0
   Automake/1.16.1-GCCcore-8.2.0           CMake/3.10.0-intel-2018.4.274
   Automake/1.16.1-intel-2018.4.274        CMake/3.10.0-intel-2019.2.187
   Automake/1.16.1-intel-2019.2.187 (D)    CMake/3.10.1-foss-2018a
   CMake/3.7.2-GCCcore-6.4.0               CMake/3.10.1-GCCcore-6.4.0
   CMake/3.7.2-intel-2018.4.274            CMake/3.10.1-GCCcore-8.2.0
   CMake/3.7.2-intel-2019.2.187            CMake/3.10.2-GCCcore-6.4.0
   CMake/3.8.0-GCCcore-6.4.0               CMake/3.10.2-GCCcore-8.2.0
   CMake/3.8.0-intel-2018.4.274            CMake/3.11.4-GCCcore-6.4.0
   CMake/3.8.0-intel-2019.2.187            CMake/3.11.4-GCCcore-8.2.0
   CMake/3.8.1-GCCcore-6.4.0               CMake/3.12.1-GCCcore-6.4.0
   CMake/3.8.1-intel-2018.4.274            CMake/3.13.3-GCCcore-8.2.0    (D)
   CMake/3.8.1-intel-2019.2.187

  Where:
   D:  Default Module


Loading and Unloading Modules

To load a module, use module load.

For example, to load the zlib/1.2.11 module:

module load zlib/1.2.11

You may find that a module loads other modules that it depends on. Note that as they load modules often print some information about what they have done (which got loaded, changes to environment variables).

It is possible that a currently loaded module will conflicts with one you attempt to load. For example, if you have one version of OpenFOAM loaded you cannot load another until you unload the first.

 

To unload a module, use module unload.

For example:

module unload zlib/1.2.11

This will unload the module itself and any other module which it had caused to load.

Currently Loaded Modules

To see which module are currently loaded, use module list.

For example:

$ module list

Currently Loaded Modules:
  1) zlib/1.2.11