We've been busy looking for new ways to reduce complexity in our HPC environment. One tool which has been around for many years assists with setting up your environment where multiple versions of the same application exists. The name of the tool is called “modules” - http://sourceforge.net/projects/modules/files/Modules/modules-3.2.8/
Modules allows the user to select a particular version of application where multiples exist. For example, if the system had gcc 4.1.2 installed but you wanted gcc 4.6.1 loaded then you would use modules to setup the 4.6.1 environment.
Let us list the modules which are available on the head node. Executing “ module avail “ at the shell should list the following.
---------------------------------- /opt/exp_soft/Modules/3.2.8/modulefiles -----------------------------------
module-gcc46
To activate gcc 4.6.1 ,execute “ module load module-gcc46 “. This will not return any data to the prompt but when you execute “ gcc –version “ you should see a different version of gcc configured. The include paths and library paths should reflect the new location for gcc as well.
An example of a job submission script would look something like the following below.
#PBS -N TestJob
#PBS -m e
#PBS -M e-mail_address
#PBS -l nodes=1:series400:ppn=2
#PBS -V
whoami
gcc --version
module load module-gcc46
gcc –version
Notice the #PBS directive. If you load a module for an application and submit a job without -V set, the module is not present on the compute nodes and your job will most likely fail.
Execute “ module list” will list the current modules which are loaded under your environment. “ module –help “ will list the usage commands.