Environment Modules

The Environment Modules package provides for the dynamic modification of a user's environment via modulefiles.
Each modulefile contains the information needed to configure the shell for an application. Once the Modules package is initialized, the environment can be modified on a per-module basis using the module command which interprets modulefiles. Typically modulefiles instruct the module command to alter or set shell environment variables such as PATH, MANPATH, etc. modulefiles may be shared by many users on a system and users may have their own collection to supplement or replace the shared modulefiles.
Modules can be loaded and unloaded dynamically and atomically, in an clean fashion. All popular shells are supported, including bash, ksh, zsh, sh, csh, tcsh, as well as some scripting languages such as perl and python.

Quick Examples

  • To list all installed modules issue the command module avail
  • To load a module issue the command module load [Packagename] as in module load mpi/intel/5.1.3.210 which loads a specific MPI environment.
  • To see which modules currently are loaded in your session issuemodule list
  • To unload a module issue the command module unload[Packagename]

    Notes

    When submitting jobs to the queuing system they are executed as individual logins on the compute nodes and thus do not directly inherit the environment and modules loaded form the submitting session. Modules needed for Job execution have to be explicetly loaded in the Job script.
    Some modules are Metamodules loading other modules. Typicaly the modules for the Intel Compiler suites will load a set of modules as in:
    % module load intel-cluster-studio-2016
    % module list
    Currently Loaded Modulefiles:
      1) intel/cce/2016.3.210        2) intel/mkl/2016.3.210        3) intel/tbb/2016.3.210        4) intel-cluster-studio-2016
    

    See also

    man module
    Last modified December 2016 by Dr. Bernhard L. Winkler