Finding Software (on Mahuika)

Environment Modules

NeSI uses environment modules to manage installed software.

Using the module command you can:

  • View loaded modules:
    module list
    
  • List all available modules
    module avail
    
  • Load a module:
    module load Python/2.7.14-gimkl-2017a
    
  • Switch out a loaded module for a different version:
    module switch Python/2.7.14-gimkl-2017a Python/3.6.3-gimkl-2017a
    

Lmod on Mahuika

As on Pan, Mahuika uses an enhanced version of modules called Lmod .

Lmod extends the basic environment modules by adding simple shortcuts and a more powerful search capability. The ml shortcut can be used in place of module. With Lmod you can:

  • View loaded modules:
    ml
    
  • List all available modules:
    ml spider
    
  • Use “spider” to search for modules, e.g. “Python” modules:
    ml spider Python
    
  • Load a module:
    ml Python/2.7.14-gimkl-2017a
    
  • Prefix a module with “-“ to unload it, e.g. switch from Python 2 to Python 3:
    ml -Python/2.7.14-gimkl-2017a Python/3.6.3-gimkl-2017a
    
  • To get a fresh environment, we recommend that you log out and log in again. By logging out and logging in again you will revert to not only the default set of modules, but also the default set of environment variables.

Further information can be found in the online User Guide for Lmod.

Create your own modules

You can create personalised module environments, which can load modules and set up environment variables. For example, you could define a module ~/modulefiles/MyEnv as the following:

#%module

conflict MyOtherEnv
module load CMake
module load netCDF/4.4.1-gimkl-2017a

setenv CFLAGS "-DNDEBUG"
prepend-path PATH ~/tools/bin

To make that directory available to the module environment you need to specify:

module use ~/modulefiles

which you can also define in your ~/.bashrc.

To load that environment, you simply load your module:

module load MyEnv
Was this article helpful?
0 out of 0 found this helpful