Use modules to manage your software environment on IU research supercomputers

On this page:


Big Red 200 and Quartz use the Lmod module management system.

Each module contains commands for handling dependencies and setting environment variables (for example, PATH, LD_LIBRARY_PATH, and MANPATH) that are needed to run a particular application (or a particular version of an application) in your user environment. You can load and unload modules to automatically modify environment variables as needed when switching between software packages.

Following are some commonly used Lmod commands:

Command Action
module avail List all software packages available on the system.
module avail package List all versions of package available on the system; for example, module avail python.
module list List all packages currently added to your user environment.
module load package Add the default version of the package to your user environment; for example, module load intel.
module load package/version Add the specified version of the package to your user environment; for example, module load intel/18.0.2.
module unload package Remove the specified package from your user environment.
module swap package_A package_B Swap the loaded package (package_A) with another package (package_B). This is synonymous with module switch package_A package_B.
module show package Show the changes, such as environment variables set and library paths added, that loading the specified module (package) makes to your user environment. This is synonymous with module display package.

For more about the module command in Lmod, see User Guide for Lmod.

About module hierarchies in Lmod

Due to Lmod's use of module hierarchies, when you invoke module avail in Lmod, it will by default show only those modules that are compatible with the modules that are currently loaded in your environment.

For example, on Quartz, GNU is the default compiler environment. If you run module avail, Lmod will list only GNU-compatible modules and modules that don't have any compatibility or dependency characteristics. To find modules that depend on MVAPICH, you first must load a MVAPICH module.

To search for all modules that are available, regardless of compatibility, use the Lmod module spider command, which lists all the modules available on the system. To search for a specific module (package), use module spider package.

Make permanent changes to your user environment

Using Lmod, you can save your customized user environment so that it loads every time you start a new session.

  1. Load the modules that you want as part of the default group, and remove any modules that are not needed.
  2. Run the command module save.
  3. Run the command module list.

This exact set of modules will now be loaded by default at login. To change this in the future, add or remove modules to the environment and run module save to create a new default set of modules.

For additional options and possibilities, see the "User Collections" section of the User Guide for Lmod.

This is document bcwy in the Knowledge Base.
Last modified on 2023-12-17 07:03:04.