Using Modules

Modules is a command line tool to help setup and easily alter your environment.   This allows you to "load" and "unload" software from your environment variables like "PATH" and "LD_LIBRARY_PATH" without having to know the location of this software, or to edit complicated scripts.  Commonly used software will be in this list.

Common Module Commands

module avail

This list may be different on the system as new software and versions are installed all the time.

List all of the modules available to you

$ module avail

-------------------------- /usr/share/Modules/modulefiles ---------------------------
dot         module-git  module-info modules     null        use.own
--------------------------------- /act/modulefiles ----------------------------------
impi                mpich/intel         mvapich2-2.2a/intel openmpi-1.8/gcc
intel               mvapich2-2.1/gcc    openmpi-1.6/gcc     openmpi-1.8/intel
mpich/gcc           mvapich2-2.2a/gcc   openmpi-1.6/intel
CODE

module load

Load the module into your environment.  For example, if you'd like to use the intel compilers

$ icc -v
bash: icc: command not found...
$ module load intel
$ icc -v
icc version X.XX.XX
CODE

module unload

Remove the module from your environment.,

$ module unload intel
CODE

module purge

Remove all modules from your environment

$ module purge
CODE

module switch

Switch one module for another.  For example unload mpich/gcc and load mpich/intel

$ module switch mpich/gcc mpich/intel
CODE