Skip to content

Load Software with Modules

To facilitate the diverse work that happens on the YCRC clusters we compile, install, and manage software packages separately from those installed in standard system directories. We use EasyBuild to build, install, and manage packages. You can access these packages as Lmod modules. The modules involving compiled software are arranged into hierarchical toolchains that make dependencies more consistent when you load multiple modules.


Avoid loading Python or R modules and conda environments. This will almost always break something.

Find Modules

All Available Modules

To list all available modules, run:

module avail

Search For Modules

You can search for modules or extensions with spider and avail. For example, to find and list all Python version 3 modules, run:

module avail python/3

To find any module or extension that mentions python in its name or description, use the command:

module spider python

Get Module Help

You can get a brief description of a module and the url to the software's homepage by running:

module help modulename/version

If you don't find a commonly used software package you require, contact us with a software installation request. Otherwise, check out our installation guides to install it for yourself.

Load and Unload Modules


The module load command modifies your environment so you can use the specified software package(s).

  • This command is case-sensitive to module names.
  • The module load command will load dependencies as needed, you don't need to load them separately.
  • For batch jobs, add module load command(s) to your submission script.

For example, to load Python version 3.8.6 and BLAST+ version 2.11.0, find modules with matching toolchain suffixes and run the command:

module load Python/3.8.6-GCCcore-10.2.0 BLAST+/2.11.0-GCCcore-10.2.0

Lmod will add python and the BLAST commands to your environment. Since both of these modules were built with the GCCcore/10.2.0 toolchain module, they will not load conflicting libraries. Recall you can see the other modules that were loaded by running module list.

Module Defaults

As new versions of software get installed and others are deprecated, the default module version can change over time. It is best practice to note the specific module versions you are using for a project and load those explicitly, e.g. module load Python/3.8.6-GCCcore-10.2.0 not module load Python. This makes your work more reproducible and less likely to change unexpectedly in the future.


You can also unload a specific module that you've previously loaded:

module unload R

Or unload all modules at once with:

module purge

Purge Lightly

module purge will alert you to a sticky module that is always loaded called StdEnv. Avoid unloading StdEnv unless explicitly told to do so, othewise you will lose some important setup for the cluster you are on.

Module Collections

Save Collections

It can be a pain to enter a long list of modules every time you return to a project. Module collections allow you to create sets of modules to load together. This method is particularly useful if you have two or more module sets that may conflict with one another.

To save a default collection, load all of your desired modules and then run:

module save

To save a named collection, add a name to your save command after loading your modules:

module save environment_name

Restore Collections

To load your default collection, run:

module restore

To load a named collection add its name to your command:

module restore environment_name

To modify a collection: restore it, make the desired changes by loading and/or unloading modules, then save it to the same name.

List Collections

To get a list of your collections, run:

module savelist

Environment Variables

To refer to the directory where the software from a module is stored, you can use the environment variable $EBROOTMODULENAME where MODULENAME is the name of the module in all caps with no spaces. This can be useful for finding the executables, libraries, or readme files that are included with the software:

[netid@node ~ ]$ module load SAMtools
[netid@node ~ ]$ echo $EBVERSIONSAMTOOLS
[netid@node ~ ]$ ls $EBROOTSAMTOOLS
bin  easybuild  include  lib  lib64  share
[netid@node ~ ]$ ls $EBROOTSAMTOOLS/bin
ace2sam             maq2sam-short           md5fa               r2plot.lua             vcfutils.lua       md5sum-lite             wgsim         samtools       plot-ampliconstats  
maq2sam-long        plot-bamstats

Further Reading

You can view documentation while on the cluster using the command:

man module

There is even more information at the offical Lmod website.

Last update: February 4, 2021