Modules


Modules allows you to dynamically modify your user environment by using modulefiles. This make it easy to change between environments, e.g. the MPI environment and the PGI environment. When having problems compiling a "module list" could help solve your problems.

When writing a PBS job script (see here for more information), the wanted environment has to be set inside the script with modules. The reason for this is that the user environment is not inherited by the PBS script. This should also be checked while running interactive jobs.

Module have several subcommands, usage e.g. "module avail". The following list shows some of the subcommands.

 
Subcommand                  Description

avail                       lists all available modules
list                        lists the modules you are using
load "module_name"          loads module "module_name"
unload "module_name"        unloads module "module_name"
show "module_name"          displays "module_name"'s configuration settings
swap "old_mod" "new_mod"    Unloads the "old_mod" and loads the "new_mod"
 

A complete list of subcommands can be found in the module man page or here.

Please note, if the module command does not work inside your job scripts, add the line "export -f module" to your ~/.bashrc file. This should be automatically set for new users. This is only valid if your shell is bash.