Environment modules on the Nevis particle-physics Linux cluster
Environment modules
are a way of setting up a Linux
shell environment. On the cluster, we use the
module
to set up software packages available on the
applications server.
Quick start guide
To set up
ROOT
:
module load root
To set up
Geant4
:
module load geant4
To see what packages and versions are available:
module avail
If you just want to see the versions for a particular package, e.g., ROOT:
module avail root
To get a brief description of a given package, e.g., Geant4.9.6:
module whatis geant/4.9.6
To get a longer description:
module help geant/4.9.6
What are environment modules?
The command line environment you use to issue commands in Linux is called the
shell. Your shell has an "environment": a collection of variables, aliases, and definitions to make the shell and its environment easier to use. A software package that is not built-in to Linux (such as
ROOT
or
Geant4
) needs the shell environment to be set up in various ways: defining shell variables such as
$ROOTSYS
, adding binary executables to the shell's search path variable
$PATH
, adding library locations to the shell's library search variable
$LD_LIBRARY_PATH
, etc.
Environment modules
are a way taking care of these details for you. Instead of having to type something like:
export ROOTSYS=/usr/nevis/ROOT-5.34.23
export PATH=$ROOTSYS/bin:$PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
every time you use ROOT, you can just type this instead:
module load root
Another advantage of environment modules is that they are shell-independent. For example, the above
export
commands are valid in
bash
and
zsh
, but in
csh
you must use:
setenv ROOTSYS /usr/nevis/ROOT-5.34.23
setenv PATH $ROOTSYS/bin:$PATH
setenv LD_LIBRARY_PATH $ROOTSYS/lib:$LD_LIBRARY_PATH
but even in csh, the environment modules command is still
module load root
.