5. Using the module environment
- 5.1 Information on the available modules
- 5.2 Loading, unloading and swapping modules
- 5.3 Things to watch out for
On HECToR facilities the module environment is widely used to manage the components of the systems software and also several supported application packages.
5.1 Information on the available modules
If you are looking for an application, library or tool on HECToR facilities , it might be installed already and ready to use. A simple module avail will list the modules available:
user@hector-xe6-4:~> module avail --------------------------------------- /opt/totalview-support/1.1.4/modulefiles --------------------------------------- totalview-mem-debug --------------------------------------- /opt/cray/xt-asyncpe/default/modulefiles --------------------------------------- craype-abudhabi craype-hugepages2M craype-mc12 craype-target-native craype-abudhabi-cu craype-hugepages512K craype-mc8 xtpe-network-gemini craype-accel-nvidia20 craype-hugepages64M craype-network-gemini xtpe-network-seastar craype-accel-nvidia35 craype-hugepages8M craype-network-seastar xtpe-target-native craype-barcelona craype-interlagos craype-shanghai craype-hugepages128K craype-interlagos-cu craype-target-compute_node craype-hugepages16M craype-istanbul craype-target-local_host ...
This will list all the names and versions of the modules available on the service. Not all of them will work in your account though, due to e.g. licencing restrictions. You will notice, for many modules we have more than one version, typically identified by their version number. One of these versions is marked as the default. As the service gets developed, the default will move. The webpage:
provides a time line of the default versions for a number of key components of the system software.
If you want more info on any of the modules, try module help:
user@hector-xe6-1:~> module help castep ----------- Module Specific Help for 'castep/6.1' ----------------- CASTEP 6.1 ============ This module sets up your environment to access CASTEP 6.1. Once loaded you can access the CASTEP executable using the name 'castep'. You can find example job submission scripts, compilation instructions and more details on the HECToR Website: http://www.hector.ac.uk/support/documentation/software/castep/ For access to CASTEP please contact the HECToR helpdesk at email@example.com Installed by: A. Turner, EPCC Date: 5 November 2012
A simple module list will give the names of the modules and their versions you have presently loaded
user@nid00004:~> module list Currently Loaded Modulefiles: 1) modules/184.108.40.206 2) nodestat/2.2-1.0400.31264.2.5.gem 3) sdb/1.0-1.0400.32124.7.19.gem 4) MySQL/5.0.64-1.0000.5053.22.1 5) lustre-cray_gem_s/1.8.6_220.127.116.11_0.3.2_1.0400.6453.7.1-1.0400.39662.3.1 6) udreg/2.3.1-1.0400.4264.3.1.gem 7) ugni/2.3-1.0400.4374.4.88.gem 8) gni-headers/2.1-1.0400.4351.3.1.gem 9) dmapp/3.2.1-1.0400.4255.2.159.gem 10) xpmem/0.1-2.0400.31280.3.1.gem 11) hss-llm/6.0.0 12) Base-opts/1.0.2-1.0400.31284.2.2.gem 13) xtpe-network-gemini 14) cce/8.1.8 15) totalview-support/1.1.4 16) xt-totalview/8.11.0 17) acml/5.3.0 18) xt-libsci/12.0.02 19) pmi/4.0.0-1.0000.9282.69.4.gem 20) rca/1.0.0-2.0400.31553.3.58.gem 21) xt-asyncpe/5.20 22) atp/1.6.2 23) PrgEnv-cray/4.0.46 24) pbs/10.2.2.113537 25) packages-phase3 26) bolt/0.5 27) budgets/1.0 28) craype-interlagos 29) cray-mpich2/5.6.5
5.2 Loading, unloading and swapping modules
To load a module to use module add
module add cray-libsci
will load the default version of the Cray Scientific Library, libsci. If you need a specfic version of this,
module add cray-libsci/12.0.02
will load version 12.0.02 for you, regardless of the default.
If you want to clean up, module remove will remove a loaded module
module remove cray-libsci
will unload what ever version of the libsci (even if it is not the default) you might have loaded. There are many situations in which you might want to change the presently loaded version against a different one, e.g. trying the latest version which is not yet the default or using a legacy version to keep compatibility with old data. This can be achieved easiest by using module swap oldmodule newmodule. Suppose you have loaded version 11.1.01 of libsci,
module swap cray-libsci/11.1.01 xt-libsci/12.0.02
will change to version 12.0.02.
Additional help on using modules is available
5.3 Things to watch out for
Modules can depend or conflict with each other. In many cases modules are guarded against conflict. If you have loaded fftw/3.1.1 loading fftw/2.1.5 would lead to conflict. If you try this, you get
user@hector-xe6-4:~> module load vasp5/5.3.3 vasp5/5.3.3(9):ERROR:150: Module 'vasp5/5.3.3' conflicts with the currently loaded module(s) 'vasp5/5.3.2' vasp5/5.3.3(9):ERROR:102: Tcl command execution failed: conflict vasp5
which tells you about the conflict. To resolve this use module vasp5 vasp5/5.3.3 instead.
For the compilers to work correctly, you have to make sure you have the right PrgEnv module loaded. How to use the compiler modules is described in detail in the Compilation section: