The Modules Command
From Hpc
Software installations on the clusters span many applications, and many different version numbers of the same application. It is not possible (nor desirable) to use them all at the same time, since different versions of the same application may conflict with each other. In order to simplify the control of which application versions are available in a specific session, there is a system for loading and unloading 'modules' which activate and deactivate the relevant parts of your user session.
Contents |
Which modules are loaded?
To see the modules currently active in your session, use the command
module list
If nothing else has been explicitly activated, the result will be the default setting of two modules: mpi and intelcomp. (These activate the default MPI library and the Intel compiler suite.)
Which modules are available?
In order to see a complete list of available modules, issue the command
module avail
The resulting list will contain module names conforming to the following pattern:
- Capitalized names represent specific application versions, and look like Name.version
- Non-capitalized names are without version numbering, and represent the most recent and tested version of the module
The purpose of this is to make upgrades transparent to the user; the lowercase module name will load the most recent working module even if the software has been upgraded since last time the command was used. This relieves the user of constantly tracking version numbers and updating scripts to match them.
How are modules loaded?
In order to enable, for instance, the GLView software, issue the command
module load glview
The commands which belong to GLView (e.g. 'xglview') can then be used in your session.
How are modules unloaded?
Keeping with the above example, use the following command to unload the GLView module again:
module unload glview
Which version of a module is the default?
In order to see, for instance, which version of the Intel compilers is loaded by the 'intelcomp' module, use
ls -l /opt/modulefiles/intelcomp
This will show the Name.version module name the symbolic name is currently pointing at.
How do I switch to a different version of a module?
Say you want to switch from the default intel compilers to, e.g. version 8.0, use
module switch intelcomp Intelcomp.8.0
