Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The HPC team is updating this page. Check back for new information.

What are Modules?

Environment Modules - (referred to as just Modules) is the system the cluster uses to select which software to use. It also allows you to choose which version if multiple versions of a given software exist. Modules does this by adding software paths to your environment PATH variable.

Viewing Modules

To access the cluster resources and send commands you need to use an SSH client. On Mac and Linux, from the a terminal simply run:

ssh Your_NetID@login.storrs.hpc.uconn.edu

(Where 'Your_NetID' is your own NetID consisting of 3 letters and 5 numbers)

For Linux/MacOSX users, it is recommended to set up and use SSH keys.

Windows users can login using PuTTY.

Once connected, you should see a terminal prompt like:

[Your_NetID@cn01 ~]$

To view all available modules run the command:

module avail

This will list out the applications that you can load into your environment.

To view already loaded programs, run the command:

module list

Loading Your Environment

To load a module run:

module load {MODULE_NAME}

Where your module name is one from the list of available modules. Note that tab completion works for the names of modules.

Some modules have conflicts, because different versions of the same program cannot be loaded at the same time. To check for conflicts view your modules list that is loaded. If something conflicts run the command:

module unload {MODULE_NAME}

You can then load the required module

Loading Modules on Log-in

If you wish for certain modules to be loaded every time you log in, To do this run:

module initadd {module name}

If you decide that you no longer want a specific module to be loaded every time, simply remove that line from your ~/.bashrc under the "# Load saved modules" heading.

Be careful when you use initadd. If you run it multiple times, it can install conflicting software in your ~/.bashrc. You'll should probably inspect your ~/.bashrc for conflicting modules if you use initadd frequently.

Making Your Own Module Files

A user can create their own module files, to load environment variables and paths. Create a directory in your home directory called privatemodules. This is where you will store your module files. The convention for creating module files is making a directory with the name of the application and a text file with the version number. For example, if you wanted a module file for gcc version 4.1.2, the directory would be:

~/privatemodules/gcc

and the file name would be 4.1.2 Below is a sample module file for GCC version 4.1.2 . You can use this as a basic template.


File content:

#%Module1.0#####################################################################
##
##gcc 4.1.2  modulefile
##
##Module to set up GCC 4.1.2
##
module-whatis "GCC 4.1.2"

conflict gcc
 
prepend-path    PATH                    /usr/local/pkg/gcc/4.3.6
prepend-path    LD_LIBRARY_PATH         /usr/lib/gcc/x86_64-redhat-linux/4.1.2
prepend-path    MANPATH                 /usr/share/man/


Notice a conflict is defined, so only one version of GCC can be loaded at a time. The environment variables are defined with the path they were installed to. Specific programs may require other environment variables. In this case the basic template is:

prepend-path   {VARIABLE NAME}         {PATH}

After saving this file, you may load it the same as with the cluster module files. Make sure you do not create a module with the same name as one already created. For example, if gcc/4.1.2 is taken, but you would like a user version of this, create gcc/4.1.2-1

  • No labels