If you encounter a modulefile conflict when loading a modulefile, you must unload the conflicting modulefile before you load the new modulefile. Refer to Section 2.2.8 for further information about modulefile conflicts.

2.2.6.1 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:

$ module load totalview

Loading a modulefile in this manner affects your environment for the current session only.

2.2.6.2 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.

2.2.7 Unloading a Modulefile

In certain cases, you may find it necessary to unload a particular modulefile before you can load another modulefile in to your environment to avoid modulefile conflicts. Refer to Section 2.2.8 for information about modulefile conflicts.

You can unload a modulefile by using the module unload command, as shown in the following example:

$ module unload ifort/8.0

Unloading a modulefile that is loaded by default makes it inactive for the current session only

it will be reloaded the next time you log in.

2.2.8Modulefile Conflicts

Some modulefiles should not be loaded while certain other modulefiles are currently loaded. This is especially true of modulefiles for different versions of the same software. For example, the Intel C/C++ Version 8.0 compiler modulefile should not be loaded while the Intel C/C++ Version 8.1 compiler modulefile is loaded. A modulefile conflict occurs in this situation.

The system will display an error message when you attempt to load a modulefile that conflicts with one or more currently-loaded modulefiles. For example:

$ module load ifort/8.0

ifort/8.0(19):ERROR:150: Module ’ifort/8.0’ conflicts with the currently loaded module(s) ’ifort/8.1’

Using the System 2-5