Accessing software
Overview
Teaching: 30 min
Exercises: 15 minQuestions
How do we load and unload software packages?
Objectives
Understand how to load and use a software package.
On a high-performance computing system, it is often the case that no software is loaded by default. If we want to use a software package, we will need to “load” it ourselves.
Before we start using individual software packages, however, we should understand the reasoning behind this approach. The three biggest factors are:
- software incompatibilities;
- versioning;
- dependencies.
Software incompatibility is a major headache for programmers. Sometimes the presence (or absence) of
a software package will break others that depend on it. Two of the most famous examples are Python 2
and 3 and C compiler versions. Python 3 famously provides a python command that conflicts with
that provided by Python 2. Software compiled against a newer version of the C libraries and then
used when they are not present will result in a nasty 'GLIBCXX_3.4.20' not found error, for
instance.
Software versioning is another common issue. A team might depend on a certain package version for their research project - if the software version was to change (for instance, if a package was updated), it might affect their results. Having access to multiple software versions allow a set of researchers to prevent software versioning issues from affecting their results.
Dependencies are where a particular software package (or even a particular version) depends on having access to another software package (or even a particular version of another software package). For example, the VASP materials science software may depend on having a particular version of the FFTW (Fastest Fourier Transform in the West) software library available for it to work.
Environment modules
Environment modules are the solution to these problems. A module is a self-contained description of a software package - it contains the settings required to run a software package and, usually, encodes required dependencies on other software packages.
There are a number of different environment module implementations commonly
used on HPC systems: the two most common are TCL modules and Lmod. Both of
these use similar syntax and the concepts are the same so learning to use one will
allow you to use whichever is installed on the system you are using. In both
implementations the module command is used to interact with environment modules. An
additional subcommand is usually added to the command to specify what you want to do. For a list
of subcommands you can use module -h or module help. As for all commands, you can
access the full help on the man pages with man module.
On login you may start out with a default set of modules loaded or you may start out with an empty environment, this depends on the setup of the system you are using.
Listing currently loaded modules
You can use the module list command to see which modules you currently have loaded
in your environment. If you have no modules loaded, you will see a message telling you
so, the null module is a special module that is automatically loaded as a placeholder if automatic loading is
performed.
[yourUsername@clf1 ~]$ module list
Currently Loaded Modulefiles:
1) null
Listing available modules
To see available software modules, use module avail
[yourUsername@clf1 ~]$ module avail
---------------------------------- /opt/ohpc/pub/modulefiles -----------------------------------
cmake/4.0.0 hwloc/2.12.0 os prun/2.2
gnu13/13.2.0 libfabric/1.18.0 pmix/4.2.9 ucx/1.18.0
---------------------- /shared/apps/easybuild/x86_64/amd/zen4/modules/ai -----------------------
GKlib-METIS/5.1.1-GCC-14.3.0 ollama/0.5.12-GCCcore-13.3.0-CUDA-12.6.0
LightGBM/4.6.0-foss-2024a
---------------------- /shared/apps/easybuild/x86_64/amd/zen4/modules/bio ----------------------
ABRicate/1.0.0-gompi-2023b
ABRicate/1.2.0-gompi-2025b (D)
ABySS/2.3.10-foss-2024a
AMRFinderPlus/4.2.7-gompi-2025b
ANNOVAR/20250729-GCCcore-13.2.0
BBTools/39.68-Java-17
BCFtools/1.18-GCC-12.3.0
BCFtools/1.22-GCC-14.3.0
BCFtools/1.23-GCC-14.3.0 (D)
BEDTools/2.31.1-GCC-13.2.0
BEDTools/2.31.1-GCC-13.3.0
BEDTools/2.31.1-GCC-14.2.0
BEDTools/2.31.1-GCC-14.3.0 (D)
BLAST+/2.16.0-gompi-2023b
BLAST+/2.16.0-gompi-2024a
BLAST+/2.17.0-gompi-2025a
BLAST+/2.17.0-gompi-2025b (D)
BLAST/2.11.0-Linux_x86_64
BOLT-LMM/2.5-iimkl-2025b
BWA/0.7.17-GCCcore-12.3.0
BWA/0.7.18-GCCcore-13.3.0
BWA/0.7.19-GCCcore-14.3.0 (D)
BamTools/2.5.2-GCC-13.2.0
BamTools/2.5.2-GCC-13.3.0
BamTools/2.5.3-GCC-14.2.0
BamTools/2.5.3-GCC-14.3.0 (D)
[removed most of the output her for clarity]
There is also the possibility of loading inherited modules from old systems such as Hawk but this is not
recommended and is only used to aide migration to Falcon. Loading hawk modules will
change the available modules.
Loading and unloading software
To load a software module, use module load.
In this example we will use Python 3. Initially, Falcon provides a default Python 3:
[yourUsername@clf1 ~]$ python --version
Python 3.9.21
We can also look for the location where a particular program lives with the which command.
which looks for programs the same way that Bash does, so we can use it to tell us where a particular piece of software is stored.
[yourUsername@clf1 ~]$ which python3
/usr/bin/python
We can load the python3 command with module load:
[yourUsername@clf1 ~]$ module load Python
[yourUsername@clf1 ~]$ which python
/shared/apps/easybuild/x86_64/amd/zen4/software/Python/3.13.5-GCCcore-14.3.0/bin/python
So, what just happened?
To understand the output, first we need to understand the nature of the $PATH environment
variable. $PATH is a special environment variable that controls where a UNIX system looks for
software. Specifically $PATH is a list of directories (separated by :) that the OS searches
through for a command before giving up and telling us it can’t find it. As with all environment
variables we can print it out using echo.
[yourUsername@clf1 ~]$ echo $PATH
/shared/apps/easybuild/x86_64/amd/zen4/software/Python/3.13.5-GCCcore-14.3.0/bin:/shared/apps/easybuild/x86_64/amd/zen4/software/OpenSSL/3/bin:/shared/apps/easybuild/x86_64/amd/zen4/software/XZ/5.8.1-GCCcore-14.3.0/bin:/shared/apps/easybuild/x86_64/amd/zen4/software/SQLite/3.50.1-GCCcore-14.3.0/bin:/shared/apps/easybuild/x86_64/amd/zen4/software/Tcl/9.0.1-GCCcore-14.3.0/bin:/shared/apps/easybuild/x86_64/amd/zen4/software/ncurses/6.5-GCCcore-14.3.0/bin:/shared/apps/easybuild/x86_64/amd/zen4/software/bzip2/1.0.8-GCCcore-14.3.0/bin:/shared/apps/easybuild/x86_64/amd/zen4/software/binutils/2.44-GCCcore-14.3.0/bin:/shared/apps/easybuild/x86_64/amd/zen4/software/GCCcore/14.3.0/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/shared/home1/c.c1045890/bin
You’ll notice a similarity to the output of the which command. In this case, there’s only one
difference: the different directory at the beginning. When we ran the module load command,
it added a directory to the beginning of our $PATH. Let’s examine what’s there:
[yourUsername@clf1 ~]$ ls /shared/apps/easybuild/x86_64/amd/zen4/software/Python/3.13.5-GCCcore-14.3.0/bin
idle3 pip pip3.13 pydoc3.13 python-config python3-config python3.13-config
idle3.13 pip3 pydoc3 python python3 python3.13 wheel
Taking this to it’s conclusion, module load will add software to your $PATH. It “loads”
software. A special note on this - depending on which version of the module program that is
installed at your site, module load will also load required software dependencies.
To demonstrate, let’s use module list. module list shows all loaded software modules.
[yourUsername@clf1 ~]$ module list
Currently Loaded Modules:
1) GCCcore/14.3.0 8) Tcl/9.0.1-GCCcore-14.3.0
2) zlib/1.3.1-GCCcore-14.3.0 9) SQLite/3.50.1-GCCcore-14.3.0
3) binutils/2.44-GCCcore-14.3.0 10) XZ/5.8.1-GCCcore-14.3.0
4) bzip2/1.0.8-GCCcore-14.3.0 11) libffi/3.5.1-GCCcore-14.3.0
5) ncurses/6.5-GCCcore-14.3.0 12) OpenSSL/3
6) libreadline/8.2-GCCcore-14.3.0 13) Python/3.13.5-GCCcore-14.3.0
7) libtommath/1.3.0-GCCcore-14.3.0
Falcon:
[yourUsername@clf1 ~]$ module purge
[yourUsername@clf1 ~]$ module load PLINK
[yourUsername@clf1 ~]$ module list
Currently Loaded Modules:
1) GCCcore/13.2.0 8) gfbf/2023b
2) zlib/1.2.13-GCCcore-13.2.0 9) gzip/1.13-GCCcore-13.2.0
3) binutils/2.40-GCCcore-13.2.0 10) XZ/5.4.4-GCCcore-13.2.0
4) GCC/13.2.0 11) lz4/1.9.4-GCCcore-13.2.0
5) OpenBLAS/0.3.24-GCC-13.2.0 12) zstd/1.5.5-GCCcore-13.2.0
6) FlexiBLAS/3.3.1-GCC-13.2.0 13) libdeflate/1.19-GCCcore-13.2.0
7) FFTW/3.3.10-GCC-13.2.0 14) PLINK/2.0.0-a.6.9-gfbf-2023b
Sunbird:
[yourUsername@sl2(Sunbird) ~]$ module load febio
[yourUsername@sl2(Sunbird) ~]$ module list
Currently Loaded Modulefiles:
1) system/auto 4) mkl/2018/3
2) compiler/intel/2018/2 5) febio/4.0
3) python/3.7.0
So in this case, loading the PLINK module (a bioinformatics software package) or febio module (medical application software package), also loaded
many other packages as well. Let’s try unloading the PLINK or febio package.
Falcon:
[yourUsername@clf1 ~]$ module unload PLINK
[yourUsername@clf1 ~]$ module list
Sunbird:
[yourUsername@sl2(Sunbird) ~]$ module unload febio
[yourUsername@sl2(Sunbird) ~]$ module list
No modules loaded
So using module unload “un-loads” a module and all its dependencies, similar behaviour can be
obtained with the command module purge (unloads everything).
[yourUsername@clf1 ~]$ module purge
[yourUsername@clf1 ~]$ module list
No modules loaded
Software versioning
So far, we’ve learned how to load and unload software packages. This is very useful. However, we have not yet addressed the issue of software versioning. At some point or other, you will run into issues where only one particular version of some software will be suitable. Perhaps a key bugfix only happened in a certain version, or version X broke compatibility with a file format you use. In either of these example cases, it helps to be very specific about what software is loaded.
Let’s examine the output of module avail more closely.
[yourUsername@clf1 ~]$ module avail
....
------------------- /shared/apps/easybuild/x86_64/amd/zen4/modules/toolchain -------------------
foss/2021b foss/2023a foss/2023b foss/2024a foss/2025a foss/2025b (D)
....
Let’s take a closer look at the foss module. The foss common compiler toolchain consists entirely
of open source software (hence the name, derived from the common term ‘FOSS’, which is short for
“Free and Open Source Software”). This module contains a GCC compiler, extremely widely used in
C/C++/Fortran programs. Tons of software is dependent on the GCC version, and might not compile or run if the
wrong version is loaded. In this case, there are versions from: foss/2021b to
foss/2025b. How do we know which copy is the default?
In this case, foss/2025b is the latest version and is appended with a (D). This indicates that it is the
default - if we type module load foss`, this is the copy that will be loaded.
[yourUsername@clf1 ~]$ module load foss
[yourUsername@clf1 ~]$ module list
Currently Loaded Modules:
1) GCCcore/14.3.0 13) libfabric/2.1.0-GCCcore-14.3.0
2) zlib/1.3.1-GCCcore-14.3.0 14) PMIx/5.0.8-GCCcore-14.3.0
3) binutils/2.44-GCCcore-14.3.0 15) PRRTE/3.0.11-GCCcore-14.3.0
4) GCC/14.3.0 16) UCC/1.4.4-GCCcore-14.3.0
5) numactl/2.0.19-GCCcore-14.3.0 17) OpenMPI/5.0.8-GCC-14.3.0
6) XZ/5.8.1-GCCcore-14.3.0 18) OpenBLAS/0.3.30-GCC-14.3.0
7) libxml2/2.14.3-GCCcore-14.3.0 19) FlexiBLAS/3.4.5-GCC-14.3.0
8) libpciaccess/0.18.1-GCCcore-14.3.0 20) FFTW/3.3.10-GCC-14.3.0
9) hwloc/2.12.1-GCCcore-14.3.0 21) gompi/2025b
10) OpenSSL/3 22) FFTW.MPI/3.3.10-gompi-2025b
11) libevent/2.1.12-GCCcore-14.3.0 23) ScaLAPACK/2.2.2-gompi-2025b-fb
12) UCX/1.19.0-GCCcore-14.3.0 24) foss/2025b
[yourUsername@clf1 ~]$ gcc --version
gcc (GCC) 14.3.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This module system just loaded the GCC compilers into the environment, you can mix multiple compilers (if Intel C++ requires a recent GCC compiler for C++ compatability) it can be done. Falcon module system also have an automatic unloading capability, in case conflicts are detected when loading a new module.
Now lets switch to a new compiler. Either using:
[yourUsername@clf1 ~]$ module unload foss
[yourUsername@clf1 ~]$ module load foss/2021b
[yourUsername@clf1 ~]$ module list
Currently Loaded Modules:
1) GCCcore/11.2.0 12) UCX/1.11.2-GCCcore-11.2.0
2) zlib/1.2.11-GCCcore-11.2.0 13) libfabric/1.13.2-GCCcore-11.2.0
3) binutils/2.37-GCCcore-11.2.0 14) PMIx/4.1.0-GCCcore-11.2.0
4) GCC/11.2.0 15) OpenMPI/4.1.1-GCC-11.2.0
5) numactl/2.0.14-GCCcore-11.2.0 16) OpenBLAS/0.3.18-GCC-11.2.0
6) XZ/5.2.5-GCCcore-11.2.0 17) FlexiBLAS/3.0.4-GCC-11.2.0
7) libxml2/2.9.10-GCCcore-11.2.0 18) gompi/2021b
8) libpciaccess/0.16-GCCcore-11.2.0 19) FFTW/3.3.10-gompi-2021b
9) hwloc/2.5.0-GCCcore-11.2.0 20) ScaLAPACK/2.1.0-gompi-2021b-fb
10) OpenSSL/1.1 21) foss/2021b
11) libevent/2.1.12-GCCcore-11.2.0
[yourUsername@clf1 ~]$ gcc --version
gcc (GCC) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Alternatively using the module switch command.
[yourUsername@clf1 ~]$ module switch foss/2021b
The following have been reloaded with a version change:
1) FFTW/3.3.10-GCC-14.3.0 => FFTW/3.3.10-gompi-2021b
2) FlexiBLAS/3.4.5-GCC-14.3.0 => FlexiBLAS/3.0.4-GCC-11.2.0
3) GCC/14.3.0 => GCC/11.2.0
4) GCCcore/14.3.0 => GCCcore/11.2.0
5) OpenBLAS/0.3.30-GCC-14.3.0 => OpenBLAS/0.3.18-GCC-11.2.0
6) OpenMPI/5.0.8-GCC-14.3.0 => OpenMPI/4.1.1-GCC-11.2.0
7) OpenSSL/3 => OpenSSL/1.1
8) PMIx/5.0.8-GCCcore-14.3.0 => PMIx/4.1.0-GCCcore-11.2.0
9) ScaLAPACK/2.2.2-gompi-2025b-fb => ScaLAPACK/2.1.0-gompi-2021b-fb
10) UCX/1.19.0-GCCcore-14.3.0 => UCX/1.11.2-GCCcore-11.2.0
11) XZ/5.8.1-GCCcore-14.3.0 => XZ/5.2.5-GCCcore-11.2.0
12) binutils/2.44-GCCcore-14.3.0 => binutils/2.37-GCCcore-11.2.0
13) foss/2025b => foss/2021b
14) gompi/2025b => gompi/2021b
15) hwloc/2.12.1-GCCcore-14.3.0 => hwloc/2.5.0-GCCcore-11.2.0
16) libevent/2.1.12-GCCcore-14.3.0 => libevent/2.1.12-GCCcore-11.2.0
17) libfabric/2.1.0-GCCcore-14.3.0 => libfabric/1.13.2-GCCcore-11.2.0
18) libpciaccess/0.18.1-GCCcore-14.3.0 => libpciaccess/0.16-GCCcore-11.2.0
19) libxml2/2.14.3-GCCcore-14.3.0 => libxml2/2.9.10-GCCcore-11.2.0
20) numactl/2.0.19-GCCcore-14.3.0 => numactl/2.0.14-GCCcore-11.2.0
21) zlib/1.3.1-GCCcore-14.3.0 => zlib/1.2.11-GCCcore-11.2.0
We now have successfully switched from GCC 14.3.0 to GCC 11.2.0.
Some modules have (D) at the end of the module listing in avail. For example for python
[yourUsername@clf1 ~]$ module avail python
--------------------- /shared/apps/easybuild/x86_64/amd/zen4/modules/lang ----------------------
Python-bundle-PyPI/2023.06-GCCcore-12.3.0 Python/3.10.4-GCCcore-11.3.0
Python-bundle-PyPI/2023.10-GCCcore-13.2.0 Python/3.10.8-GCCcore-12.2.0-bare
Python-bundle-PyPI/2024.06-GCCcore-13.3.0 Python/3.10.8-GCCcore-12.2.0
Python-bundle-PyPI/2025.04-GCCcore-14.2.0 Python/3.11.3-GCCcore-12.3.0
Python-bundle-PyPI/2025.07-GCCcore-14.3.0 (D) Python/3.11.5-GCCcore-13.2.0
Python/2.7.18-GCCcore-11.2.0 Python/3.12.3-GCCcore-13.3.0
Python/3.9.6-GCCcore-11.2.0-bare Python/3.13.1-GCCcore-14.2.0
Python/3.9.6-GCCcore-11.2.0 Python/3.13.5-GCCcore-14.3.0 (D)
Python/3.10.4-GCCcore-11.3.0-bare
In this case Python/3.13.5-GCCcore-14.3.0 is the default package.
Using software modules in scripts
Create a job that is able to run
python3 --version. Remember, no software is loaded by default! Running a job is just like logging on to the system (you should not assume a module loaded on the login node is loaded on a compute node). Runningmodule purgeas first command in the job is recommended.
Loading a module by default
Adding a set of
module loadcommands to all of your scripts and having to manually load modules every time you log on can be tiresome. Fortunately, there is a way of specifying a set of “default modules” that always get loaded, regardless of whether or not you’re logged on or running a job. Every user has two hidden files in their home directory:.bashrcand.bash_profile(you can see these files withls -la ~). These scripts are run every time you log on or run a job. To aide with changes to the system, a.myenvfile is sourced by.bashrc. Adding amodule loadcommand to.myenvmeans that that module will always be loaded. Modify either your.myenvscripts to load a commonly used module like Python. Does yourpython3 --versionjob from before still needmodule loadto run?
Installing software of our own
Most HPC clusters have a pretty large set of preinstalled software. Nonetheless, it’s unlikely that all of the software we’ll need will be available. Sooner or later, we’ll need to install some software of our own.
Though software installation differs from package to package, the general process is the same: download the software, read the installation instructions (important!), install dependencies, compile, then start using our software.
As an example we will install the bioinformatics toolkit seqtk. We’ll first need to obtain the
source code from GitHub using git.
[yourUsername@clf1 ~]$ git clone https://github.com/lh3/seqtk.git
Cloning into 'seqtk'...
remote: Counting objects: 316, done.
remote: Total 316 (delta 0), reused 0 (delta 0), pack-reused 316
Receiving objects: 100% (316/316), 141.52 KiB | 0 bytes/s, done.
Resolving deltas: 100% (181/181), done.
Now, using the instructions in the README.md file, all we need to do to complete the install is to
cd into the seqtk folder and run the command make.
[yourUsername@clf1 ~]$ cd seqtk
[yourUsername@clf1 ~]$ make
gcc -g -Wall -O2 -Wno-unused-function seqtk.c -o seqtk -lz -lm
seqtk.c: In function ‘stk_comp’:
seqtk.c:399:16: warning: variable ‘lc’ set but not used [-Wunused-but-set-variable]
int la, lb, lc, na, nb, nc, cnt[11];
^
It’s done! Now all we need to do to use the program is invoke it like any other program.
[yourUsername@clf1 ~]$ ./seqtk
Usage: seqtk <command> <arguments>
Version: 1.2-r101-dirty
Command: seq common transformation of FASTA/Q
comp get the nucleotide composition of FASTA/Q
sample subsample sequences
subseq extract subsequences from FASTA/Q
fqchk fastq QC (base/quality summary)
mergepe interleave two PE FASTA/Q files
trimfq trim FASTQ using the Phred algorithm
hety regional heterozygosity
gc identify high- or low-GC regions
mutfa point mutate FASTA at specified positions
mergefa merge two FASTA/Q files
famask apply a X-coded FASTA to a source FASTA
dropse drop unpaired from interleaved PE FASTA/Q
rename rename sequence names
randbase choose a random base from hets
cutN cut sequence at long N
listhet extract the position of each het
We’ve successfully installed our first piece of software!
Key Points
Discover available software with
module availLoad software with
module load softwareNameUnload software with
module purgeThe module system handles software versioning and package conflicts for you automatically.