Find and load software
Mjolnir provides research software through Environment Modules. You do not install shared tools yourself — you load the ones already available, which puts them on your PATH for the current shell or job.
Note Mjolnir uses Environment Modules (currently 4.5.2), not Lmod. Commands you may have seen elsewhere, such as module spider, do not exist here. The commands on this page are the ones this system supports.
Find what is available#
List everything installed:
module availThat is a long list. To search for something specific:
module avail samtoolsYou can also search module descriptions by keyword:
module apropos alignmentTo see what a module actually does before loading it — including the version and what it changes in your environment:
module whatis samtools
module display samtoolsFor the current installed inventory without logging in and running module avail yourself, browse the Mjolnir Analytics Software Catalog — it lists what's actually installed and is kept current automatically, rather than as a hand-maintained page in this documentation.
Load it#
module load samtoolsLoading without a version gives you the default version. To pin a specific one — which you should do for work you intend to repeat — name it explicitly:
module load samtools/1.21Check what you have loaded, and confirm the tool is really the one you expect:
module list
which samtoolsTip which is the quickest way to confirm a load worked. If it returns nothing, the module did not load, and the rest of your commands will fail in confusing ways.
Change or clear your environment#
module unload samtools # remove one module
module switch samtools/1.21 # replace a loaded module with another version
module purge # remove everything currently loadedmodule purge is useful when tools conflict, or when you want to start from a known-clean state.
Put the modules in your job script#
This is the part that matters most, and it is where reproducibility is won or lost.
Loading a module in your terminal does not load it in your job. A batch job starts in its own environment on a different machine. If the job script does not load what it needs, the job will fail with "command not found" even though the command works perfectly in your shell.
Always load modules inside the script:
#!/bin/bash
#SBATCH --job-name=align
#SBATCH --partition=cpuqueue
#SBATCH --qos=normal
#SBATCH --nodes=1
#SBATCH --cpus-per-task=4
#SBATCH --mem-per-cpu=2G
#SBATCH --time=02:00:00
#SBATCH --output=align-%j.out
module purge
module load samtools/1.21
samtools --versionImportant Starting with module purge makes the job independent of whatever happened to be loaded in the shell you submitted from. Two people running the same script then get the same environment.
Pinning versions (samtools/1.21 rather than samtools) protects your results from a default version changing later.
Conda environments#
Much of the shared software on Mjolnir is packaged as Conda environments behind the scenes, but you do not need to interact with Conda to use it — module load is the supported way in.
If your work genuinely needs a Conda environment of your own, the workflow depends on how your project is set up and where the environment should live.
Note Personal Conda environments can consume a lot of space and are easy to place somewhere unsuitable. Before creating one, ask through Getting help where it should live for your project, rather than defaulting to your home directory — home is capped at 100 GB. See also Where should my files go?.
"Setting locale failed" warnings#
Perl (and some other tools) can print a locale warning — something like perl: warning: Setting locale failed — when the shell's locale environment variables (LANG, LC_ALL, and similar) reference a locale that isn't available in the environment the command is actually running in. It's usually cosmetic rather than a sign the command failed: check what your locale variables are set to, and prefer a UTF-8 locale that's actually available on the system you're running on rather than one carried over from a different machine or a local .bashrc.
When the software you need is not there#
If module avail does not show what you need, see Request software.
Related#
- Submitting jobs — putting modules into a real job
- Interactive jobs — testing a module on a compute node
- Why did my job fail? — "command not found" and similar
