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 (page 34) 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:
$ module load totalview
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 [
fi
From now on, whenever you log in, the TotalView modulefile is automatically loaded in your environment.
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. See Modulefile Conflicts 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.
Modulefile 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.0compiler 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 displays 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'
ifort/8.0(19):ERROR:102: Tcl command execution failed: conflict ifort/8.1
In this example, a user attempted to load the ifort/8.0 modulefile. After the user issued the command to load the modulefile, an error message occurred, indicating a conflict between this modulefile and the ifort/8.1 modulefile, which is already loaded.
34 Configuring Your Environment with Modulefiles