Application modules

From MetaCentrum
Jump to navigation Jump to search
Metacentrum wiki is deprecated after March 2023
Dear users, due to integration of Metacentrum into (e-INFRA CZ service), the documentation for users will change format and site.
The current wiki pages won't be updated after end of March 2023. They will, however, be kept for a few months for backwards reference.
The new documentation resides at

Modulefiles update
Dear users, the modules system was just updated thorough the Metacentrum infrastructure. This documentation is valid for the current version.
To check out the documentation for old version, see page Application_modules_old.

Backward compatibility
The new modules are backwards compatible, i.e. all your old scripts should within the new version. If you, however, observe strange behaviour of your old scripts, let us know at


Search for module

List core names of available modules

$ module ava                  # list all available modules (but not their versions)
                                # the list is very long; move down the list by pressing Space or Enter key
$ module ava intel            # list all available modules starting with "intel":
---------------------------------------- /packages/run/modules-5/debian11avx512 ----------------------------------------
intel-oneapi-compilers/  intel-oneapi-tbb/       intel-tbb/  intelmpi/  
intel-oneapi-mkl/        intel-parallel-studio/  intelcdk/

List available versions of a specific module

$ module avail intelcdk/        # list the modules within the intelcdk/ directory (the "/" is important!)

will get list of versions:

intelcdk/12  intelcdk/14  intelcdk/16  intelcdk/17.1        intelcdk/19u3  
intelcdk/13  intelcdk/15  intelcdk/17  intelcdk/17.1-cvmfs

Search is case-insensitive!

(BULLSEYE)melounova@skirit:~$ module avail Intel
---------------------------------------- /packages/run/modules-5/debian11avx512 ----------------------------------------
intel-oneapi-compilers/  intel-oneapi-tbb/       intel-tbb/  intelmpi/  
intel-oneapi-mkl/        intel-parallel-studio/  intelcdk/

Some listing options

$ module avail intelcdk --indepth # list all the modules within the intelcdk directory
$ module avail intelcdk -a        # similar to above, plus list aliases to modules

Load module

Load a default version of a module

$ module load intelcdk           # or
$ module load intelcdk --default # load default version of intelcdk (usually the newest); there is always one
                                 # use this option if you have no specific reason to do otherwise
                                 # or if you are insecure which version to choose, start by default one
$ module add intelcdk            # equivalent to the above

Load a specific version of a module

$ module load intelcdk-17.1

List currently loaded modules

$ module list
Currently Loaded Modulefiles:
 1) intelcdk/17.1

Unload module(s)

Unload a module:

$ module unload matlab-9.9      # unload matlab-9.9, for example
$ module del matlab-9.9         # equivalent to the above

Clear all currently loaded modules:

$ module purge              # get rid of everything!

Get details of a module

Display information about the module:

$ module display intelcdk-17.1     # get loads of info about the module and environment

Some important variables are

  • PATH - path to the executable
  • LD_LIBRARY_PATH - path to libraries for linker
  • LIBRARY_PATH - path to libraries

Specific usecases

Limit the module validity to a bash subshell

Within a single session you can use modules separately by enclosing them to parentheses. Parentheses, in general, create a subshell in bash, i.e. all modules loaded within a certain subshell will be unloaded automatically after the subshell exits.

Example: normally the following two modules will conflict if loaded within the same session:

(BUSTER)melounova@skirit:~$ module add python/3.8.0-gcc
This is the user wrapper module using spack module python/3.8.0-gcc-rab6t.
(BUSTER)melounova@skirit:~$ module add python/3.8.0-gcc-rab6t
python/3.8.0-gcc-rab6t(49):ERROR:150: Module 'python/3.8.0-gcc-rab6t' conflicts with the currently loaded module(s) 'python/3.8.0-gcc'
python/3.8.0-gcc-rab6t(49):ERROR:102: Tcl command execution failed: conflict python

However you can load them separately in subshells:

(BUSTER)melounova@skirit:~$ (module add python/3.8.0-gcc; python)
This is the user wrapper module using spack module python/3.8.0-gcc-rab6t.
>>> quit()
(BUSTER)melounova@skirit:~$ (module add python/3.8.0-gcc-rab6t; python) 
>>> quit()


A modulefile is a text file that collects paths to the binary, paths to external libraries and possible dependencies on other modules.

The modulefiles reside in some of the directories included in variable MODULEPATH (echo $MODULEPATH).

For many applications, there are several modules available. This means there are several copies of the software available, differing in version, compiler and other features. For example,

$ module avail tensorflow/
tensorflow/1.3.0-cpu          tensorflow/1.3.0-gpu-python3  tensorflow/1.5.0-gpu          tensorflow/1.13.1-gpu-python3  
tensorflow/1.3.0-cpu-python3  tensorflow/1.4.1-gpu          tensorflow/1.7.1-cpu-python3  tensorflow/2.0.0-gpu-python3   
tensorflow/1.3.0-gpu          tensorflow/1.5.0-cpu-python3  tensorflow/1.7.1-gpu-python3  

says there are 11 versions of TensorFlow software differing by version, Python version (2 or 3) and whether it can be used for GPU computing (gpu) or not (cpu).