You can load a modulefile in to your environment
to enable easier access to software that you want to use by executing
the module load command. You can load a modulefile
for the current session, or you can set up your environment to load
the modulefile whenever you log in to the system.
When loading a modulefile, note that certain modulefiles
cannot be loaded while other modulefiles are currently loaded. For
example, this can happen with different versions of the same software.
If a modulefile you are attempting to load conflicts with a currently
loaded modulefile, the modulefile will not be loaded and an error
message will be displayed.
If you encounter a modulefile conflict when loading
a modulefile, you must unload the conflicting modulefile before you
load the new modulefile. See “Modulefile Conflicts” for further information about modulefile
conflicts.
Loading a Modulefile for the Current Session |
 |
You can load a modulefile for your current login
session as needed. To do this, issue the module load command as shown in the following example, which illustrates the TotalView modulefile being loaded:
Loading a modulefile in this manner affects your
environment for the current session only.
Automatically Loading a Modulefile at Login |
 |
If you frequently use one or more modulefiles that
are not loaded when you log in to the system, you can set up your
environment to automatically load those modulefiles for you. A method
for doing this is to modify your shell startup script to include instructions
to load the modulefile automatically.
For example, if you wanted to automatically load
the TotalView modulefile when you log in, edit your shell startup
script to include the following instructions. This example uses bash as the login shell. Edit the ~/.bashrc file as follows:
# if the 'module' command is defined, $MODULESHOME
# will be set
if [ -n "$MODULESHOME" ]; then
module load totalview
fi |
From now on, whenever you log in, the TotalView
modulefile is automatically loaded in your environment.