module is a tool which helps in loading and unloading pre-configurated settings for the shell

Some programs need certain environment variables and libraries to run correctly. For example the PATH-variable which allows command lookups in additional directories. For this purpose, there are socalled modules with configure your shell with the necessary settings. Such modules can be load dynamically and unloaded if unnecessary.

To get an idea which modules are available, run 'module avail' in the shell.

$ module avail

------------------- /usr/share/Modules/modulefiles -------------------
dot         module-info null
module-git  modules     use.own

------------------------ /cluster/modulefiles ------------------------
afni-toolbox           gnuplot/4.6.7          openfoam/3.0.1b
ansys/17.0/fluent      joe/3.7                openmpi/gcc/64/1.10.1
cmake/         liggghts/3.3.1         openmpi/gcc/64/1.8.4

Out of these shown modules you can add settings to your shell by using the load switch.

$ module load openmpi/gcc/64/1.10.1

To show which modules currently are loaded in the active shell, use the list switch.

[user@login ~]$ module list
Currently Loaded Modulefiles:
  1) openmpi/gcc/64/1.10.1   3) starCCM/10.06
  2) python/2.7.12

To unload a module, the consequent switch unload can be used:

$ module unload python/2.7.12
$ module list
Currently Loaded Modulefiles:
  1) openmpi/gcc/64/1.10.1   2) starCCM/10.06

module command can also be added to job scripts, as you may have seen in some templates already.

In some special cases, modules have to be loaded in a certain order. Moreover, avoid loading multiple modules from the same family. This could corrupt the settings for the loaded modules. Then you would need to start over.

For more information, read the manual,

$ man module

And check the module which is used to create a module:

$ module load modules
guide/module.txt · Zuletzt geändert: 2017/09/27 21:07 von Sebastian Engel
Nach oben
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0