Environment and Modules

Login Shell

The default shell is /bin/bash

echo $SHELL


Users are not allowed to change the Login Shell but they can write preferred path definitions, aliases and functions in the ~/.bashrc file.

Environment Variables

Environment Variables are a set of dynamic named values that contain data used by one or more applications. They are variables with a name and a value. The value of an environmental variable can for example be the location of all executable files in the file system, the default editor that should be used, or the system locale settings.

To see the variables in your environment use:


Environment Modules

ARIS uses the environment module approach to manage the user environment for different software, library or compiler versions. The Environment Modules package provides for the dynamic modification of a user’s environment via module files. The distinct advantage of modules approach is that application related environment variables such as PATH, LD_LIBRARY_PATH etc. is managed by environment modules. Users just load and unload modules to control their environment.

Module Usage

The module command uses sub-commands to perform different actions.

To list all available modules use: module avail

module avail

------------------------- /apps/modulefiles/compilers -------------------------
binutils/2.25      gnu/4.9.3          gnu/5.2.0          pgi/15.5
gnu/4.9.2(default) gnu/5.1.0          intel/15.0.3

------------------------- /apps/modulefiles/parallel --------------------------
intelmpi/5.0.3      openmpi/1.8.5/intel padb/3.3
------------------------- /apps/modulefiles/libraries -------------------------
atlas/3.11.34(default)          netcdf/3.6.3/intel

----------------------- /apps/modulefiles/applications ------------------------
abinit/7.10.4(default)          namd/2.10/hybrid/normal

To load a module, for example the GNU 5.1.0 compiler suite use: module load

module load gnu/5.1.0

gcc --version
gcc (GCC) 5.1.0

default module

Please notice that each module has a name and version. Invoking them by name implies loading the default module version.

module load gnu

gcc --version
gcc (GCC) 4.9.2

To check loaded modules use: module list

module list

Currently Loaded Modulefiles:
  1) gnu/4.9.2

To remove the loaded module gnu use: module unload

module unload gnu/4.9.2

To clean your environment from all loaded modules use: module purge

module purge
module list

No Modulefiles Currently Loaded.

To switch between module versions, for example use gnu/5.1.0 instead of loaded gnu/4.9.2 use: module switch

module switch gnu/5.1.0 gnu/4.9.2

To check information about the environment changes that will happen if module is loaded use: module show

module show gnu/4.9.2


module-whatis  Enable usage for the GNU Compiler Collection version 4.9.2
setenv     COMPILER_GNUROOT /apps/compilers/gnu/4.9.2
prepend-path   PATH /apps/compilers/gnu/4.9.2/bin
prepend-path   INCLUDE /apps/compilers/gnu/4.9.2/include
prepend-path   LD_LIBRARY_PATH /apps/compilers/gnu/4.9.2/lib
prepend-path   LD_LIBRARY_PATH /apps/compilers/gnu/4.9.2/lib64
prepend-path   MANPATH /apps/compilers/gnu/4.9.2/share/man

To display module information use: module whatis

module whatis gnu/4.9.2

gnu/4.9.2 : Enable usage for the GNU Compiler Collection version 4.9.2

More specific help: module help

module help gnu/4.9.2

module sub-commands overview

Module Command Description
avail List all available modules.
load Load module into the shell environment.
unload Remove module from the shell environment.
list List loaded modules.
purge Unload all loaded modules.
switch module1 module2 Switch loaded module1 with module2.
show List all of the environment changes the module will make if loaded
whatis Display what is the module information
help More specific help
keyword string Seeks through the ‘whatis’ informations of all modules for the specified string.

Complete list of module commands can be found at the man page

man module