Modules

Module Commands

ARSC HPC system have the modules package installed. This tool allows a user to quickly and easily switch between different versions of a package (e.g. compilers). The module package sets common environment variables used by applications such as PATH , MANPATH , LD_LIBRARY_PATH , etc. The PrgEnv-pgi module is loaded by default in the shell skeleton files for new accounts. The PrgEnv-pgi module loads the PGI compilers and MPI compiler wrappers into your PATH. Alternately, the PrgEnv-gnu and PrgEnv-cray modules are available for users who prefer to use the MPI compiler wrappers with the GNU and Cray compilers.

Command Example Use Purpose
module avail module avail lists all available modules for the system.
module load pkg module load PrgEnv-pgi loads a module file from the environment
module unload pkg module unload PrgEnv-pgi unloads a module file from the environment
module list module list displays the modules which are currently loaded.
module switch old new module switch PrgEnv-pgi PrgEnv-gnu replaces the module old with module new in the environment
module purge module purge unload all module settings, restoring the environment to the state before any modules were loaded.
module show module module show PrgEnv-pgi display information about a module file, including most of the environment changes that it provides.

See "man module" for more information on the module command. See news modules for more information on using modules at ARSC.

Common Usage

Typically modules only need to be loaded on login. To change the default modules, modify your .cshrc (csh/tcsh users) or .kshrc (ksh) or .bashrc (sh/bash). Note that only one PrgEnv should be loaded at any given time. For example:

#### # Run common module commands # # load the PrgEnv-pgi module # (uses PGI compilers for MPI environment) module load PrgEnv-pgi # alternately load the PrgEnv-gnu module # (uses GNU compilers for the MPI environment) #module switch PrgEnv-pgi PrgEnv-gnu # list currently loaded modules module list

Creating Your Own Modules

It is possible to create customized modules just for your own use. However, this requires additional familiarity with the module system, as well as the Tool Command Language (tcl). For more details, please run

man modulefile
Back to Top