About Modules and Modulefiles

Introduction to the Modules package and modulefiles.

The Modules software package enables users to modify their environment dynamically by using modulefiles. The module command is a user interface to the Modules package. The module command interprets modulefiles, which contain Tool Command Language (Tcl) code, and dynamically modifies shell environment variables such as PATH, and MANPATH.

The shell configuration files /etc/csh.cshrc.local and /etc/bash.bashrc.local contain module commands that establish the default user environment, which is set by the system at login time.

To support customer-specific needs, the system administrator can create modulefiles for a product set for the users. For more information about the Modules software package, see the module(1) and modulefile(4) man pages.

System-wide Default Modulefiles

The /etc/csh/cshrc.local and /etc/bash/bashrc.local files load Base-opts, which loads two lists of modulefiles: a default list and a site-specified local list. The default list differs between the SMW and the Cray system. On the SMW, the file /etc/opt/cray/modules/Base-opts.default.SMW contains the list of the SMW modulefiles to load by default. On the Cray system, the file /etc/opt/cray/modules/Base-opts.default contains the list of SMW modulefiles to load by default.

Additionally, all the modulefiles listed in the file /etc/opt/cray/modules/Base-opts.default.local are loaded. Edit this file to make site-specific changes. The /etc/opt/cray/modules/Base-opts.default.local file initially includes the admin-modules modulefile, which loads a full set of modulefiles. The admin-modules modulefile does not need to be manually loaded, unless it was removed from the default list. The CLE installation process removes admin-modules modulefile from the default list on login nodes.

The files on the Cray system are installed on both the boot root and the shared root.

An example file, /etc/opt/cray/modules/Base-opts.default.local.example, is also provided. The example file is a copy of the /etc/opt/cray/modules/Base-opts.default.local file provided for an initial installation.