Using environment modules on the SCF

Using environment modules on the SCF

We use Linux environment modules to allow users to control what software is available to them on the SCF Linux machines. At the moment, these are being used to allow one to choose between Python 3 (the default) and Python 2 as well as to make various machine learning-related software (e.g., Tensorflow, Caffe, Torch) and GPU functionality available.

Using modules

Modules are designed to change your environment so you can easily switch between different versions of software and to allow access to software that might have conflicts with other software on the system. You can use the load, unload, and switch commands seen below either on a one-time basis in a terminal session or a cluster submission script or set defaults in your .bashrc (in general you'd want include any such commands after the stanza involving ~skel/std.bashrc so as to have your modifications override any modules set by default on the system).

To see the software (and versions) available via the modules system:

 module avail

To see what modules are currently loaded:

 module list

To unload a module:

 module unload python/3

To load a module:

 module load python/2

To switch between different versions:

 module switch python/2 python/3

Modules in Slurm sessions

Slurm sessions (either started via srun or sbatch) inherit the modules loaded when the Slurm session was started.