Lmod Modules

Description

Lmodis a software package which allows you to dynamically modify your environment on MPI and HTC clusters. Similarly to Environment Modules, the module files contain relevant information for setting up PATH, LD_LIBRARY_PATH, MANPATH, etc. Lmod is slightly different than Env Mod and I will highlight the important things here.

Browsing the installed software packages

Simply typing module spider will allow you to view all of the packages currently installed. If you are looking for a specific package try module spider <package_name>.

Steps for loading a package

I will use the VASP package as an example on MPI.

  1. module spider vasp
--------------------------------------------------------------------------------------------------------------------------
  vasp:
--------------------------------------------------------------------------------------------------------------------------
     Versions:
        vasp/5.4.1
 
     Other possible modules matches:
        vasp-vtst
 
--------------------------------------------------------------------------------------------------------------------------
  To find other possible module matches do:
      module -r spider '.*vasp.*'
 
--------------------------------------------------------------------------------------------------------------------------
  To find detailed information about vasp please enter the full name.
  For example:
 
     $ module spider vasp/5.4.1
--------------------------------------------------------------------------------------------------------------------------

One can see we have multiple versions of VASP installed. I am looking for vasp/5.4.1

  1. module spider vasp/5.4.1
[bmooreii@login0a ~]$ module spider vasp/5.4.1
 
--------------------------------------------------------------------------------------------------------------------------
  vasp: vasp/5.4.1
--------------------------------------------------------------------------------------------------------------------------
 
     Other possible modules matches:
        vasp-vtst
 
    This module can only be loaded through the following modules:
 
      intel/15.0.3  mvapich2/2.2
      intel/15.0.3  openmpi/1.10.2
 
--------------------------------------------------------------------------------------------------------------------------

Okay, looks like I have another option. I want the openmpi version.

  1. module load intel/15.0.3 openmpi/1.10.2 vasp/5.4.1

Viewing your loaded packages

Simply type module list. If you would like to unload a module, module unload <module_name>. If you would like to purge (unload) all modules, module purge

Writing your own module files

The Lmod documentation has a nice description here. You will need to add the location to the module path using module use <PATH_TO_YOUR_MODULES>.