Modules
Modules
The modules package provides an easy way to set PATH and other environment variables. As described in Getting Started, before using modules, csh/tcsh users will need to run
source /usr/local/modules/etc/csh.modules
You should add that to your .login file so it is run automatically whenever you log in. Likewise, bash users will need to run
source /usr/local/modules/etc/profile.modules
and should add that to their .profile file. The source will create an alias of module to use the modules system.
Running the module avail command will list the packages that have been configured in modules. Packages have been created for each compiler, and for each MPI-compiler pair. The PATH and other environment changes are done by using module load PACKAGE and module unload PACKAGE, where PACKAGE is the name of one of the pre-configured packages.
The following are the specific examples for what has been configured:
% module load gcc % module load intel % module load pgi % module load mvapich2/gcc % module load mvapich2/intel % module load mvapich2/pgi % module load openmpi/gcc % module load openmpi/intel % module load openmpi/pgi
The last six, which involve MPI, will also load the correct compiler, so for most people you will not need to use the first three examples.