| Beowulf Compute Cluster - Using Environment Modules |
Using Environment Modules
Several software packages on the cluster require correct definition of certain environment variables. These variables establish the package's configuration and influence its behavior. For example, PATH and LD_LIBRARY_PATH specify the location of package binary files. |
| $ module avail |
list all available package modules |
| $ module whatis [module-name] | list module description |
| $ module list | list the modules already loaded |
| $ module load module-name | load the named module |
| $ module unload module-name | unload the named module |
| $ module switch old-module-name new-module-name | swap the old module and new modules |
| $ module purge | unassign all module definitions |
| $ module display module-name | list the rules that define a module |
Examples
$ module avail
-------------------------- /usr/share/Modules/modulefiles ---------------------------
dot module-cvs module-info modules null use.own
------------------------------ /share/apps/modulefiles ------------------------------
gnumpich intel/10.1 ldm pgi/5.2 torque
gromacs intel/ict-3.0 lsf pgi/6.0
idl intel/vtune-9.0 pbs pgi/7.0
$ module whatis pbs
pbs : pbs: (aka TORQUE) an open source resource manager providing control
over batch jobs and distributed compute nodes
$ module load intel/10.1
$ module list
Currently Loaded Modulefiles:
1) pbs 2) intel/10.1
Using the module command with batch jobs
To set up package environment variables for batch first use the module command in your terminal session and then use qsub to export the variables to batch. For example, assume your job requires access to the shared Intel Math Kernel libraries. First, use the modules command to load variables for the Intel Compiler package:
$ module load intel/10.1Then submit the job script using the option to export the variables to your batch job:
$ qsub -V myjob.sh
If you prefer, the option can be enabled in the job script itself with the PBS command:
#PBS -V