Environment modules (program selection)
A key reason for using the cluster (or other Linux server) is the
ability to build and install new programs. This can be done either by
the user, or system support staff and made available for all users.
A standard tool to aid this effort is the environment module system, a
flexible framework to add or remove programs from a users’ current
environment variables (the
, etc.). From the point of view of the
user, this provides a (partial) menu of the available programs on the
system. A good link for more information on environment modules is
A good place to start with environment modules is with the
command, which will show the list of programs.
The list is quite long ([...] indicates more listing omitted). Historically,
many program modules were put in the
tree; more recently, a second folder for modules has been created (
), in addition to
To load a given program into your environment use the
command. To view loaded modules, use
. An example session
In the example, the
command is not found until the environment
module is loaded.
Using modules in PBS scripts
When you run a job on a worker node, using the Moab/Torque PBS scheduler program, you load the modules just as you would do from the interactive command line, but there is a need also include a line to initialize the module system on the node, with the command:
So, for example, a sample script to run an mpi "hello, world" program is at
, and listed below.