Help:HPCC Env Modules: Difference between revisions
m (External link to Environment Modules page) |
m (Add table of user RC files and shells) |
||
Line 34: | Line 34: | ||
| Give the rules for module <module-name> | | Give the rules for module <module-name> | ||
|} | |} | ||
== Set Up Environment Modules == | |||
To use Environment Modules you will have to add a couple of things to your startup RC file. The name of your RC file depends on the shell that you are using. | |||
The following table lists user RC files for some popular shells. | |||
{| class="wikitable sortable" | |||
! | |||
! sh | |||
! ksh | |||
! csh | |||
! tcsh | |||
! bash | |||
! zsh | |||
|- | |||
|- | |||
|<code>~/.tcshrc</code> || || || || yes || || | |||
|- | |||
| <code>~/.cshrc</code>|| || || yes || yes || || | |||
|- | |||
|<code>~/.login</code> || || || login || login || || | |||
|- | |||
| <code>~/.logout</code> || || || login || login || || | |||
|- | |||
|<code>~/.profile</code> || login || login || || || login || | |||
|- | |||
|<code>~/.bash_profile</code> || || || || || login || | |||
|- | |||
|<code>~/.bash_login</code> || || || || || login || | |||
|- | |||
|<code>~/.bash_logout</code> || || || || || login || | |||
|- | |||
|<code>~/.bashrc</code> || || || || || ! login || | |||
|- | |||
|<code>~/.zshenv</code> || || || || || || yes | |||
|- | |||
|<code>~/.zprofile</code> || || || || || || login | |||
|- | |||
|<code>~/.zshrc</code> || || || || || || int | |||
|- | |||
|<code>~/.zlogin</code> || || || || || || login | |||
|- | |||
|<code>~/.zlogout</code> || || || || || || login | |||
|} | |||
Explanation: | |||
* Blank means the file is not read by the shell at all. | |||
* '''yes''' means the file is always read by the shell upon startup. | |||
* '''login''' means the file is read if the shell is a login shell. | |||
* '''! login''' means the file is read if the shell is not a login shell. | |||
* '''int''' means the file is read if the shell is interactive. |
Revision as of 13:30, 11 August 2009
Environment Modules
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.
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
Command | Description |
---|---|
module avail | List available modules |
module load <module-name> | Load module named <module-name> |
module unload <module-name> | Unload module named <module-name> |
module whatis <module-name> | Give description of module <module-name> |
module list | List modules that are loaded in your environment |
module purge | Unload all currently loaded modules from your environment |
module display <module-name> | Give the rules for module <module-name> |
Set Up Environment Modules
To use Environment Modules you will have to add a couple of things to your startup RC file. The name of your RC file depends on the shell that you are using.
The following table lists user RC files for some popular shells.
sh | ksh | csh | tcsh | bash | zsh | |
---|---|---|---|---|---|---|
~/.tcshrc |
yes | |||||
~/.cshrc |
yes | yes | ||||
~/.login |
login | login | ||||
~/.logout |
login | login | ||||
~/.profile |
login | login | login | |||
~/.bash_profile |
login | |||||
~/.bash_login |
login | |||||
~/.bash_logout |
login | |||||
~/.bashrc |
! login | |||||
~/.zshenv |
yes | |||||
~/.zprofile |
login | |||||
~/.zshrc |
int | |||||
~/.zlogin |
login | |||||
~/.zlogout |
login |
Explanation:
- Blank means the file is not read by the shell at all.
- yes means the file is always read by the shell upon startup.
- login means the file is read if the shell is a login shell.
- ! login means the file is read if the shell is not a login shell.
- int means the file is read if the shell is interactive.