Skip to main content

Modules and Packages

Modules

The SCRTP desktop systems use modules (from the Environment Modules project)  to provide specialised software and specific versions of software.

The command module list lists your currently loaded modules, if any.

module avail [optional-string] lists available modules.

If you supply a string, it lists only those matching the string. For example, module avail math

gives output like (click to enlarge):

mathematicamodule3.png

You may notice that the output above contains 5 different major versions of mathematica as well as several minor versions. 10.3 is shown as the default and after loading the mathematica module,

mathematica --version

prints 10.3.

Note: Mathematica versions 6 to 8 are listed as deprecated in the output above. This means they may not be kept up to date, may be removed without further warning, and you should generally avoid using them.

Module avail shows only the modules immediately available to load. In some cases you have to load one module first to access those in its subgroup. This is the case on, for example, the Orac cluster at Warwick. In this case, the command

module spider

shows all available modules arranged in groups, and can show you which modules to load to get the one you want.

To use some programs, such as special compilers, you have to load the modules explicitly. This uses the command module load [module_name]. You do not need to specify a version number with the name and names ending in '(default)' do not need to include this.

Note: module names and program names are not always the same. For example the 'intel' module loads the intel compiler suite, which contains icc, ifort etc.

Sometimes you require a specific version of software, for compatibility reasons or because features have been removed or changed. You can specify a full name as given in the listing to do this.

Be cautious about loading two versions of the same program at once. This doesn't usually allow you to use both versions and can cause problems. Use

module unload [module_name]

to remove one version before adding another.

The module load command can be used in job submission scripts where needed.

It is possible to create collections of modules to save you having to load all of the individual modules that you need. Doing this is very simple. Load all of the modules that you want to use and then enter

module save [collection_name]

This will save the collection, overwriting any previous collection with the same name. To restore the collection, type

module restore [collection_name]

You can list the module collections that you have created using

module savelist

and you can see details what modules are contained in a given collection using

module describe [collection_name]

Other Packages

Sometimes you may need software that is not installed by default. You can request it be installed system-wide using bugzilla, but this may not be possible and takes time. Often you can install something just for yourself (a local install).

Note: before attempting this, check the software is not already installed and check for licensing restrictions (such as a limited number of processors for personal use) or restrictions on the cluster itself.

For example, you may use Python and want a different version to the system one. At time of writing, 2.6.9 and 3.4.1 are available (the latter is invoked with python3, instead of just python). Often there is an argument to the installer script which must be set. For python you must run a configuration script before installing and set a directory prefix. Some instructions are currently available here (external link).

More commonly, you are happy with the program version but want some additional library or package. Again there is often a simple way to do this. For Python, using the normal pip installer, you simply pass the --user argument, as shown here. In general, an internet search for "[program/package name/installer name] local install" is a good starting point.

Next Section

Wrap Up