Software Modules (Lmod)¶
The new HPC cluster uses Lmod (Lua-based) for managing software environments instead of the old Tcl-based Environment Modules.
Lmod is backward-compatible with classic Tcl modulefiles and adds modern features: automatic conflict handling, hierarchical visibility (compiler → MPI → libs), powerful search, and saved collections.
Shared module directory is not preconfigured in nodes!
You must include module use /share/apps/Modules/modulefiles in you sbatch script before module load ...!
Using modules with slurm¶
Set the required module in the sbatch shell:
module use /share/apps/Modules/modulefiles # set shared module directory
module purge # unload all modules if left from previous job
module load pggb # load module for PGGB pipeline
All required programs or libraries are automatically added within the main module.
In tis example, the pggb module will also load all necessary modules for PGGB program to work: wfmash, seqwish, smoothxg, odgi, gfaffix, bcftools, vg and multiqc.
Reason why I chose Lmod — and not Tcl “Environment Modules”¶
- Safer environments: prevents mixing incompatible toolchains via families (e.g., one compiler/MPI at a time).
- Hierarchical trees: you see only modules valid for the compiler/MPI you’ve loaded.
- Fast discovery:
module spiderfinds packages anywhere in the tree, even when not currently visible. - Profiles/collections: save and restore working module sets.
- Back-compatible: loads existing Tcl modulefiles; you can migrate to Lua gradually.
Quick Start commands:¶
module --version # should print an Lmod version
module avail # list visible modules
module spider <name> # find modules even if not visible
module show <name> # preview environment changes
module load <name> # load a module
module purge # unload everything
module whatis <name> # show program short description
TL;DR
Use the ml shorthand:
ml av # list visible modules
ml spider bwa # search the entire tree
ml load bwa
ml save default