Using Linux Modules

On RCC Linux systems, most software packages are made available via Linux Modules. These modules allow us to run an enormous software library on our systems without the software packages conflicting with each other.

Each mdoule contains the information needed to configure the shell and environment for a specific application. For example, the Intel Module enables access to the Intel Compiler libraries and executables, and the Python modules enable access to specific versions of Python.

If you attempt to run a software package that requires a module, and that module hasn't yet been loaded, that package will appear to not exist.

This page describes general module use. Our documentation for built-in software includes instructions for loading specific modules when they are needed.

Using Built-In Modules

We provide many built-in modules for loading software packages, libraries, and compilers. You can see a list of these by running the following command on any Spear, Condor, or HPC node:

$ ls /etc/modulefiles

Loading Modules

To load a module, run module load <modulename>.

As an example, if you wish to run the Intel C compiler command, icc, you must first load the module. If you attempt to run icc before you load the module you will see an error:

$ icc --version
-bash: icc: command not found

First, load the module and then you can run the command:

$ module load intel
$ icc --version
icc (ICC) 13.0.1 20121010
Copyright (C) 1985-2012 Intel Corporation.  All rights reserved.

Unloading Modules

You can unload a module by running module unload <modulename>.

$ module unload intel

Note: Do not forget to add the module load command to your submission scripts if your job execution code requires resources that are not in the environment by default.

Creating Custom Modules

You may wish to customize the Linux environment for your jobs on your own. For this, you can create your own custom module to accomplish this.

First create a directory for your moduels:

$ mkdir ~/modules

Then, add the module path to the end of your ~/.bashrc file:


...or add the following to your ~/.cshrc or ~/tcshrc file, depending on which shell you use:


A module can be as simple as setting a few environment variables (such as PATH and LD_LIBRARY_PATH) or can be complicated Tcl scripts.

To aid you in developing your module, refer to the built-in modules that are included with RCC servers, located in the /etc/modulefiles directory.

A simple example is the ORCA module: /etc/modulefiles/orca. A more complicated example is the /etc/modulefiles/gaussian09 module.