Using Lmod

Lmod is the environment manager on the cluster. The Mill has many pieces of software installed, and often multiple versions of a given piece of software. Lmod enables you, as the end user, to load the specific software versions that you need for your research.

Each time you log into the cluster, you will have a blank environment. The following sections will help you find software that is installed on the Mill and load it so that it is available to use. Please note that this means your job scripts will also run on a blank environment - this means your job submission scripts should start by loading the appropriate modules for the job to run!

Basic Commands

The basic command for lmod is module. To search for software on the cluster, the spider command can be used

module spider *search term*

In the following example, a search for the software LAMMPS is run using module spider lammp. The output is shown below.

Terminal screenshot showing commands related to "module spider lammp" on a system. Displays package versions and loading instructions. Professional tone.

There are several versions of LAMMPS available as well as a version that has the python interface available. The versions are listed alphabetically. A particular version can be loaded using

module load *name/version*

If you accidentally load the wrong version, the unload command can be used in the same manner as load to remove it

module unload *name/version*

Collections

Lmod supports collections, which simplify the process of loading many modules at the same time. Collections are saved in a hidden file in your home directory and are also available to any jobs you run. To make one, begin by loading all the modules you want. Once you have everything loaded, verify that your environment is as you expect using

module list

which will display all of the currently loaded modules. If the output is correct, you can use

module save {name}

to save a collection named *name* containing everything you currently have loaded. You can inspect your collections by either opening the hidden lmod files in your home directory or with

module savelist

which will display the name of all available collections. To use a collection in a session or in a SLURM job, the collection can be loaded with

module restore {name}