Modules
Table of contents
Software installed centrally on Ada is made available through “modules”. Loading a module adds that software to your environment (e.g., to your PATH) so you can run it. Modules make it possible to offer several versions of the same software side by side, so you can choose the version your project needs.
Common module commands
| Task | Command |
|---|---|
| List available modules | module avail |
| Load a module | module load software_name/version, e.g., module load R/4.4.2 |
| List loaded modules | module list |
| Unload a module | module unload software_name/version |
| Unload all modules | module purge |
| Show what a module does | module show software_name/version |
Using modules in job scripts
SLURM jobs inherit the modules loaded when you submit the job. To make your jobs reproducible, load the modules your job needs inside the job script itself, e.g.,
#!/usr/bin/env bash
#SBATCH --partition=short
#SBATCH --time=01:00:00
module load R/4.4.2
Rscript my_analysis.R
Enabling Lmod
Lmod is a beta feature that is enabled on an opt-in basis.
Lmod is a newer module system that is widely used at other HPC centers and will eventually replace the existing system on Ada. It uses the same module commands, but adds features such as module spider for searching for software. Much of the newer software on Ada is only available through Lmod, including:
- Several versions of R (
r) and the GCC compilers (gcc) - Miniforge (
miniforge) for managing conda environments - The Globus Connect Personal client used to transfer data with Globus
Existing modules remain available with Lmod. To enable Lmod for your account, create an empty .lmod file in your home directory:
touch ~/.lmod
and then log out and back in. If Lmod is active, you should see version information similar to:
[ada ~]$ module --version
Modules based on Lua: Version 9.3.1 2026-08-21 23:48 +01:00
https://lmod.readthedocs.io
To return to the previous module system, delete the file (rm ~/.lmod) and log in again.
Finding software with Lmod
module avail only lists some modules (e.g., those built with other compilers are hidden until you load that compiler). Use module spider to search everything:
| Task | Command |
|---|---|
| Search for software by name | module spider r |
| Show the available versions and how to load one | module spider r/4.6.1 |
| Search descriptions and keywords | module keyword statistics |
Saving a set of modules
Lmod can save the modules you currently have loaded as a “collection” and restore them later. A collection named default is restored automatically when you log in.
module load gcc miniforge
module save # saves as "default"
module restore # reloads the saved modules