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. When viewed from an individual user point of view this may seem complex, however it is necessary in a multi-user environment.
Note: It is possible to have two or more versions of the same module loaded, but this can 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.
Most module files, when loaded, will set an environment variable
<SOFTWARE>_HOME which holds the installation home for the software. For example, try
module load vcftools echo $VCFTOOLS_HOME ls -lR $VCFTOOLS_HOME
The most common environment variable modified by the loading of an environment variable is
Some other commonly modified environment variables are:
Environment modules are not usually created for Python extensions. Loading a specific python version will usually enable use of all extensions. Note that some extensions may not be available for all versions of python.
Software that includes perl extensions will usually modify the
PERL5LIB environment variables.
For Java based software, there will often be an alias set that simplifies things for users. For example a
module load picard
will create a
picard alias that expands to
java -jar $PICARD_HOME/picard.jar