meta data for this page
  •  
Translations of this page:

Modules

The module system allows the selection of different versions of software packages. The modules contain mainly non-commercial software, compilers, mpi libraries, openfoam, cmake, etc. Commercial programs, e.g. Ansys, Comsol, Abaqus, Matlab, .. are available without loading the module. System packages available after login without loading modules may be quite outdated.

Basic commands:

module avail

(abbreviated as “ml av”) displays the available modules. The listing is in the form module_name/version-compiler_version. The listing is divided into several sections, the section labeled “zen2” lists modules optimized for the latest architecture (only) on kraken-m7,…, kraken-m9 machines. For kraken-l1,…-l4 and kraken-m1,…,-m6 machines it is recommended to use the modules from the “broadwell” section, they also work on m7-m9 machines.

module load <module_name>

(abbreviated “ml <module_name>”) activates the module. Several modules can be loaded at the same time, ml <module_name1> <module_name2> … . There is no need to specify a name including the version, in this case the default version is loaded, marked as (D) in the “ml av” listing.

module list

lists the loaded modules

module unload <module_name>

deactivates the module

module purge

deactivates all loaded modules

man module

hint module command

The module control commands can also be part of the startup scripts for the Slurm queue system.

More about modules:http://modules.sourceforge.net/


EXAMPLE:

After logging in to the cluster, the gcc compiler is available from the system, but it is in an older version 4.8.5:

gcc --version

The path to gcc points to /usr/bin/gcc in systems:

which gcc

from the listing

module avail

but we can see that there are several newer versions of gcc available in modules

of which version 10.3.0 is marked (D).

ml gcc

(equiv. “module load gcc”) to load the default version. From the listing

gcc --version

we now see version 10.3.0 and the system path is also overwritten

which gcc

The default state is reached with the command

module purge

We check that if the gcc compiler were called, the system version would be available again with the commands

gcc --version

and further with

which gcc