Modules

We have implemented the LMOD modules software package to manage nearly all software installed in Minerva and the associated user environment. Modules provide an easy mechanism for updating a user’s environment especially the PATH, MANPATH, NLSPATH, and LD_LIBRARY_PATH environment variables to name a few. The distinct advantage of the modules approach is that the user is no longer required to explicitly specify paths for different software versions nor need to try to keep the related environment variables coordinated. With the modules approach, users simply “load” and “unload” modules to control their environment.

Module Command

The module avail command lists all the modules available to be loaded.

module_1

To have a module loaded to your current environment:

$ module load modulefile [modulefile2]...

Alternatively you can specify

$ ml modulefile [modulefile2]...

To remove a module from your current environment:

$ module unload modulefile

To remove all the modules from your current environment:

$ module purge

The following command demonstrated the true advantage of using modules.  Different versions of entire software packages can be replaced with a single module command:

$ module switch [modulefile_old] [modulefile_new]

Alternatively you can type

$ ml modulefile_new

This will replace the old version and the module list command will list all the modules which are currently loaded in your environment.

To get a usage list of module options type the following (Note: the listing has been abbreviated to only those commands discussed in this webpage)

To get more information about a specific module use the module help command to display the “help” information contained within the given module file.

The module show command allows you 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:

At times one module will conflict with another.  In that event you will receive an error rather than being overwritten and will need to remove the conflicting module yourself before being able to proceed.  To load a specific version, load the module using its full specification.

An example showing this follows:

Setting Up Your Own Modules
You can point the module command to your own modulefiles using the “module use” command. This command updates the environment variable MODULEPATH, which defines where modulefiles are to be found. Documentation on preparing modulefiles can be found online (but feel free to poke around our modulefiles for some examples. They live in /hpc/packages/minerva-XYZ/modulefiles, where XYZ is either centos7 or common.