Modules How-To: Difference between revisions
m (→Using Modules) |
mNo edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
The Modules package provides for the dynamic modification of the user's environment via modulefiles. | The Modules package provides for the dynamic modification of the user's environment via modulefiles. | ||
| Line 11: | 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 === | |||
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 21: | Line 17: | ||
</pre> | </pre> | ||
=== 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 35: | 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 === | |||
<pre> | <pre> | ||
setenv MODULE_ABSOFT disabled | setenv MODULE_ABSOFT disabled | ||
| Line 41: | Line 37: | ||
</pre> | </pre> | ||
=== bash === | |||
<pre> | <pre> | ||
export MODULE_ABSOFT=disabled | export MODULE_ABSOFT=disabled | ||
| Line 51: | 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 === | |||
*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