Modules Approach to Environment Management
|
Introduction
Modules provides an easy mechanism for dynamically modifying a user's
environment via modulefiles. Each modulefile contains the information needed to configure the shell for an application. Typically modulefiles instruct the module command to alter or set shell environment variables such as PATH, MANPATH, etc.
Module commands
To get a usage list of module options type the following
(the listing has been abbreviated to only those commands
discussed in this webpage) :
% module help
Available Commands and Usage:
+ add|load modulefile [modulefile ...]
+ rm|unload modulefile [modulefile ...]
+ switch modulefile1 modulefile2
+ display modulefile [modulefile ...]
+ avail|which path [path]
+ list
+ help modulefile [modulefile ...]
|
-
module list
-
This lists all the modules which are currently loaded into
the users environment.
-
module avail|which
-
This options lists all the modules which are available to be
loaded. The "which" option provides descriptions about the
available modules. Notice that many of them have version numbers
associated with them. Modules makes it easy to switch
compiler application versions. The module name without
a version number is the production default.
-
module help modulefile
-
If a module looks interesting, to get more information use this command
to display the `help' information contained within the given
module file.
$ module help icc
----------- Module Specific Help for 'icc/7.0' --------------------
Intel Software: Intel icc
This module loads the lastest versions of icc.
*** No Module Specific Help for icc/7.0 ***
|
-
module display modulefile
-
Use this command to see exactly what a given modulefile will do to your
environment, such as
what will be added to the PATH, MANPATH, etc.
environment variables.
-
module load modulefile
-
This adds one or more modulefiles to the user's current environment. It does
so silently, unless there is a problem with a modulefile.
If you load the generic name of a module, you will get the default version.
To load a specific version, load the module using its full specification, e.g.:
$ module add icc/7.0
-
module unload modulefile
-
This removes any listed modules from the user's
current environment. The modules can be removed in any order.
$ module unload icc
-
module switch modulefile_old modulefile_new
-
This command demonstrates the true advantages of modules.
Different versions of entire software packages can be replaced with a single
module command.
Sources of Information on Modules
Other information on modules
can be found at the following site
(http://modules.sourceforge.net/).
return to top