Environment Modules User Guide
Environment Modules is a utility for the dynamic modification of a user's environment via modulefiles. There is a modulefile for each of available software packages installed on the Lewis system. Therefore, users may use the module command to check available software on the system. Users can issue a module command to dynamically set or remove shell environment variables such as
PATH
,INCLUDE
,LD_LIBRARY_PATH
,MANPATH
, etc. for the corresponding software package/version. Users may put a module command in the job script file as needed, and can also add a module command into their~/.bashrc
.
Check available modules/packages
The command to check the module files for installed software packages is
module avail
More module files will become available when software packages are added.
Example (output trimmed to save space):
$ module avail
-------------------------- /cluster/modulefiles/rcss ---------------------------
admixture_linux/admixture_linux-1.3.0 matlab/matlab-R2016a-cirl
amber/amber-11 namd/namd-2.11
bcl2fastq2/bcl2fastq2-2.17.1.14 namd/namd-2.11-multicore
bcl2fastq2/bcl2fastq2-2.18.0.12 ncbi-blast/ncbi-blast-2.5.0+
beagle/beagle-09Feb16.2b7 nmag/nmag-0.2.1
beagle/beagle-22Feb16.8ef nrn/nrn-7.4
beagle/beagle-27Jul16.86a nrn/nrn-mpi-7.4
bolt-lmm/bolt-lmm-v2.2 oommf/oomf-12a6
breakdancer/breakdancer-v1.4.5 openbugs/openbugs-3.2.3
caffe/caffe-master openfoam/openfoam-4.1
caffe/caffe-master_cpu-only perl/perl5lib
charm/charm-net-linux-x86_64-6.7.0 picard-tools/picard-2.7.1
...
or check the available versions for a specific software package as follows:
$ module avail -t matlab
/usr/share/Modules/modulefiles:
/etc/modulefiles:
/act/modulefiles:
matlab/matlab-R2015a
matlab/matlab-R2016a
matlab/matlab-2016a-cirl
/cluster/modulefiles/spack:
List loaded modules/packages
The command to list loaded modules/packages is
module list
$ module list
Currently Loaded Modulefiles:
1) null
Load/add a module to set the environmental variables
The command to set the environmental variables for a software package
is module load [modulefile]
. You may check the loaded modules using
module list after you load a module/package.
$ module load matlab/matlab-R2016a
$ module list
Currently Loaded Modulefiles:
1) matlab/matlab-R2016a
To display what environmental variables have been set in a module
$ module display matlab/matlab-R2016a
-------------------------------------------------------------------
/cluster/modulefiles/rcss/matlab/matlab-R2016a:
module-whatis Set up environment for matlab R2016a
prepend-path PATH /cluster/software/matlab/matlab-R2016a/bin
setenv MATLABPATH /cluster/software/matlab/addons/
-------------------------------------------------------------------
To display basic help information for a module
$ module help [modulefile]
----------- Module Specific Help for '[modulefile]' ---------------------------
Helpful Information
Unload/remove a module from the shell environment
The command to unset the environmental variables for a software
package is module unload [modulefile]
. You may check the loaded
modules using module list after you unload the module/package.
$ module list
Currently Loaded Modulefiles:
1) null 2) matlab/matlab-R2016a
$ module unload matlab/matlab-R2016a
$ module list
Currently Loaded Modulefiles:
1) null
Unload all loaded modules
The command to unload all the loaded modules is module purge. You may check the loaded modules using module list after you unload the modules/packages.
$ module purge
(no output)