Another way to manage your user environment is through environment modules. With a module system, you select which packages, software, and compilers are loaded or active, which consequently affects your environment variables and what commands you are able to perform. The TACC Lmod Environmental Modules System is a software system designed for exactly this purpose.

Lmod provides a convenient set of commands to set up a user's environment dynamically through modulefiles prepared especially for a given system like Frontera. By loading a module, the corresponding pre-built package is made active by changing the values of variables such as $PATH. Any package-specific environment variables are also set to appropriate values.

Whatever changes are made by loading a module can be reversed cleanly and without errors by unloading the module. Moreover, Lmod guarantees that the whole group of packages that are currently loaded are consistent and compatible with each other. This removes much of the burden of application installation, configuration, and management from the user.

Lmod has been incorporated into OpenHPC and as a result is present on many High Performance Computing (HPC) systems. A complete guide to the Lmod system is the User Guide for Lmod, which is recommended as background reading if you have not used modules before. Here we will cover an abbreviated set of commands for reference.

Basic Commands
Basic Commands.
Command Description
module list List all modules currently loaded
module avail Show which modules are available to be loaded
module reset Return to initial, default set of modules loaded
module load <package> Load a package
module unload <package> Unload a package
module swap <package1> <package2> Change from <package1> to <package2> loaded
module help <package> Access help for a modulefile
module whatis <package> Show a description of the module
module spider List all modules, even those not available to load
module spider <package> List more details about a package

The above commands can be shortened to just enough letters to make it clear which one is intended, e.g., module av. Also, a package name can include a specific version number; omitting the version number may result in a default version being loaded. For example, to ensure you are loading version 19.1.1 of the Intel compilers and libraries, you would enter

$ module load intel/19.1.1

The module command also provides modulefile name completion, similar to the bash shell. For example, by hitting the tab key after entering "19.1" in the above command, the modulefile name will be completed with ".1" (unless that module is already loaded). If tab completion does not occur because multiple valid names exist, hitting tab twice more will list all the possible completions of the command.

The ml Command

The ml command is a shorthand command to several Lmod commands, and usage determines which command is executed. Below are a few examples of usage.

To run a module list, simply enter:

$ ml

To load <package>:

$ ml <package>

To unload <package>:

$ ml -<package>

Please note that there is no man page for the ml command because it is implemented as a bash function via the shell environment. To get help with the command, execute ml --help.

The sanitytool Module

TACC developed an in-house software tool to be used for account-level diagnostics on the Frontera system for use when you encounter unexpected behavior. The software will detect common issues and walk you through the appropriate fixes. Once this module is loaded by running ml sanitytool, you can execute the command sanitycheck. For more information, see TACC's documentation or execute module help sanitytool.

 
©   Cornell University  |  Center for Advanced Computing  |  Copyright Statement  |  Inclusivity Statement