Modules How-To

From OACISS Systems Wiki
Revision as of 01:24, 9 March 2007 by Brandond (talk | contribs)
Jump to navigation Jump to search

Modules HOWTO

Intro

The Modules package provides for the dynamic modification of the user's environment via modulefiles.

Modules 3.2.3 is installed in /usr/local/packages/Modules on Neuronic, Optix, and the linux-based IBMs (p690, p655-1, p655-2, p655-3, and iconic blades).

Set Up

To use modules on these platforms, add the following lines to your login scripts:

tcsh

If you use tcsh as your login shell, add these lines to your .cshrc or .tcshrc file:

 setenv MODULE_VERSION 3.2.3
 setenv MODULESHOME /usr/local/packages/Modules/$MODULE_VERSION
 if (-e $MODULESHOME/init/tcsh) source $MODULESHOME/init/tcsh
 setenv MODULEPATH $MODULESHOME/modulefiles:$MODULEPATH

bash

If you use bash as your login shell, add these lines to your .bash_profile:

 export MODULE_VERSION=3.2.3
 export MODULESHOME=/usr/local/packages/Modules/$MODULE_VERSION
 test -s $MODULESHOME/init/bash && . $MODULESHOME/init/bash
 export MODULEPATH=$MODULESHOME/modulefiles:$MODULEPATH

Additional set up on IBMs

Absoft Modules (version 3.1.6) are already enabled on the IBMs by default. The latest install (version 3.2.3) is currently set up to use the Absoft Modules as well as it's own, but to use this version, you must disable the Absoft modules. This can be done by adding the following lines to your startup scripts:

tcsh

 setenv MODULE_ABSOFT disabled
 unsetenv MODULEPATH

bash

 export MODULE_ABSOFT=disabled
 unset MODULEPATH

Using Modules

Once the Module script is sourced (see above), invoke the "module" command to use modules.

Examples

To get usage info on modules:

module help

To list available modules:

module avail

To list available mpi modules:

module avail mpi

To find out what a module is:

module whatis {module

To see how a module affects your environment:

module show {module

To load or unload a module:

module load/unload {module

To view a list of loaded modules:

module list

For more information on using modules, load the "modules" module, then view the man page module:

module load modules
man module