UMBC logo
UMBC High Performance Computing Facility
Please note that this page is under construction. We are documenting the 240-node cluster maya that will be available after Summer 2014. Currently, the 84-node cluster tara still operates independently, until it becomes part of maya at the end of Summer 2014. Please see the 2013 Resources Pages under the Resources tab for tara information.
Using modules on tara

Introduction

We use modules on tara to help users manage their Linux environments. Different environment settings are needed in the course of using the various applications available on the cluster; modules provide a simple way to prepare your environment for your application.

As an example, see the pages for Python and Enthought Python. Users can load a module during their session that will determine which one loads when they run the command "python".

How to use modules

Complete documentation of commands and options can be found by
[araim1@tara-fe1 ~]$ man module
but we will illustrate some useful commands here. To see all the modules we currently have loaded:
[araim1@tara-fe1 ~]$ module list
Currently Loaded Modulefiles:
  1) matlab/r2011a             15) autodock/4.2-1
  2) comsol/4.2u2              16) autodock-vina/1.1.1-1
  3) sas/9.2                   17) mgltools/1.5.4-1
  4) idl/8.1                   18) maestro-academic/9.3.023
  5) gamess/2009.1.R3          19) utils
  6) gromacs/4.0.7             20) scilab/5.3.1
  7) charmm/c35b3.xxlarge      21) slurm/default
  8) gaussian/09               22) dssp/2.0.1
  9) latex-contrib/default     23) surflex/2514
 10) vmd/1.8.7                 24) default-software
 11) namd/2.7b3                25) pgi/9.0
 12) chimera/1.4.1             26) mpi/gcc-openmpi-1.3.3-p1
 13) sculptor/2.0.2            27) switcher/1.0.13
 14) plants/1.2                28) modules-init
[araim1@tara-fe1 ~]$
We can see the "display" command to see what a module is doing
[araim1@tara-fe1 ~]$ module display matlab/r2011a
-------------------------------------------------------------------
/usr/cluster/modulefiles/matlab/r2011a:

prepend-path	 PATH /usr/cluster/matlab/r2011a/bin 
setenv		 MLROOT /usr/cluster/matlab/r2011a 
-------------------------------------------------------------------
araim1@tara-fe1 ~]$
We can list all available modules which have been defined by the system administrators. (Note: your listing may differ, depending on the current configuration).
[araim1@tara-fe1 ~]$ module avail

------------------------ /usr/share/Modules/modulefiles ------------------------
dot         module-cvs  module-info modules     null        use.own

------------------------------- /etc/modulefiles -------------------------------
modules-init

--------------------------- /usr/cluster/modulefiles ---------------------------
R/2.14.0                          llvm/2.9
autodock/4.2-1                    maestro-academic/9.3.023(default)
autodock-vina/1.1.1-1             matlab/r2009b
charmm/c35b3                      matlab/r2010a
charmm/c35b3.xxlarge(default)     matlab/r2010b
chimera/1.4.1(default)            matlab/r2011a(default)
comsol/3.5a                       matlab/r2011b
comsol/4.0                        mgltools/1.5.4-1
comsol/4.0a                       mpi/gcc-mvapich2-1.4rc2
comsol/4.1                        mpi/gcc-openmpi-1.3.3
comsol/4.1u3                      mpi/gcc-openmpi-1.3.3-p1
comsol/4.2                        mpi/gcc44-mvapich2-1.7
comsol/4.2a                       mpi/pgi-9.0-mvapich2-1.4rc2
comsol/4.2u1                      mpi/pgi-9.0-openmpi-1.3.3
comsol/4.2u2(default)             mpi/pgi-9.0-openmpi-1.3.3-p1
default-software                  namd/2.7b3(default)
default-software-testing          pgi/9.0
dssp/2.0.1                        pgi/testing
emacs/23.3                        plants/1.2(default)
embody/0.9.21                     python/2.7.2(default)
epd/6.3-2(default)                qt/4.5.2
epd/7.1-2                         qt47/4.7.2-1
freemat/4.0.1                     sas/9.2
gamess/2009.1.R3(default)         schrodinger/2010u1(default)
gaussian/09                       scilab/5.3.1
gcc/4.4.4                         sculptor/2.0.2(default)
gromacs/4.0.7(default)            slurm/default
idl/7.0                           surflex/2514
idl/8.1(default)                  switcher/1.0.13(default)
intel-cnc/0.6                     tbb/30_196oss
java/jdk1.6.0_18-x64              utils
latex-contrib/default             vmd/1.8.7(default)
llvm/2.5(default)

--------------------------- /opt/modules/modulefiles ---------------------------
araim1@tara-fe1 ~]$
If we run python with the current setup (given above by "module list"), we'll get an older system version 2.4.3
[araim1@tara-fe1 ~]$ python
Python 2.4.3 (#1, Apr 14 2011, 20:41:59) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
Suppose we'd like to use a more recent version of Python, so we'll load the python/2.7.2 module. Notice in the output of "module avail", we have "python/2.7.2(default)". This means that we can load this package with an explicit version number
[araim1@tara-fe1 ~]$ module load python/2.7.2
Or we can omit the version number to get the same result
[araim1@tara-fe1 ~]$ module load python
One the module is loaded, we should get the following when we run python
[araim1@tara-fe1 ~]$ python
Python 2.7.2 (default, Sep  8 2011, 21:04:00) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Another available version of Python is Enthought. Suppose we load its module after loading python/2.7.2.
[araim1@tara-fe1 ~]$ module load epd/7.1-2
[araim1@tara-fe1 ~]$ python
Enthought Python Distribution -- www.enthought.com
Version: 7.1-2 (64-bit)

Python 2.7.2 |EPD 7.1-2 (64-bit)| (default, Jul  3 2011, 15:17:51) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "packages", "demo" or "enthought" for more information.
>>> 
Suppose we're finished with Enthought Python and want to go back to python/2.7.2. We can bring our environment back to the previous state by unloading the epd/7.1-2 module.
[araim1@tara-fe1 ~]$ module unload epd/7.1-2
[araim1@tara-fe1 ~]$ python
Python 2.7.2 (default, Sep  8 2011, 21:04:00) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Another useful module command is "swap" which will replace one loaded module with another. (As opposed to being loaded on top, as in the Python example above). As an example, let's try loading epd/7.1-2, and then swapping it out for an older version epd/6.3-2.
[araim1@tara-fe1 ~]$ module load epd/7.1-2
araim1@tara-fe1 ~]$ python
Enthought Python Distribution -- www.enthought.com
Version: 7.1-2 (64-bit)

Python 2.7.2 |EPD 7.1-2 (64-bit)| (default, Jul  3 2011, 15:17:51) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "packages", "demo" or "enthought" for more information.
>>> quit()

[araim1@tara-fe1 ~]$ module swap epd/6.3-2
[araim1@tara-fe1 ~]$ python
Enthought Python Distribution -- http://www.enthought.com
Version: 6.3-2 (64-bit)

Python 2.6.6 |EPD 6.3-2 (64-bit)| (r266:84292, Sep 17 2010, 19:18:23) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>