CBCB Software Modules: Difference between revisions

From Cbcb
Jump to navigation Jump to search
Line 66: Line 66:


The command <code>module avail</code> only lists modulefiles that appear in directories that have been added to your <code>$MODULEPATH</code> environment variable (either by hand or via <code>module use</code> command).
The command <code>module avail</code> only lists modulefiles that appear in directories that have been added to your <code>$MODULEPATH</code> environment variable (either by hand or via <code>module use</code> command).
To see all modulefiles that are available for your use in both from the Common Modules and from the User Modules:
To see all modulefiles that are available for your use in both the Common Modules and the User Modules:


<pre>
<pre>

Revision as of 15:39, 19 June 2015

Starting in the Spring of 2015, communal CBCB Bioinformatics Software has been installed using GNU Modules. Please note that the instructions below are for use with Red Hat 7 machines only.

Common Modules

CBCB Software modules are already configured for interactive shells on Red Hat 7 machines - no additional setup is required. The module files are installed in the following location:

/cbcb/sw/RedHat-7-x86_64/common/modules/release/latest

To see see what modules are available:

$ module avail

To add a module to your environment, use module add:

$ module add samtools/0.1.19

Note that you can also specify the software name without the version:

$ module add samtools

Now samtools has been added to your environment:

$ which samtools
/cbcb/sw/RedHat-7-x86_64/common/local/samtools/0.1.19/bin/samtools

User Modules

We have created some scripts to assist you with installing software and modules to your user directory in /cbcb/sw. We recommend that you use these scripts because this will help us share installed software among other CBCB users.

Run this initialization script to set up your directory structure:

$ /cbcb/sw/RedHat-7-x86_64/common/scripts/init_cbcb_sw_user.sh

This will create a directory for you:

$ tree /cbcb/sw/RedHat-7-x86_64/users/<username>
/cbcb/sw/RedHat-7-x86_64/users/<username>
├── local
├── modules
│   └── <username>
│       └── env
├── module_template
├── README
├── scripts
│   ├── copy_module_template.sh
│   ├── init_install_vars.sh
│   └── install_package.sh
└── src
  • Use the src directory for storing and compiling source code.
  • Use the local directory as the installation prefix.
  • Use the modules directory to store your modulefiles.

See #Installing Software below.

To make use of your personal module file directory, add the following to your ~/.bashrc:

module use /cbcb/sw/RedHat-7-x86_64/users/<username>/modules


Installing Software

Use the install_package.sh script to automatically compile software that uses ./configure; make; make install. The advantage to using this install script is that it will:

  • use the standardized directory structure for personal software installation, and
  • automatically create a module file for the software in your modules directory!


For full details, read the README placed in your personal directory (/cbcb/sw/RedHat-7-x86_64/users/<username>). It's also available in the cbcb-sw Gitlab repository.

Listing All Modules

The command module avail only lists modulefiles that appear in directories that have been added to your $MODULEPATH environment variable (either by hand or via module use command). To see all modulefiles that are available for your use in both the Common Modules and the User Modules:

cat /cbcb/sw/RedHat-7-x86_64/common/all_modules.txt

or see here.

Setup for non-interactive shells

Modules are already configured for interactive shells, but to use modules with non-interactive shells such as Torque, add the following to your ~/.bashrc:

. /usr/share/Modules/init/bash
. /etc/profile.d/ummodules.sh

For more information, see the UMIACS wiki.

GNU Modules Cheatsheet

Ask for help:

module --help

List available modules:

module avail

Add a module to your environment:

module add blast

List loaded modules:

module list

Remove a module from your environment:

module rm blast

Remove all modules from your environment:

module purge

Add a path to search for available modules:

module use /cbcb/sw/RedHat-7-x86_64/users/lmendelo/modules

See what changes a module makes to your environment:

module show Python2/common/2.7.9

Contact

Brought to you by:

See Also