Campuses:
Environment Modules is a system to manage what software is loaded into your environment.
It includes the ability to list all software packages currently available in the Modules system, load new software package into your environment, list all loaded software packages, and unload packages.
We use this system, rather than simply including all software in your default PATH, as it permits us to offer alternate versions of the same software, or to provide packages which might normally interfere with each other.
Find what packages are available
abcd@lemming> module avail ------------------------------------------ /usr/share/Modules/modulefiles ------------------------------------------- dot module-git module-info modules null use.own ------------------------------------------------- /etc/modulefiles -------------------------------------------------- compat-openmpi-psm-x86_64 matlab/2014a sm/2.4.36 compat-openmpi-x86_64 matlab/2015a tecplot/10.0 ds9/7.3.2 openmpi-x86_64 texlive/2013 --------------------------------------- /usr/local/share/Modules/modulefiles ---------------------------------------- ds9/7.3.2 idl/8.3 mathematica/10.2 matlab/2014a scisoft/7.7 tecplot/10.0 fastx/1.0-39 intelcce/12.1.3 mathematica/8.0 matlab/2015a skype/4.3 tecplot/2015r2 idl/8.1 mathematica/10.0.2 mathematica/9.0 scisoft/7.5 sm/2.4.36 texlive/2013
Or (perhaps more useful):
[1170]abcd@lemming ~> module whatis dot : adds `.' to your PATH environment variable module-git : get this version of the module sources from SourceForge.net module-info : returns all various module-info values modules : loads the modules environment null : does absolutely nothing use.own : adds your own modulefiles directory to MODULEPATH ds9/7.3.2 : adds SAOImage DS9 (7.3.2) to your environment matlab/2014a : adds Matlab 2014a to your environment matlab/2015a : adds Matlab 2015a to your environment sm/2.4.36 : adds SM (2.4.36) to your environment tecplot/10.0 : adds Tecplot 10.0 to your environment texlive/2013 : adds TeXLive 2013 to your environment ds9/7.3.2 : adds SAOImage DS9 (7.3.2) to your environment fastx/1.0-39 : adds StarNet FastX 1.0-39 to your environment idl/8.1 : adds IDL 8.1 to your environment idl/8.3 : adds IDL 8.3 to your environment intelcce/12.1.3 : adds Intel C/C++/Fortran compilers (12.1.3) to your environment mathematica/10.0.2 : adds Mathematica 10.0.2 to your environment mathematica/10.2 : adds Mathematica 10.2 to your environment mathematica/8.0 : adds Mathematica 8.0 to your environment mathematica/9.0 : adds Mathematica 9.0 to your environment matlab/2014a : adds Matlab 2014a to your environment matlab/2015a : adds Matlab 2015a to your environment scisoft/7.5 : adds Scisoft 7.5 to your environment scisoft/7.7 : adds Scisoft 7.7 to your environment skype/4.3 : adds skype v4.3 to your environment sm/2.4.36 : adds SM (2.4.36) to your environment tecplot/10.0 : adds Tecplot 10.0 to your environment tecplot/2015r2 : adds Tecplot 2015 r2 to your environment texlive/2013 : adds TeXLive 2013 to your environment
The command for loading a package into your environment is module load <package name>
. This loads the most recent version of the package. For example
module load idl
If a specific version of a package is desired, the command can be expanded to module load <package name>/<package version>
. For example:
module load mathematica/9.0
To see what packages are currently loaded, the command is module list
.
abcd@lemming> module list Currently Loaded Modulefiles: 1) sm/2.4.36
The command to unload a package is module unload <package name>
. This command will also remove any prerequisites for the package being removed.
The previous changes will allow you to manage your environment in the current shell environment, but will not affect other shells, or new shells. Thus running something like mpirun may not capture these settings, since the new shells spawned by mpirun may not get the same environment as the original shell.
To manage your default environment through modules, begin by adding to the end of your ~/.bashrc or ~/.cshrc startup script the line
module load null
The “null” module actually does nothing in and of itself; it merely provides a placeholder for the following commands to operate on.
Next, to add a module to your default environment, use the command
module initadd [module name]
This will alter the “module load” line in your startup script to load this module at each shell invocation. In this way you can manage your default environment through the modules package without editing your startup scripts.
To disable a default module, use “initrm”
module initrm [module name]
This removes that module from the module line in your startup script.