2. Module environment

Environment modules provide a convenient way to dynamically change the user's environment so that different compiler suites and application versions can be used more easily. Modules system modifies the environment variables of the user's shell so that the correct versions of executables are in the path and the linker can find the correct versions of the libraries needed. Environment modules system can also define software specific environment variables if needed.

In Sisu, the program execution and development environment is managed by using the environment modules package developed by the Environment Modules Project (http://modules.sourceforge.net/). Note: Taito uses a different environment modules system called Lmod.

The basic syntax of the module commands is:

module sub-command module-file-name

 

The most commonly used module commands are listed in Table 2.1. Loading and unloading modules files is done with the module sub-commands load and unload. For example, to use Gromacs software you should first execute the command:

module load gromacs
All available modules are listed with the command:
module avail
Currently loaded modules are listed with the command:
module list
The environment changes induced by a particular module as well as full path of modulefile(s) are shown with the command:
module show PrgEnv-cray

The example above displays the information about the default version of Cray programming environment.

Changing from the Cray programming environment to GNU programming environment, for example, is accomplished with the command:

module swap PrgEnv-cray PrgEnv-gnu

 


Table 2.1 Most frequently used Module sub-commands

Module command Description
module load module_name Load module into the shell environment.
module unload module_name Remove module from the shell environment.
module show module_name Display information about a modulefile.
module avail List all available modulefiles.
module list List loaded modules.
module purge Unload all loaded modulefiles.
module help module_name Prints information about a module or, if no argument is given, form the module sub-commands.
module swap module1 module2 Switch loaded modulef1 with module2.

 

    Previous chapter     One level up     Next chapter