Installed software (modules)
When you first login to Hamilton, only a small subset of software is immediately available. There is also a large quantity of additional programs that can be made accessed by interacting with the module command.
You will typically need to run a number of module load >modulename< commands before working. To save time, these can be added to scripts run automatically when you log in e.g. .bash_profile, or to your job script.
The module system allows us to add new programs, and new versions of programs, without disrupting people who may wish to continue using an old version, or a different program with similar commands.
Module commands
The core commands to interact with the module system are:
- module avail - show what software packages are available
- module load <modulename> - make the specified software available
- module list - show what modules you have loaded
Other useful commands:
- module avail <name> - show the subset of available packages matching <name>
- module whatis <modulename> - show a short description of the specified module
- module show <modulename> - show what loading a module will do to your environment
- module unload <modulename> - unload the specified module
- module purge - unload all modules
- module switch - switch to a different compiler suite, updating other module flavours to match (see module names)
Most compiler suites are available through modules, including:
- GCC
- LLVM (Clang)
- Intel Classic (icc, ifort) - Intel may not provide further updates for Intel Classic. Its replacement is OneAPI.
- Intel OneAPI (icx, ifx)
- aocc - AMD compilers based on LLVM/Clang
All the compiler modules set the CC, CXX, FC, F77 and F90 environment variables so that most build systems will automatically use the intended compiler. Note that although LLVM and AOCC have been built with the LLVM Fortran compiler enabled (flang), this is a relatively immature compiler so FC/F77/F90 are set to gfortran for those modules.
Where appropriate, other modules also set environment variables to aid software building, and the command module show <module name> will list these. They include <MODULE_NAME>_BUILD_MODULES, which contains the set of modules needed to reproduce the build environment for <MODULE_NAME> and can help when building packages and libraries for Python, R and some other applications. For example:
module load r
module load $R_BUILD_MODULES
R
install.packages("my_package_name")
or for Python:
module load python
module load $PYTHON_BUILD_MODULES
pip install --user my_package_name
Module names
Module names are in the format software/version. For example, the python/3.9.9 module would provide version 3.9.9 of the Python programming language.
The following commands show respectively all modules, and all modules whose name contains 'python':
module avail
module avail python
Loading a named version of a module is recommended for reproducibility, e.g.:
module load gcc/11.2
There is also a default version of each module. It will usually be the most recent one and may change at short/no notice when new versions are installed. To load the default, type e.g.:
module load gcc
Modules for bioinformatics
The bioinformatics module contains a collection of other modules relevant to bioinformatics. In order to see or load these, you must first load the bioinformatics module, e.g:
module load bioinformatics
module avail
module load bowtie2/2.4.5
Module flavours/ modules containing libraries
Some modules, particularly for libraries, are presented as a single module but contain multiple 'flavours' built against different compilers. You will need to select and load a compiler module first; the matching flavour of subsequent modules will then be loaded automatically, providing a compatible set of modules. You will not be able to load one of these modules before loading a compiler module first, e.g:
module load openmpi/4.1.1
openmpi/4.1.1 depends on one of the module(s) 'gcc llvm intel oneapi aocc
Instead load a compiler and a compatible library module with e.g:
module load oneapi/2021.4 openmpi/4.1.1
The module switch command allows you to swap one dependency for another, automatically updating all loaded module flavours to match, e.g.:
module switch oneapi/2021.4 gcc/11.2
Most compiler suites are available through modules, including:
- GCC
- LLVM (Clang)
- Intel Classic (icc, ifort) - Intel may not provide further updates for Intel Classic. Its replacement is OneAPI.
- Intel OneAPI (icx, ifx)
- aocc - AMD compilers based on LLVM/Clang
All the compiler modules set the $CC, $CXX, $FC, $F77 and $F90 environment variables so that most build systems will automatically use the intended compiler. Note that although LLVM and AOCC have been built with the LLVM Fortran compiler enabled (flang), this is a relatively immature compiler so $FC/$F77/$F90 are set to gfortran for those modules.
Where appropriate, other modules also set environment variables to aid software building, and the command module show <module name> will list these. They include <MODULE_NAME>_BUILD_MODULES, which contains the set of modules needed to reproduce the build environment for <MODULE_NAME>, Loading <MODULE_NAME>_BUILD_MODULES can help when building packages and libraries for Python, R and some other applications. See the Software pages for more information on individual applications.
A global environment variable, SERVICE_NAME=ham8, is also set, to aid portability between systems, including Bede.