The module package is available on the Shared Computing Cluster, allowing users to access non-standard tools or alternate versions of standard packages. This is also an alternative way to configure your environment as required by certain packages. Specific modules can be loaded and unloaded as required. The module command is provided by the Lmod software which is developed at the Texas Advanced Computing Center.

The version of Python that is available without loading a module is an older version (2.7.5) that is intended for system usage only. Load a module in order to use Python.

Table of Contents


Common Commands

module list List currently loaded modules.
module avail List available packages.
module spider List available packages in a different format.
module help [modulefile] Description of specified module.
module show [modulefile] Displays information about specified module, including environment changes, dependencies, software version and path.
module load [modulefile] Loads module or specifies which dependencies have not been loaded.
module unload [modulefile] Unloads specified module from environment.
module purge Unloads all loaded modules

More information can be found in the Module man page.


Command Examples

module list

scc4% module list
No Modulefiles Currently Loaded.

module avail

List available packages.

scc4% module avail

--------------------------------- /share/module.7/bioinformatics --------------------------------- 
   2brad_denovo/2019-01-22_giteec5016            meshclust2/2.1.0
   2brad_gatk/2019-01-22_git1fcc9e8              metal/2010-02-08
   admixture/1.3.0                               metal/2011-03-25                (D)
   angsd/0.923                                   metalge/2010-02-08
   annovar/2018apr                               minimac2/2014-09-15
   artemis/18.0.3                                minimac3/2.0.1
   augustus/3.3.2                                minimac4/1.0.0
   bamtools/2.5.1                                mirdeep2/0.1.0
   bamutil/1.0.14                                mixcr/3.0.3
   basemount/0.15.103.3011                       mmap/2018-04-07
   basespace-cli/0.8.12.590                      morgan/3.2
   basespace-cli/0.9.17                          morgan/3.4                      (D)
   basespace-cli/0.10.8                   (D)    mosdepth/0.2.6
   bayescan/2.1                                  mothur/1.35.0
   bbmap/38.16                                   multiqc/1.6
   bcbio/1.1.1                                   mummer/3.23

You can also search for packages by name. For example to see all versions of 'tensorflow', you can search for the word 'tensorflow' or a substring like 'tensor',

scc4% module avail tensor

--------------------------------- /share/module.7/machine-learning ------------------------------------------ 
   tensorflow/1.12    tensorflow/1.13.1    tensorflow/1.15.0 (D)    tensorflow/2.0.0

  Where:
   D:  Default Module

module spider

List available packages in a different format.

scc4% module spider

-----------------------------------------------------------------------------------------------------------
The following is a list of the modules currently available:
-----------------------------------------------------------------------------------------------------------
  2brad_denovo: 2brad_denovo/2019-01-22_giteec5016

  2brad_gatk: 2brad_gatk/2019-01-22_git1fcc9e8

  3d-ice: 3d-ice/2.2.6

  R: R/3.0.0, R/3.5.1, R/3.6.0_intel-2018, R/3.6.0, R/3.6.1_intel-2019

  admixture: admixture/1.3.0

  afni: afni/17.0.18-omp, afni/19.1.00-omp, afni/19.1.00, afni/2011-12-21.1014-xorg, afni/2011-12-21.1014

  amber: amber/16

  amgx: amgx/2019-12-13_gitb3101ff
    AmgX is a GPU accelerated core solver library that speeds up computationally intense linear solver
    portion of simulations.

  anaconda2: anaconda2/5.2.0

  anaconda3: anaconda3/5.2.0

You can also search for packages by name. For example to see all versions of 'tensorflow', you can search for the word 'tensorflow' or a substring like 'tensor',

scc4% module spider tensor

-----------------------------------------------------------------------------------------------------------
  tensorflow:
-----------------------------------------------------------------------------------------------------------
     Versions:
        tensorflow/1.12
        tensorflow/1.13.1
        tensorflow/1.15.0
        tensorflow/2.0.0

-----------------------------------------------------------------------------------------------------------
  For detailed information about a specific "tensorflow" module (including how to load the modules) use the module's full name.
  For example:

     $ module spider tensorflow/2.0.0
-----------------------------------------------------------------------------------------------------------

module help [modulefile]

scc4% module help gcc
------------------------------------ Module Specific Help for "gcc/8.3.0" -------------------------------------

gcc 8.3.0: GNU Compiler Collection (GCC)

C, C++, and Fortran compilers.

For more information on gcc, please see https://gcc.gnu.org/

The following environment variables are provided for convenience:
$SCC_GCC_DIR -- Base Package Directory
$SCC_GCC_BIN -- Package Executables Directory
$SCC_GCC_LIB -- Package Libraries Directory
$SCC_GCC_LICENSE -- Package License Information

module show [modulefile]

scc4% module show gcc
-----------------------------------------------------------------------------------------------------------
   /share/module.7/programming/gcc/8.3.0.lua:
-----------------------------------------------------------------------------------------------------------
help([[
gcc 8.3.0: GNU Compiler Collection (GCC)

C, C++, and Fortran compilers.

For more information on gcc, please see https://gcc.gnu.org/

The following environment variables are provided for convenience:
$SCC_GCC_DIR -- Base Package Directory
$SCC_GCC_BIN -- Package Executables Directory
$SCC_GCC_LIB -- Package Libraries Directory
$SCC_GCC_LICENSE -- Package License Information

]])
whatis("Name:         gcc")
whatis("Version:      8.3.0")
whatis("Description:  GNU Compiler Collection (GCC)")
whatis("URL:          https://gcc.gnu.org/")
whatis("Categories:   programming")
whatis("Keywords:     centos7, programming, gnu, compiler, c, c++, fortran")
setenv("SCC_GCC_DIR","/share/pkg.7/gcc/8.3.0/install")
setenv("SCC_GCC_BIN","/share/pkg.7/gcc/8.3.0/install/bin")
setenv("SCC_GCC_LIB","/share/pkg.7/gcc/8.3.0/install/lib64")
setenv("SCC_GCC_LIB32","/share/pkg.7/gcc/8.3.0/install/lib")
setenv("SCC_GCC_LICENSE","/share/pkg.7/gcc/8.3.0/install/COPYING")
prepend_path("PATH","/share/pkg.7/gcc/8.3.0/install/bin")
prepend_path("LD_LIBRARY_PATH","/share/pkg.7/gcc/8.3.0/install/lib")
prepend_path("LD_LIBRARY_PATH","/share/pkg.7/gcc/8.3.0/install/lib64")


Scripts and Batch Commands

To ensure that modules are loaded correctly within a script file add -l option to the first line of your script, i.e.:

#!/bin/bash -l 

When including modules in scripts and batch submission commands (via qsub), it is the best practice to specify modules and applications by version number. Over time, newer versions of the applications will be installed. Specifying versions of applications ensures that in the future jobs will run the same way as they do now.

Example:

module load tophat/tophat-2.0.4_gnu446

rather than

module load tophat

Load Modules Automatically

Modules can be automatically loaded on login by adding the module load command to a user’s .cshrc (for tcsh users) or .bashrc (for bash users) file. These files are located in the top level of a user’s home directory. RCS strongly recommends against this practice. It makes sharing job scripts and code between project users more difficult and can lead to module conflicts and unexpected software behavior as it is easy to forget over time that modules are being loaded automatically.

How to redirect module output

This answer also addresses: How do I grep 'module avail'? The short answer is: redirect standard error (stderr) to standard output (stdout). If you are using the bash shell, this is done using the '2>&1' syntax. For example, to search for python in the available modules, you can type:

scc4% module avail -t 2>&1 | grep -i python

In [t]csh, the command is a bit more complicated, because there is no trivial way to redirect stderr. The following example calls the module command in a separate process and then it pipes the stderr and stdout to grep:

scc4% (module avail -t) |& grep -i python
Note: module avail already has built-in search capabilities which avoids most of the need to use tools like grep.