Difference between revisions of "Software Modules Lmod"

From bwHPC Wiki
Jump to: navigation, search
(Complete unloading of all modulefiles)
(Complete unloading of all modulefiles)
Line 30: Line 30:
 
$ module purge
 
$ module purge
 
</pre>
 
</pre>
Beware that the environment prior entering first "module load" command and after applying "module purge" must not be always same. 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.
+
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? ===
 
=== What is Loaded Now? ===

Revision as of 13:41, 27 April 2020

Software Module System - Lmod

1 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.

2 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.

2.1 Which shells supports module commands?

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

2.2 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.

2.2.1 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

2.2.2 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.

2.2.3 What is Loaded Now?

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

$ module list

2.2.4 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.

2.2.5 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

2.3 JUSTUS 2 specific configuration of module systems