The Lmod environment module system can be used to access some software on the CoE HPC cluster and on CoE linux hosts in general. This may include software that is not in your default executable path, or complex software that have multiple dependencies. Modules also provides a means to access different versions of software, say older versions of software than the default that you may require (e.g. Matlab 2019b or Cuda 10.2), or newer versions of software not provided by the operating system (e.g. Cmake 3.x or GCC 5.x or higher). Here are some examples on how to use Lmod:


View available modules

To see which software is currently available as a module, type:

module avail
module av

Too view currently available cuda modules:

module av cuda

To search for available gcc modules:

module spider gcc


Load modules

To load a module so you can use the software, type:

module load {software}/{version}

For example, to load cuda version 10.2:

module load cuda/10.2

Or to load the default version of cuda:

module load cuda

To load multiple modules, e.g. the default version of cmake, gcc 9.3 and cuda 11.1:

module load cmake gcc/9.3 cuda/11.1

To list currently loaded modules:

module list

Note that if you use one or more software modules to build another software, then you may need to make sure those same modules are loaded whenever you run that other software.  For example, if you used cuda/11.3 and gcc/9.3 to build pytorch in your python environment, make sure to load cuda/11.3 and gcc/9.3 whenever you want to run pytorch.


Unload, replace or purge modules

To unload a currently loaded module, type:

module unload {software}/{version}
module unload {software}

For example, to unload gcc version 9.3:

module unload gcc

To replace your loaded cuda module 11.1 with 11.3:

module load cuda/11.3

To purge or unload all currently loaded modules:

module purge



For more information on Lmod, visit the site below: