Software Modules Lmod

From bwHPC Wiki
Jump to navigation Jump to search

Software Module System - Lmod

PREFACE

This guide describes the software environment and tools used to run applications on JUSTUS 2 system. It is intended as a general overview and introduction to the software system management on JUSTUS 2 for new users as well as for experienced users coming from JUSTUS 1 system.

MINIMALISTIC DESCRIPTION

JUSTUS 2 system uses Lmod (the Lua Based Module System https://slurm.schedmd.com/faq.html) environment management package to support dynamic modification of the user environment via modulefiles. Each modulefile contains information needed to configure the shell for a particular application. To make major changes in your user environment, such as switching to a different compiler, use the appropriate Modules commands to select the desired modulefiles.

Which shells supports module commands?

So far Bash is only supported shell on JUSTUS 2 to interpret module commands.

Most basic tasks for Module System

Lmod offers more than 25 sub-commands plus various options to manage the modulefile system installed on JUSTUS 2. See, e.g. output of "module --help" command. Large majority of users will use only couple of them. A complete list of module sub-commands can be displayed by entering "module --help" command.

Loading and unloading modulefiles

To load and unload a module of a specific package use "module load category/package" and "module unload category/package", respectively. Thus, e.g, to load default version of VASP which belongs into category chem, enter

$ module load chem/VASP

and for unloading of the package use

$ module unload chem/VASP

Complete unloading of all modulefiles

To clean the environment from all entries set by lmod use "module purge" command.

$ module purge

Beware that the "module purge" does not always restore the environmental variables that existed prior entering first "module load" command. I.e., some of the entries in PATH, or environmental variables, etc. originally existed in the environment might be cleaned by "module purge" if those would be duplicates of the variables set by any modulefiles that was loaded.

What is Loaded Now?

To see which modules are currently loaded in your environment, enter the command "module list".

$ module list

Which modulefiles/software is available?

To see what modulefiles are available on JUSTUS 2, you can enter the following command:

$ module avail

or alternatively

$ ml av

which comes with lmod to save typewriting.

Module specific help

To access the module specific help, use the "module help" command. For example, to see the module help associated with the default VASP module, enter this command:

$ module help chem/vasp

JUSTUS 2 specific configuration of module systems