Modules How-To: Difference between revisions

From OACISS Systems Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
Line 7: Line 7:
To use modules on these platforms, add the following lines to your login scripts:
To use modules on these platforms, add the following lines to your login scripts:


'''tcsh'''
=== tcsh ===


If you use tcsh as your login shell, add these lines to your .cshrc or .tcshrc file:
If you use tcsh as your login shell, add these lines to your .cshrc or .tcshrc file:
Line 17: Line 17:
</pre>
</pre>


'''bash'''
=== bash ===


If you use bash as your login shell, add these lines to your .bash_profile:
If you use bash as your login shell, add these lines to your .bash_profile:
Line 31: Line 31:
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:
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'''
=== tcsh ===
<pre>
<pre>
  setenv MODULE_ABSOFT disabled
  setenv MODULE_ABSOFT disabled
Line 37: Line 37:
</pre>
</pre>


'''bash'''
=== bash ===
<pre>
<pre>
  export MODULE_ABSOFT=disabled
  export MODULE_ABSOFT=disabled
Line 47: Line 47:
Once the Module script is sourced (see above), invoke the "module" command to use modules.
Once the Module script is sourced (see above), invoke the "module" command to use modules.


'''Examples'''
=== Examples ===


*To get usage info on modules:
*To get usage info on modules:

Latest revision as of 01:28, 9 March 2007

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 <modulename>
  • To see how a module affects your environment:
module show <modulename>
  • To load or unload a module:
module load/unload <modulename>
  • 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