Environment modules are used on HPC to allow multiple versions of any given piece of software to sit on the same OS, giving you the ability to choose a version of software.
HPC cluster nodes have some convenient aliases configured (26-Jun-2017):
Using alias | is equivalent to ... | |
---|---|---|
module load gcc4 | module load gcc/4.9.4 | |
module load gcc5 | module load gcc/5.4.0 | |
module load gcc6 | module load gcc/6.3.0 | |
module load gcc7 | module load gcc/7.1.0 | |
module load python2 | module load python/2.7.13 | |
module load python3 | module load python/3.6.1 | |
module load java6 | module load java/1.6.0-sun | |
module load java7 | module load java/1.7.0-oracle | |
module load java8 | module load java/1.8.0-oracle | |
module load openjdk6 | module load java/1.6.0-openjdk | |
module load openjdk7 | module load java/1.7.0-openjdk | |
module load openjdk8 | module load java/1.8.0-openjdk |
Note: It is possible to have two or more versions of the same module loaded, but this cause problems and should be avoided. The reason for this is often that a major version change in software can result in significantly different syntax, so software developers maintain multiple, independent streams of their software. All aliases defined above can be considered examples of this.
A Brief Introduction to using environment modules
To view software under environment modules control, use the command:
module avail
To list the environment modules you have loaded, use the command:
module list
To load the contents of environment module (easier use of software) use the module load
command. For example, to load the contents of the module associated with the latest version of Oracle Java/JDK 1.8.0, you can use:
module load java/1.8.0-oracle
If you want to change the version of software you wish to use, the module switch
command can be used. For example, lets say that you have already loaded python/2.7.13
and want to switch to python/3.6.1.
This can be done with:
module switch python/3.6.1
To unload a module, use the module unload
command. For example:
module unload java/1.8.0-oracle
will backout changes made to your environment from a previous module load java/1.8.0-oracle
command. To unload (purge) all modules you have loaded, use the command:
module purge