Environment Modules

QUICK START

$ module avail
  ^-- run this first to see a list of all available software

$ module load LANG/PYTHON/2.7.13-SYSTEM
  ^-- use modules to place a newer Python in your $PATH

$ which python
  /rcg/software/Linux/Ubuntu/16.04/amd64/LANG/PYTHON/2.7.13-SYSTEM/bin/python
  ^-- now if you run `python`, you'll get a v2.7.13

ADVANCED COMMANDS

$ module list
  ^-- show what's currently loaded

$ module purge
  ^-- unload all environment modules

$ module unload LANG/PYTHON/2.7.13-SYSTEM
  ^-- unload a single environment module

$ module switch LANG/PYTHON/3.6.2-SYSTEM
  ^-- switch to a different version

I DON’T SEE THE SOFTWARE I WANT

E-mail research-support@sfu.ca if you have requests for additional software. Be sure to include a download URL and the hostname of your workstation.

HOW TO I COMPILE SOFTWARE AGAINST LIB/X?

Each module appends your INCLUDE_PATH and LD_LIBRARY_PATH where appropriate. Most clean, well-architected build scripts will pick these up automatically.

If you’re dealing with a stubborn configure or compile process, you can find the paths you’ll need to link or include by running module show:

$ module show LANG/PYTHON/3.6.2-SYSTEM
-------------------------------------------------------------------
prepend-path     LD_LIBRARY_PATH /rcg/software/Linux/Ubuntu/16.04/amd64/LANG/PYTHON/3.6.2-SYSTEM/lib64
prepend-path     INCLUDE /rcg/software/Linux/Ubuntu/16.04/amd64/LANG/PYTHON/3.6.2-SYSTEM/include

AUTOMATICALLY LOADING MODULES AT LOGIN

~/privatemodules/login is loaded automatically when spawning a new shell. To ensure the latest Python and emacs are available in all new shells:

cat > ~/privatemodules/login
#%Module1.0
module load TOOLS/EMACS/26.1
module load LANG/PYTHON/3.6.2-SYSTEM

It is not a good idea to add module load commands to your ~/.bashrc or ~/.bash_profile as this may break SFTP.

WHY THIS CRAZY MODULE STUFF?

“Can’t you just install X on my workstation?”

Whenever possible, we make software available as environment modules to:

  1. Make it accessible to everyone.
  2. Free up time & avoid customizing workstations.
  3. Make it easy to switch between multiple versions of something.
  4. Mimic what supercomputing facilities do so it’s easier to start running your code on e.g., Cedar.

Details

Article ID: 3930
Created
Wed 7/6/22 6:48 PM
Modified
Wed 7/6/22 6:48 PM