Modules are files that contain the necessary setup and configuration information for a given software package. These modules can be dynamically loaded, unloaded, or swapped to tune your environment as you require. In this document, you will learn how to find and use modules on the cluster, in addition to some helpful tips regarding their use.
The cluster features hundreds of software packages that power scientific computing. Sorting through these packages one-by-one would be a difficult task. In addition, searching through your environment to find the modules you have currently loaded would take a lot of time. Instead, use the
module avail, and
module show commands to accomplish these precursory tasks.
module list command outputs a list of the modulefiles that are currently loaded in your environment. After you load a module, it will appear in the output of
module list. The order of the modulefiles exists to enhance readability, not to indicate the priority of modules. Use this command to verify that all the modules you require are loaded into your environment.
By default, seven modulefiles are loaded into your environment when you log in to the cluster. Figure 2.1 shows these default modules.
All these modules are necessary for your environment to function correctly. For instance, without the moab/9.1.1 and pbstools modulefiles, some of the job monitoring commands would no longer function. The DefApps modulefile is especially critical to your environment. Please do not attempt to unload these default modules. Exceptions will be noted in the Troubleshooting Modules section.
module avail command outputs all the modulefiles available to load on the cluster. Because there are many modules available, the output is extensive. To narrow the results, execute
module avail <module>. For example, to determine which versions of Anaconda are available, execute
module avail anaconda. The output would be more focused and manageable.
Each module in the output of module avail follows the same format. The module’s name comes first, followed by the version number. In some cases, the term “default” appears in parentheses next to the module. If you load a module without providing a version number, it will load the module that has the default flag applied to it.
module show command retrieves information on the module you specify. In most cases, it provides the module’s description and the changes it will make to your environment. As an example, Figure 2.2 shows the output of module show for the LAMMPS module. In general, the
module show command is helpful to determine which programming environment to use for the module and what dependencies it will load. The Troubleshooting Modules section will review this information in more detail.
Loading and Unloading Modules
After you identify the module(s) you wish to load, execute
module load <module>. Replace <module> with the name of the module you wish to load. You may load multiple modules at once by providing a space between each module name. For instance, to load Anaconda 3, Python 3, and RStudio all at the same time, execute
module load anaconda3 python3 rstudio. The output of
module list will verify that these modules were properly loaded.
If you do not specify a version to the module you load, the default version for that module will be loaded into your environment. To load a specific version of a module, supply the module name followed by the version. Using Anaconda 3 version 5.1.0 as an example, you would load this module with
module load anaconda3/5.1.0.
Unloading a module follows the same process as loading a module. In this case, execute
module unload <module> to remove a module from your environment. Replace <module> with the name of the module you wish to unload. Like
module load, you can specify multiple modules if you separate them with a space. Use
module list to verify that the modules were unloaded from your environment.
If you wish to automatically load certain modules when you log in to the cluster, you can add
module load <module> to your .bashrc file. Always verify that the modules you wish to automatically load at log in do load with the
module list command. Be aware that some modules, such as Anaconda, require configuration scripts to be executed before they can work. Consult the documentation for the module before attempting to automatically load it.
Using the Correct Programming Environment
By default, every user environment loads the PE-intel programming environment, which uses Intel’s tools and compilers to handle software. In the context of the cluster, using this programming environment offers the greatest compatibility and performance for most modules. However, there are some modules that require GNU tools and compilers. LAPACK is one example. In these cases, you must switch from the PE-intel programming environment to the PE-gnu programming environment.
Before you switch your programming environment, use the module show
In this case, the module informs the user that it cannot execute in the current programming environment. To remedy this problem, execute
module swap PE-intel PE-gnu. The Intel tools and compilers will be unloaded and the GNU tools and compilers will be loaded. Though the PE-intel module is a default module, it is safe to change from it to PE-gnu. After the swap completes successfully, you may load the module into your environment. Figure 4.2 shows the output of module show for the LAPACK module in the PE-gnu programming environment.
Missing Modules or Dependencies
In the event that you cannot find the module you require for your work, consider using Anaconda or pip to locate the package. Please note that these tools are mostly for Python and R packages. Additionally, Singularity allows you to retrieve containers from various sources and use them as you would a standard executable program. Please review our Singularity User Guide for more information. If none of these solutions fit your situation, you may submit a software request form. The staff will evaluate the request and determine if the package can be installed on the cluster.
Software License Issues
Some software on the cluster requires a license to use. Examples include VASP, TURBOMOLE, and MatLab. If you do not belong to the proper group that has access to the license, you cannot use it. You may submit a ticket and request to be added to the group if you belong to a department that provides the license for the software.
Last Updated: 03 / 10 / 2020