Linux Software Modules

Environmental modules for Linux software installations

A large amount of software available to managed Engineering Linux computers is available via environment modules. These modules allow Engineering IT to distribute large software packages without having to install the software on individual machines. They also allow Engineering Linux users access to multiple versions of popular software, such as Mathematica or MATLAB.

List of Linux Software Modules

How to use the Software Module System

module list

To see what modules you currently have loaded, use the 'module list' command:

-bash-4.1$ module list
Currently Loaded Modulefiles:
1) sun-jdk/1.6.0-latest-el6-x86_64 4) env/enx 
2) hadoop/1.0.4                    5) matlab/R2011a 
3) env/engr-hadoop 

module avail

To see what additional software modules are available, use the 'module avail' command:

------------------------ /usr/share/Modules/modulefiles ------------------------
dot         module-cvs  module-info modules     null        use.own
------------------------------- /etc/modulefiles -------------------------------
abaqus-research/6.10-1(default)
abaqus/6.10-1(default)
...
vtune_amplifier/2011u4(default)
xcrysden/1.5.53
----------------------------------- Aliases ------------------------------------
----------------------------------- Versions -----------------------------------

The above list has been shortened intentionally as the list of available software is rather long and constantly growing.

While you may see a software module that you may want to use listed as available, some are only available to specific research groups or instructional labs due to difference in licensing or licenses purchased by individual research groups. For instance, in the above list you see two versions of the Abaqus module. The module called "abaqus" uses the general instructional license, while "abaqus-research" uses the research license.

module load

If the software you need to use has a module available for it, use the 'module load' command to load it. For instance, if you wanted to load Mathematica you would use 'module load mathematica':

-bash-4.1$ module list
Currently Loaded Modulefiles:
 1) sun-jdk/1.6.0-latest-el6-x86_64  4) env/enx
 2) hadoop/1.0.4                     5) matlab/R2011a
 3) env/engr-hadoop
-bash-4.1$ which mathematica
/usr/bin/which: no mathematica in (/software/hadoop-1.0.4/bin:/software/sun-jdk-1.6.0-latest-el6-x86_64/bin:/srv/adm/bin:/usr/lib64/qt-3.3/bin:/usr/NX/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin)

-bash-4.1$ module load mathematica

-bash-4.1$ module list
Currently Loaded Modulefiles:
 1) sun-jdk/1.6.0-latest-el6-x86_64  4) env/enx
 2) hadoop/1.0.4                     5) mathematica/8.0
 3) env/engr-hadoop
-bash-4.1$ which mathematica
/software/Mathematica-8.0/bin/mathematica

That's all it takes to load a module and you may immediately begin using the software. Note that you do not need to use the full module name of software/version that is displayed through module avail unless you are trying to load a specific version of the software. In the example above, 'module load mathematica' and 'module load mathematica/8.0' would mean the same thing.

module unload

When you are no longer using a particular software module, you may 'remove' it by using the 'module unload' command:

-bash-4.1$ module list
Currently Loaded Modulefiles:
 1) sun-jdk/1.6.0-latest-el6-x86_64  4) env/enx
 2) hadoop/1.0.4                     5) mathematica/8.0
 3) env/engr-hadoop

-bash-4.1$ module unload mathematica

-bash-4.1$ module list
Currently Loaded Modulefiles:
 1) sun-jdk/1.6.0-latest-el6-x86_64  3) env/engr-hadoop
 2) hadoop/1.0.4                     4) env/enx

Although it is not necessary to unload modules when you are no longer using the software, by doing so you can switch between multiple versions of software while keeping your environment clean and consistent.

Loading different software version modules

Several of the software packages available as modules have multiple versions of the software available. Take a look at MATLAB, for example:

-bash-4.1$ module avail
...
matlab-research/R2011a(default)
matlab-research/R2013a
matlab/R2009a
matlab/R2010b
matlab/R2011a(default)
matlab/R2013a
...

When you issue a 'module load matlab' command the version of MATLAB that will load is indicated by the '(default)' descriptor next to it. In this case R2011a will be loaded. If you wish to use another available version, you must use the full module name. If you were to load R2013a you would use 'module load matlab/R2013a'.

Loading the default version:

-bash-4.1$ module load matlab
-bash-4.1$ module list
Currently Loaded Modulefiles:
 1) sun-jdk/1.6.0-latest-el6-x86_64  4) env/enx
 2) hadoop/1.0.4                     5) matlab/R2011a
 3) env/engr-hadoop

Loading a specific version:

-bash-4.1$ module load matlab/R2013a
-bash-4.1$ module list
Currently Loaded Modulefiles:
 1) sun-jdk/1.6.0-latest-el6-x86_64  4) env/enx
 2) hadoop/1.0.4                     5) matlab/R2013a
 3) env/engr-hadoop

module switch

If you currently have one version of a module loaded and wish to use another, you may use the shorthand 'module switch' command rather than unloading the old version's module and loading loading the new one. The syntax for this is 'module switch currentmodule newmodule'.

-bash-4.1$ module list
Currently Loaded Modulefiles:
 1) sun-jdk/1.6.0-latest-el6-x86_64  4) env/enx
 2) hadoop/1.0.4                     5) matlab/R2011a
 3) env/engr-hadoop

-bash-4.1$ module switch matlab matlab/R2013a

-bash-4.1$ module list
Currently Loaded Modulefiles:
 1) sun-jdk/1.6.0-latest-el6-x86_64  4) env/enx
 2) hadoop/1.0.4                     5) matlab/R2013a

non-module software

Some packages are installed on your system directly without the need to use modules. This includes most of the dependencies that the software modules may have, or smaller or more common packages available in the yum repositories, such as gcc and make.



Keywords:
linux Linux software modules 
Doc ID:
81201
Owned by:
Gianni P. in Engineering IT
Shared Services
Created:
2018-03-28
Updated:
2023-08-07
Sites:
University of Illinois Engineering IT