Environment Modules

What are Environment Modules?

The only supported way of running applications, compiler suites, and libraries is via the “module” command.

The Environment Modules package is a piece of software that allows you to dynamically modify your user environment by using portable “modulefiles”.

Each module file contains the information needed to configure your shell for a given application.  After the module is loaded for a particular software, it will set your PATH, MANPATH, LD_LIBRARY_PATH, and any other needed environment variables to use the software.

Every user can adjust the environment for each session with the module command.  Simply typing “module” will provide a list of subcommands:

avail – list available modules
load – loads a module
unload – unloads a module
purge – unloads all modules from your environment
list – list modules currently loaded in your environment
show – shows environment changes that will be made
initadd – adds module to your default environment

The module command can be executed at the command line, inserted into job scripts, or added to your default environment using the “initadd” command.

Let’s get started…

To see a list of available applications:

$ module avail

To see a list of your currently loaded modules:

$ module list

Notice that you will have some modules loaded required for operation of the system by default.