[[Image:Alert-yellow.png | center | 50px | Out-of-date page ]]
[[File:IAC_Building_Medium_(wallyg).jpg | right | 400px | Photo by Flickr user wallyg used under a Creative Commons license]]
This page is out of date.
Please see the
Several software packages on the cluster require correct definition of certain environment variables. These variables establish the package's configuration and influence its behavior. For example, PATH and LD_LIBRARY_PATH specify the location of package binary files.
[[HPC]]
page for information on accessing and using ''blanca'', the CSDMS HPC.
[http://modules.sourceforge.net Environment Modules] is a tool to manage package environment variables.
With simple command line options, you can prepare the environment for any package available on the cluster. In the case of packages with multiple versions, there are options to switch between one version and another - defining and undefining variables as needed. If there is a conflict between two packages, module will alert you.
== Cheat Sheet ==
{|
! align=left width=250 | Command
! align=left | Description
|-
| <tt>module avail</tt>
| List available modules
|-
| <tt>module load <module-name></tt>
| Load module named <module-name>
|-
| <tt>module unload <module-name></tt>
| Unload module named <module-name>
|-
| <tt>module whatis <module-name></tt>
| Give description of module <module-name>
|-
| <tt>module list</tt>
| List modules that are loaded in your environment
|-
| <tt>module purge</tt>
| Unload all currently loaded modules from your environment
|-
| <tt>module display <module-name></tt>
| Give the rules for module <module-name>
|}
For a more complete description, see the [http://modules.sourceforge.net/man/module.html module man page] or type
<syntaxhighlight lang=bash>
> man module
</syntaxhighlight>
== Set Up Environment Modules ==
To use Environment Modules you will have to add a couple of things to your startup RC file. The module command is initialized by sourcing a shell-specific initialization file. You will find the initialization files /usr/local/modules/init. To initialize modules,
<syntaxhighlight lang=bash>
source /usr/local/modules/init/<shell>
</syntaxhighlight>
Where <code><shell></code> is the name of your shell. To have this done automatically when you login, add this command to the end of your startup RC file. You should now be able to use the [http://modules.sourceforge.net/man/module.html module command].
== Examples ==
The following examples assume that you have executed (either interactively or in a login RC file) the previous two commands.