Modules and Packages
Modules
The SCRTP desktop systems use modules (from the Environment Modules project) to provide specialised software and specific versions of software. Details and some commands are available here.
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 gcc
gives output like (click to enlarge):
Looking only at the GCC modules itself (GCC/...) you may notice that the output above contains several different major versions. 7.3 is shown as the default. This is not already loaded, but if you just do
module load GCC
it is what you get, so
gcc --version
then gives 7.3.
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]
Module load in Startup Scripts
If you always use a particular module, it can be tempting to load it in your bash startup script. This can interfere with logging in to your desktop account using x2go. See here for details and a workaround.
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).
For example, you may use Python and want a different version to the system one. At time of writing, 2.7.5 and 3.4.8 are available (the latter is invoked with python3, instead of just python) on the system, or 2.7.14 and 3.6.3 via the module system. Full details are available here.
More commonly, you are happy with the program version but want some additional library or package. For Python, you should use the Python versions provided by the module system, which each have a corresponding pip version. It is now simple to install packages just for yourself. 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.