Skip to content

Module Hierarchy

Environment Modules is a tool to change dynamically what software is available for use by a given user at a given time. Before you read this, it's recommended that you first read the introduction and the module usage guide.

As a Unity user, you have access to many modules built with various software stacks. As Unity grows and more modules are installed with more stacks, it can become difficult to effectively manage them all. Our strategy is to create a module hierarchy to divide modules according to their stacks. This makes it much more difficult to accidentally load modules which are incompatible with each other.

The $MODULEPATH environment variable is a list of directories in which Lmod searches for modules. With a module hierarchy, not all directories are added to the modulepath by default.

This means not all modules can be found with module avail by default.

Here is the full Unity module hierarchy as of 2023/4/15:

Compilers are red, and providers are blue.

/modules/modulefiles/

/modules/spack_modulefiles/
├── linux-ubuntu20.04-x86_64
|   ├── Core
|   ├── intel
|   │   └── 2021.4.0
|   ├── atlas
|   │   └── 3.10.3-sfhhdph
|   │       └── Core
|   ├── intel-oneapi-mpi
|   │   └── 2021.6.0-h3cppyo
|   │       ├── Core
|   │       └── openblas
|   │           └── 0.3.18-6pbqv7b
|   │               └── Core
|   ├── openblas
|   │   └── 0.3.18-6pbqv7b
|   │       └── Core
|   └── openmpi
|       ├── 4.1.3-3rgk3nu
|       │   ├── Core
|       │   └── intel-mkl
|       │       └── 2020.4.304-gmusbfh
|       │           └── Core
|       └── 4.1.4-tauaqk4
|           ├── Core
|           └── intel-mkl
|               └── 2020.4.304-gmusbfh
|                   └── Core
├── linux-ubuntu20.04-aarch64
│   └── Core
└── linux-ubuntu20.04-ppc64le
    ├── Core
    ├── openblas
    │   └── 0.3.21-coxg6gz
    │       └── Core
    └── openmpi
        ├── 4.1.3-edoxxdf
        │   ├── Core
        │   └── xl
        │       └── 16.1
        └── 4.1.4-476r55m
            └── Core

Note

Random characters at the end of compiler/provider version numbers can usually be ignored.

Core refers to modules compiled with Ubuntu's default GNU compiler suite, and without any special providers. The majority of Unity's modules are found here.

intel refers to the classic intel compilers (icc, ifort, icpc, ...).

The intel-oneapi-compilers-classic module adds intel to modulepath.

Hierarchy naming scheme

linux-ubuntu20.04-[architecture]/[compiler]/[name]/[version]
linux-ubuntu20.04-[architecture]/[provider]/[compiler]/[name]/[version]
linux-ubuntu20.04-[architecture]/[provider]/[another-provider]/[compiler]/[name]/[version]
  • In this naming scheme, Core counts as a compiler.

How to use the hierarchy

You can find modules anywhere in the hierarchy with the unity-module-find command.

From the full path of your desired module you should be able to tell which other modules need to be loaded first.

Note

Core is always automatically added to $MODULEPATH!

Example:

user@login1:~$ module load gromacs/2021.3
No module(s) or extension(s) found!
If the avail list is too long consider trying:

"module --default avail" or "ml -d av" to just list the default modules.
"module overview" or "ml ov" to display the number of modules for each name.

Use "module spider" to find all possible modules and extensions.
Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys".
user@login1:~$ unity-module-find gromacs
Modules found:
linux-ubuntu20.04-x86_64/intel-oneapi-mpi/2021.6.0-h3cppyo/Core/gromacs/2021.3
linux-ubuntu20.04-x86_64/openmpi/4.1.3-3rgk3nu/intel-mkl/2020.4.304-gmusbfh/Core/gromacs/2021.3

This is the module that I want:

linux-ubuntu20.04-x86_64/openmpi/4.1.3-3rgk3nu/intel-mkl/2020.4.304-gmusbfh/Core/gromacs/2021.3

In that path I can see which modules must loaded first. The new command becomes:

$ module load openmpi/4.1.3 intel-mkl/2020.4.304 gromacs/2021.3

Learn more

About the Hierarchy Change

https://lmod.readthedocs.io/en/latest/010_user.html#module-hierarchy

https://lmod.readthedocs.io/en/latest/080_hierarchy.html