Software Modules
Click here to download a printable, 1-page "Getting Started" tutorial for Software Modules.
CCV uses the Modules system for managing the software environment on OSCAR. The advantage of the modules approach is that it allows multiple versions of the same software to be installed at the same time. With the modules approach, you can "load'' and "unload'' modules to dynamically control your environment. You can also customize the default environment that is loaded when you login. Simply put the appropriate module commands in the .modules file in your home directory. For instance, if you edited your .modules file to contain
module load matlab
then the default module for Matlab will be available every time you log in.
Module commands
- module list
- Lists all modules that are currently loaded in your software environment:
-
$ module list
Currently Loaded Modulefiles:
1) gcc/4.5.1 4) scipy/0.8.0 7) suitesparse/3.4.0
2) python/2.6.6 5) gotoblas2/1.13 8) fftw/3.2.2
3) numpy/1.5.0 6) lapack/3.2.2
- module avail
- Lists all available modules on the system. Note that a module can multiple version numbers: this allows us to maintain legacy versions of software or to try out beta or preview versions without disrupting the stable versions.
-
$ module avail
-------------------------- /gpfs/runtime/modulefiles ---------------------------R/2.11.1 lapack/3.2.2 python/2.6.6
fftw/3.2.2 matlab/R2008b scipy/0.8.0
gcc/4.5.1 matlab/R2009b(default) suitesparse/3.4.0
gotoblas2/1.13 metis/4.0.1
hdf5/1.8.5 numpy/1.5.0
- module help modulefile
- Prints additional information about a module:
-
$ module help numpy
----------- Module Specific Help for 'numpy/1.5.0' ----------------
NumPy - Scientific Computing Tools for Python
Version 1.5.0
For more information, visit: http://numpy.scipy.org/
Dependencies (auto-loaded):
python/2.6.6 - module display modulefile
- Shows exactly what a given modulefile will do to your environment, such as what will be added to the PATH, MANPATH, etc. environment variables:
-
$ module display numpy
-------------------------------------------------------------------
/gpfs/runtime/modulefiles/numpy/1.5.0:
module-whatis NumPy - Scientific Computing Tools for Python
-
module load python/2.6.6
setenv NUMPY_DIR /gpfs/runtime/opt/numpy/1.5.0
prepend-path PATH /gpfs/runtime/opt/numpy/1.5.0/bin
prepend-path LD_LIBRARY_PATH /gpfs/runtime/opt/numpy/1.5.0/lib
prepend-path PYTHONPATH /gpfs/runtime/opt/numpy/1.5.0/lib/python2.6/site-packages
-------------------------------------------------------------------
- module load modulefile
- Adds a module to your current environment. It does so silently, unless there is a problem with the modulefile (in which case you should notify support). If you load the generic name of a module, you will get the default version. To load a specific version, load the module using its full name with the version:
$ module load gcc/4.5.1
- module unload modulefile
- Removes a module from your current environment:
$ module unload gcc
- module switch modulefile_old modulefile_new
- Different versions of entire software packages can be swapped with a single module command:
-
$ module switch gcc/4.4.1 gcc/4.5.1
