Modules

AnchorModules

On Keeneland, modules are used to manage the environment, for example, changing PATH or LD_LIBRARY_PATH to use different applications or libraries. The most important options are:

module avail <str>
Show available modules starting with str. If str is omitted, show all available modules.
module list
Show all currently loaded modules
module load <mod1>
Load module <mod1>
module unload <mod1>
Unload module <mod1>. That is: undo everything that loading the module had done. (In some cases, if you change some of the things that it did, it can cause issues).
module swap <mod1> <mod2>
Unload <mod1> then load <mod2>
module show <mod1>
Show what <mod1> does. In particular, many modules will set environment variables that you can use in your makefile, this command shows what they are.

Modules are implemented as a shell function which is defined for login shells. If it is not working in a particular context, you may simply need to define the function:

source /opt/Modules/default/init/bash

AnchorNotes

  • For each compiler, there is a "Programming Environment" module: PE-intel, PE-pgi, and PE-gnu. These should load the appropriate compiler module, as well as the appropriate version of the MPI library. Other libraries may have different versions for each Programming Environment. It is best practice to load the PE-* module first, and then load any library modules.
  • Some have reported problems with the PGI modules conflicting with other things (e.g., problems with libnuma).