Hprc banner tamu.png


Revision as of 10:48, 15 March 2017 by Cryssb818 (talk | contribs)
Jump to: navigation, search

The Modules System


The Modules system organizes the multitude of packages we have installed on our clusters so that they can be easily maintained and used. More specifically, Modules configure appropriately the execution environment of each package (and version).

Most non-OS software is organized by the Modules system. This includes all compilers and associated libraries. Each package has a corresponding modulefile or simply a module where the appropriate actions are specified (in a prescibed format) in setting up its execution environment.

Notify the help desk if you cannot locate the module appropriate for an application.

Module Commands

To find out what software packages are available under the Modules system use one of the following two commands:

[NetID@cluster ~]$ module spider [packageName]
[NetID@cluster ~]$ module avail [packageName] 

In order to use some software on our clusters, the module for the software must be loaded first. To load the module for a software package, use the following command:

[NetID@cluster ~]$ module load packageName/version

Note: The specification of packageName in the load command is case sensitive and it must include a specific version. No packages are preloaded by default.
Note: Loading a package is required in order to access the man pages associated with the package if they are available.

To find out what packages/modules you have loaded on your current session, use the following command:

[NetID@cluster ~]$ module list

To remove one module from your current session, use the following command:

[NetID@cluster ~]$ module unload [packageName]

To remove ALL modules from your current session, use the following command:

[NetID@cluster ~]$ module purge

Note: It is very important to remove all modules when switching between software and compilers. Mixing modules and versions is NOT a good idea and can cause many problems.

To search and list what packages/modules are available on Ada, enter any suitable combination of the following:

[ NetID@ada ~]$ module spider [packageName]          # List all versions of all packages or just for packageName.
[ NetID@ada ~]$ module spider  string                # List all modules that contain the "string".
[ NetID@ada ~]$ module spider  packageName/version   # List detailed information about that version of packageName
[ NetID@ada ~]$ module keyword string                # List all modules and whatis that contain string.

For additional help see:

[ NetID@ada ~]$ module help                          # Lists all the subcommands under the module command.
[ NetID@ada ~]$ module help packageName              # Lists information about packageName

To remove (unload) a module and load another, use the swap subcommand:

[ NetID@ada ~]$ module swap packageOUT packageIN

The above command is short for:

[ NetID@ada ~]$ module unload packageOUT 
[ NetID@ada ~]$ module load packageIN

Note: The abbreviation ml can be used instead of module, module load, or module list depending on the situation. This can be seen in the examples below.


The output below shows the output of the spider command for ABAQUS:

[ NetID@ada ~]$ ml spider ABAQUS         # module abbreviated as ml
      Finite Element Analysis software for modeling, visualization and best-in-class
      implicit and explicit dynamics FEA. - Homepage:

   . . .

The output below illustrates the fact that a modulefile's complete name includes its version. An installed application can have several versions.

[ NetID@cluster ~]$ ml ABAQUS/2017       # module load abbreviated as ml
[ NetID@cluster ~]$ ml                   # module list abbreviated as ml
Currently Loaded Modules:
  1) ABAQUS/2017

The output below shows the functionality of the swap command:

[ NetID@cluster ~]$ ml load ABAQUS/2016
[ NetID@cluster ~]$ ml swap ABAQUS/2016 ABAQUS/2017

The following have been reloaded with a version change:
  1) ABAQUS/2016 => ABAQUS/2017

[ NetID@cluster ~]$ module list

Currently Loaded Modules:
  1) ABAQUS/2017