Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel2
typeflat
separatorpipe

Overview

Lmod is a powerful piece of software that ARCC leverages for managing dynamic user environments and access to complicated software stacks. Our configuration of Lmod uses a hierarchy for the organization of software that starts with compilers. Compilers are central to nearly all software installed on Teton. The supported compilers are Intel, GCC, and PGI. There are however some packages that are compiler-independent.

Searching for Modules

Module spider

The spider subcommand is a great search tool to find out if the software package has been installed as a system package. From the command line, run the module spider command to output a list of the available software for the entire system:

...

There are opportunities to use regular expressions to search for modules. See output from module help for more information.

Example

The general process for all apps you might want to load is:

...

Code Block
# Find versions of samtools
[@blog2 ~]$ module spider samtools
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  samtools:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     Versions:
        samtools/1.14
        samtools/1.16.1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  For detailed information about a specific "samtools" package (including how to load the modules) use the module's full name.
  Note that names that have a trailing (E) are extensions provided by other modules.
  For example:
     $ module spider samtools/1.16.1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# Does samtools/1.16.1 have any dependencies that need to be loaded first?
[@blog2 ~]$ module spider samtools/1.16.1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  samtools: samtools/1.16.1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    You will need to load all module(s) on any one of the lines below before the "samtools/1.16.1" module is available to load.
      arcc/1.0  gcc/12.2.0
    Help:
      SAM Tools provide various utilities for manipulating alignments in the
      SAM format, including sorting, merging, indexing and generating
      alignments in a per-position format

# Check what is already loaded?
# In this arcc/1.0 is loaded by default whenever a new session is started.
# But gcc/12.2.0 is missing.
[@blog2 ~]$ ml
Currently Loaded Modules:
  1) slurm/latest (S)   2) arcc/1.0 (S)   3) singularity/3.10.3
  Where:
   S:  Module is Sticky, requires --force to unload or purge

# You can load gcc/12.2.0 on the same line as samtools/1.16.1, but it must be loaded before it, i.e. it appears to the left of it.
[@blog2 ~]$ module load gcc/12.2.0 samtools/1.16.1

# If you'd tried the following i.e. load samtools before gcc, then you'll see the following error:
[@blog2 ~]$ module load samtools/1.16.1 gcc/12.2.0
Lmod has detected the following error:  These module(s) or extension(s) exist but cannot be loaded as requested: "samtools/1.16.1"
   Try: "module spider samtools/1.16.1" to see how to load the module(s).

Module avail

Additionally, using the avail subcommand will show a table of available modules that are capable of being loaded into the current environment.

Code Block
 $ module avail 

Keyword search

Searching by keyword is also an option:

Code Block
 $ module keyword slurm 

Information About A Module

The help subcommand will display information regarding the help section of the module and if there is any additional information relating to the installation of the software that is pertinent.

Code Block
 $ module help slurm 

Loading / Unloading Modules

Loading modules and unloading modules are how Lmod dynamically changes the environment on the cluster. To access software available through modules, the specific module must be loaded. There are several modules that are loaded automatically on the system as defaults. They include arccslurm, and singularity.

...

It is important to note that when loading modules that are dependent on a compiler and the compiler module is unloaded, Lmod will deactivate the dependent modules until the correct compiler is loaded or that an appropriate compiler is loaded that has alternative versions of the software available.

Module Collections

Module collections are a great method to keep certain software stacks in order and switch between them regularly and quickly. They allow for all modules to be loaded, then saved, and recalled later for use.

...

Code Block
 $ module disable NAME 

Automatically Loading Modules

Some core modules are automatically loaded when logging in. On Teton, these automatically-loaded modules do not include a compiler module such as gcc or intel that start the hierarchy for the organization of other modules, since for different users, different choices of default compiler would make sense. However, a user can customize the automatically-loaded modules by adding module load commands to the .bashrc file in their home directory.

Examples

To automatically load one of the compilers when logging in, append the following lines to your .bashrc file:

For gcc
Code Block
module load swset/2018.05
module load gcc/7.3.0
For intel
Code Block
module load swset/2018.05
module load intel/18.0.1

To see if different versions of the compilers are available, and which swset version a particular compiler version depends on, use the module avail and module spider commands described above on this page.

Module shorthand with ml

Lmod provides a shorthand interface to the modules command as ml. The command is quite powerful and allows quick access to the modules system. The default action of ml is to list the loaded modules. Providing a module as an argument will load the module.

...

The ml command is very useful and should be explored.

Requesting Software with Module

All software requested on ARCC HPC clusters generally comes with a module file as the primary method of access. If the software is deemed either too restrictive or is better suited to be offered from the Operating System's package manager, it will be noted in the software request.

Installing Software Yourself on an HPC Cluster

Creating Private Modules (Advanced)

Using Miniconda to Install Software