Knowledge Base

Accessing Software on the Cluster

On the Reading Academic Computing cluster the locally built software packages are not available right away. They can be loaded into your environment using environmental modules (http://modules.sourceforge.net/). The ‘module’ command modify your environmental variables and in particular change the version of software that you use by changing the PATH and other environment variables. The strength of this approach is that it works with all shells and that you can unload modules as opposed to having to start a new shell to get a clean environment. The old command ‘setup’ is no longer supported on the met-cluster and is not available for new user accounts.
 
Listing available modules

You can list the available software modules on the cluster with the command

module avail

Note that you’ll have to be on one of the compute nodes on the cluster to see the full range of available software as the head node only has a limited amount of applications available.

If you want to find out what versions of a module are available, for example gcc, then you can specify this in the above command, e.g.:

module avail gcc

This will show a list of all available versions of gcc in an output like this:

[dk913223@racc-login-4 ~]$ module avail gcc

------------------------ /share/apps/modules/compilers -------------------------
gcc/6.4.0 gcc/7.3.0 gcc/8.4.0 

 

Loading a module You can load a module, e.g. gcc, using the command

module load gcc

or

module add gcc

The will load a default value of the module, which in the case of gcc is the newest version, here 8.4.0. For some software, the default version is indicated by ‘(default)’ in the output from ‘module avail ‘. If you want a specific version, for example gcc 6.4.0 then append the version to the above command:

module load gcc/6.4.0

 

Listing loaded modules

You can list the modules that you have loaded with the command

module list

 

Switching between module versions

If you want to change the version of a module you have loaded, for example from gcc version 8.4.0 to 6.4.0, then you can use the command

module switch gcc/6.4.0

 

Adding your own module files

If you have a directory of your own modules in your home directory, in /home/username/privatemodules, then you can make them available to load with the command

module use ~/privatemodules

This can also be done by adding the module ‘use.own’ and it has the advantage that you can call it many times without it being added more than once.

module load use.own

 

Setting preferred module versions

You can use your own modules as a way of loading your preferred versions of a module. If you then change your module preferences you only need to update one file.

The following example shows the contents of a sample file called e.g. ‘mypython’, which could be used to set up your preferred version of the python module (shown here for anaconda/2020.11).

#%Module1.0#####################################################################
##
## use.own modulefile
##
## modulefiles/use.own.  Generated from use.own.in by configure.
##
proc ModulesHelp { } {
global version

puts stderr "\tThis module adds my prefered version of python"
puts stderr "\n\tVersion $version\n"
}

module-whatis    "adds my prefered version of anaconda"

set    version    2020.11
module    load    anaconda/$version

When this is set up and you want to load python you would need to load the two modules

module load use.own
module load mypython

Your personal module file could also be used to load multiple modules.