Spack Generated Modules

Environment modules are used on the LRZ HPC systems to manage the environment variables in shells and scripting languages. They also permit to provision of multiple versions of packages.

On HPC platforms hosted at LRZ, much of the software provided to the users is generated using Spack. 

Spack is a tool to automatize and manage the builds of software packages. 

Access to Software Stacks

Spack generated software stack can be access via modules. For example, asking for how many individual software stacks are availalble on a present system,

> module avail spack

You will get a list which looks (can differ depending on which system and software stack a user is using) like the following,   

spack/21.1.1
spack/22.2.1
spack/23.1.0

To avail a software stack in your terminal,

> module load spack/22.2.1 

or 

> module load spack/23.1.0

If a software stack is already loaded in your terminal, its best to purge the existing spack module, and load a new one like following,

> module purge -s ; module load spack/23.1.0

or 

> module purge -s ; module load spack/22.2.1

Module purge will guarantee that no auto loaded modules are kept when swapping the spack modules. Swapping a spack module is essentially swapping a complete software stack, hence using purge makes sense here.

Spack-generated modules Naming conventions

Environment modules generated by Spack use the naming scheme

<package name>/<full version number>[-<suffix1>][-<suffix2>][…]

It is highly recommended to use the complete module name when using the spack-generated modules. If you need a specific supplied version, you will have to specify the version number explicitly.

For example, asking for how many PARMETIS modules are available, do the following

> module av parmetis

You will get a list which looks (can differ depending on which system and software stack a user is using) like the following,   

parmetis/4.0.3-gcc12-impi-i32-r32
parmetis/4.0.3-gcc12-impi-i64-r64
parmetis/4.0.3-gcc12-ompi-i32-r32
parmetis/4.0.3-gcc12-ompi-i64-r64
parmetis/4.0.3-intel23-impi-i32-r32
parmetis/4.0.3-intel23-impi-i64-r64
parmetis/4.0.3-intel23-ompi-i32-r32
parmetis/4.0.3-intel23-ompi-i64-r64  

To load a specific module of parmetis, as recommended, a user must use a complete module name, like the following,

> module load parmetis/4.0.3-intel23-impi-i32-r32

> module load <package name> will just give you the highest lexical version.


Suffix

Description

Example

-intel<version>

E.g. intel23, intel21

compiled with the Intel 23 (major version) compiler 

gsl/2.7-intel23

-gcc<version>

E.g. gcc12, gcc11

compiled with the gcc 12 (major version) compiler 

gsl/2.7-gcc12

-impiwith MPI support (Intel MPI)

parmetis/4.0.3-intel23-impi-i32-r32

-ompi

with MPI support (OpenMPI)

parmetis/4.0.3-intel23-ompi-i32-r32

-openmpwith threading support by OpenMP

elpa/2022.11.001-intel23-impi-openmp

-i32 / -i64
-r32 / -r64

32/64 bit integer/float support

metis/5.1.0-gcc12-i32-r32

-X11with X11 support

gnuplot/5.4.3-X11

-pythonwith python support


LRZ will periodically release a new version of the software stack built with Spack and change the default version to the new release. Older versions will remain available by loading specific modules, e.g.

module switch spack/21.1.1


Release
number
(click for details)


Release
date


Platform

Default VersionsPlatforms
GCCIntelIntel MPISuperMUC-NG Phase 2SuperMUC-NG Phase 1CoolMUC-2CoolMUC-3
24.1.011/2023SLES15> 13.x.x> 2023.2.x

> 2021.11.x

(Haken) (default)(Minus)(Minus)(Minus)
23.1.005/2023SLES1512.2.02023.1.0

2021.9.0

(Minus) (Haken)(Haken)(Minus)
22.2.104/2022SLES1511.2.021.4.0

2019.12.320

(Minus)(Haken) (default)(Haken) (default)(Minus)
21.1.106/2021SLES158.4.019.0.5

2019.8

(Minus)(Haken)(Haken)(Minus)
19.212/2019SLES127.3.019.0.42019.4(Minus)(Minus)(Minus)(Haken) 

Please be aware that not all platforms will have the same set of packages and modules. In particular, commercial software may be restricted to certain machines.

Support for Spack in User Space

We provide a preconfigured spack installation that allows users to build their own packages and modules in their home directory. It will build upon the packages installed by LRZ via the spack chaining mechanism. A 'module load user_spack' activates this environment. Please check here for a detailed usage description.

Package Variables

When loading a module, package-specific environment variables follow the conventions given in this section. In the following table, the placeholder **PACKAGE** is used for the package name.

These variables can be used in scripts and Makefiles e.g. mpif90 … $MKL_LIB

Generic Name

Description

PACKAGE_BASE

base directory for the package

PACKAGE_LIBDIR

library directory for the package, usually $PAC_BASE/lib

PACKAGE_LIB

library setting for (static) linking, typically $PAC_BASE/lib/lib<library_name.a>

PACKAGE_SHLIB

library setting for dynamic linking, typically -L$PAC_BASE/lib -l<library_name>

PACKAGE_INC

include the setting for compilation, usually -I$PAC_BASE/include

PACKAGE_DOC

the directory containing documentation (in other than man or info format)

PACKAGE_WWW

URL refers to the location of package-specific documentation.

 Note that occasionally a module may contain sub-packages e.g., SUB, in which case additional variables of the form PAC_SUB_LIB, etc. may be defined.