NERSC logo National Energy Research Scientific Computing Center
  A DOE Office of Science User Facility
  at Lawrence Berkeley National Laboratory
 
PackagePlatformVersionModule Docs
modules bassi 3.1.6 none  Vendor
modules davinci 3.1.6 not needed  Vendor
modules franklin 3.1.6 not needed  Vendor
modules jacquard 3.1.6 not needed  Vendor
modules pdsf 3.1.6 not needed  Vendor
(*) Denotes limited support

Modules Approach to Software Management

NERSC has implemented and enhanced the modules approach to managing the user environment for different software versions on all production machines. The distinct advantage of the modules approach is that the user is no longer required to explicitly specify paths for different executable versions, and try to keep the MANPATH and related environment variables coordinated. With the modules approach, users simply ``load'' and ``unload'' modules to control their environment.


Introduction

Modules provides an easy mechanism for updating a user's environment especially the PATH, MANPATH, NLSPATH, and LD_LIBRARY_PATH environment variables to name a few. To perform this in the current shell, the modules package uses the shell's eval `command` mechanism for running a program that outputs shell commands and then executes them. Because of this there are some limitations and preferred ways for setting up the modules environment.

When you get a NERSC account, your dot-files should be set up correctly to use modules. If you delete or modify these files in such a way to make modules fail, contact the the NERSC consultants for help.

You can modify your environment so that certain modules are loaded whenever you log in. Use this command to have a module automatically loaded each time you log into the system:

% module initadd modulename

where modulename is the name of the module you want loaded.

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        path [path]
        +  list
        +  help         modulefile [modulefile ...]
module list
This lists all the modules which are currently loaded into the users environment.
module avail
This option lists all the modules which are available to be loaded. 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 GNU

----------- Module Specific Help for 'GNU' ------------------------

        USG/GNU software & application environment


        By including this module in your environment this
        makes the GNU version of any utility to be used
        preferentially over any system tool of the same name.

        Version 1.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 there is problem, please notify the NERSC user services consultants. 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 load gcc/3.0.4
module unload modulefile
This removes any listed modules from the user's current environment. The modules can be removed in any order.
% module unload GNU
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.

Initialization of the Modules Package

IBM SP

IBM does not use modules for its own software. NERSC has installed the modules package and uses it for third-party software. The initialization files are located in /usr/common/usg/etc/csh.modules and /usr/common/usg/etc/profile.modules.

Sources of Information on Modules

Other information on modules can be found by reading the man pages on NERSC's IBM SP (man module). The sources can be found at the following site (http://modules.sourceforge.net/), which also requires the Tcl sources (http://www.scriptics.com/)


LBNL Home
Page last modified: Thu, 21 Aug 2008 01:33:25 GMT
Page URL: http://www.nersc.gov/nusers/resources/software/os/modules.php
Web contact: webmaster@nersc.gov
Computing questions: consult@nersc.gov

Privacy and Security Notice
DOE Office of Science