Module hierarchy
Environment modules are tools that dynamically change what software is available to use by a given user at a given time. For more information about modules and how to use them, see Introduction to environment modules and How to use environment modules.
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 have a module hierarchy that divides modules according to their stacks. Having a module hierarchy makes it much more difficult to accidentally load modules that 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.
Since not all directories are added to the $MODULEPATH
, not all modules can be found with module avail
by default.
Current hierarchy
/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
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]
Core
counts as a compiler.How to use the hierarchy
To find modules anywhere in the hierarchy, use the unity-module-find
command. The full path of your desired module shows you which other modules need to be loaded first.
Core
is always automatically added to $MODULEPATH
!The following code samples show how to use unity-module-find
to find modules anywhere in the hierarchy:
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
The following code sample shows the desired module:
linux-ubuntu20.04-x86_64/openmpi/4.1.3-3rgk3nu/intel-mkl/2020.4.304-gmusbfh/Core/gromacs/2021.3
The module path shows which modules you must load first. Based on that path, the following command is used to load the necessary modules:
module load openmpi/4.1.3 intel-mkl/2020.4.304 gromacs/2021.3