Environment Modules

If you've read some of the documentation above (and if not, do so now!) then you'll know that command shells need to be told where to find files so they can run the commands that you type. All will know about standard system locations where programs from ls to geany are installed, but we don't install the science packages into those locations. So how does the shell find them?

In the background the shell maintains an environment variable called PATH, which is a list of directories that it should search for files which match typed commands. To enable access to new programs we need to add the directory they're in to the PATH. In the old days one would edit shell initialisation files to add items to the PATH, but this is hard to manage and gets very complex if you have multiple packages which may bundle different, incompatible, versions of the same command.

To try to make life easier we're using Environment Modules - these are small scripts which abstract most of the setup details away, and allow packages to be added and removed from the shell as needed.

If you type module avail you'll see a list of modules corresponding to the additional packages which are installed on the computer. One enables a package using module load modulename and disables it using module unload modulename. The modulefiles can set up chains of dependencies to ensure that all files you need for a complex package are available with a single command. This means much less editing of arcane shell configuration files, which is surely a good thing, though this may scare old-time users who have spent many years getting their config files to work!

For each of the science packages listed below we have an environment module available to enable it. If you want to have some of these enabled when you open a new shell then you can add a module load line to your ~/.bashrc file.

Some of the purely graphical packages are also available via the GNOME menu without loading a module.

Module - idl

To enable IDL type load module idl - we only offer version 8.6 at this time so there is no need to specify the version number. With this module loaded you have access to the idl and idlde commands, and the IDL_PATH (like the shell PATH, only for IDL programs) is adjusted to include ~/idl and all subdirectories. Any IDL .pro files stored under ~/idl will be automatically available.

Module - idllibs

The module adjusts the IDL_PATH variable to include access to useful IDL libraries. This module also automatically enables the base IDL module so simply running module load idllibs will enable both IDL and these libraries.

Module - ssw

This module enables access to the Solarsoft/SSWIDL environment. SSW requires tcsh to function, but rather than adjust the user shell we now run sswidl via its own script. Running module load ssw enables IDL, the third party libraries above, and Solarsoft. Type ssw to start the SSWIDL environment.

Module - procspec

Running module load procspec/base enables the basic plotting and analysis tools, along with IDL and the third-party libraries. A set of non-LTE model atmosphere analysis tools are also available and can be enabled via module load procspec/nonlte. Simply typing module load procspec will default to the base configuration.

Module - mathematica

Enables the mathematica command in the shell. If Mathematica is installed on the machine it is also available in the GNOME menu without loading this module.

Module - matlab

Enables the matlab command in the shell. If MATLAB is installed on the machine it is also available in the GNOME menu without loading this module.

module load starlink enables the starlink command which sets up additional paths and commands. Due to the age and complexity of the Starlink environment it has not been possible to configure it as a proper environment module, so even if the module is unloaded the changes to the environment will persist.

It would be very unwise to load this module into your shell by default.

Module - gaia

Enables the gaia command from Starlink 2016A only - no other part of the Starlink software. This module can be unloaded properly as it's very simple.

Module - aladin

Provides the aladin command which launches the Java-based desktop sky atlas client.

Module - ciao

Two versions of the CIAO pipeline exist - one based on Python 2.7, the other based on 3.5. The latter is a beta test and may have issues so both versions are provided. module load ciao/4.9-py27 enables the Python 2.7 version and module load ciao/4.9-py35 enables the Python 3.5 release. Please note:

  • You cannot have both ciao modules enabled at the same time
  • You cannot load the ds9 module at the same time since ciao has its own bundled copy
  • You cannot load the heasoft module (needed by xmmsas) alongside ciao as they have overlapping (incompatible) components

The standard way to run CIAO is to set certain environment variables and then source a setup script. For your convenience this has been replicated by the environment modules, which set the basic environment variables and then define an alias ciao which, when executed at the shell, runs the standard setup script. The downside to this is that the module command cannot reset your shell environment afterwards.

It would be very unwise to load this module into your shell by default.

Module - xmmsas

xmmsas is a very complex environment which has several dependencies on other modules (perl-5.22.2, heasoft, wcstools). These are pulled in automatically by module load xmmsas which in turn enables an alias xmmsas which, when executed in the shell, runs an additional setup script. The module command cannot reset your shell after xmmsas has been run.

It would be very unwise to load this module into your shell by default.

Module - ds9

Two versions of this module exist. module load ds9/7.5 provides the basic ds9 FITS viewer by typing ds9. module load ds9/7.5-funtools loads ds9 and also adds the Funtools package to the system PATH. If you simply run load module ds9 then you default to the latter configuration.

To enable Funtools in ds9 you must select Analysis/Load Analysis Commands… and navigate to /opt/funtools/bin/ where there is a funtools.ds9 file - select this and the Funtools menu item will be added to the Analysis menu.

This module also loads the xpa module which is a protocol used to remote control DS9.

Module - mesa

This module loads the MESA code itself and the MESA SDK (via the mesasdk module) which replaces the default compilers, etc, with versions known to work for MESA. module load mesa will load the latest SDK (installed under /opt/mesasdk) and set the MESA_DIR variable to the mesa release installed under /opt/mesa/.

Module - topcat

Provides the topcat command which launches the TopCAT application.

Module - anaconda2, anaconda3

For users who have an Anaconda Python install, running module load anaconda2 or module load anaconda3 will prepend the user Anaconda directory to the PATH, so it becomes their default python. If you don't have an anaconda install in your home directory, or it's not in the default location, this will return an error.

Module - mpi

This module enables use of OpenMPI libraries and commands.

Module - imagej

Enables the imagej command in the shell. If ImageJ is installed on the machine it is also available in the Gnome menu without loading this module.

public/teaching-linux-systems/environment_modules.txt · Last modified: 2017/09/27 18:50 by Robert Ryans

Back to Top Sitemap News