You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/blog/posts/2026/02/Spack-on-top-of-EESSI-best-of-both-worlds.md
+18-11Lines changed: 18 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,20 +22,24 @@ This utility provides you with a pre-configured EasyBuild installation that you
22
22
Like EasyBuild, [Spack](https://spack.io) is a flexible build tool that also offers a vast repository of build recipes maintained by a large and active community, making it a familiar tool for many HPC users.
23
23
By enabling Spack to leverage packages already available in EESSI as dependencies, we can offer users the best of both worlds: the convenience of a pre-built, optimized software stack combined with the flexibility to quickly build new packages using tools they already know.
24
24
25
+
<!-- more -->
26
+
27
+
25
28
In a previous [blog post](https://www.eessi.io/docs/blog/2026/01/09/Spack-on-top-of-EESSI-PoC/), we presented a first proof-of-concept implementation of this vision.
26
29
We used a custom-built upstream database to make Spack aware of EESSI's software stack and managed to build a new Quantum ESPRESSO installation that reused dependencies from EESSI.
27
30
28
31
Thanks to recent updates to Spack (in particular, treating externals as concrete specs and allowing the definition of dependencies – see [this PR](https://github.com/spack/spack/pull/51118)) and an active collaboration with its developers, it is now possible to connect Spack and EESSI in a *seamless* and *Spack-native* way.
29
32
30
-
<!-- more -->
31
-
32
-
33
33
## How it works
34
34
35
35
Spack 1.1+ introduces external packages treated as concrete specs (i.e. like any other spec), with dependency support, allowing us to expose EESSI packages as externals along with their dependencies.
36
-
This is the proper, *Spack-onic* way to achieve our goal, and it does not require any* modification of Spack's source code, nor the creation of a custom database.
36
+
This is the proper, *Spack-onic* way to achieve our goal, and it does not require any modification of Spack's source code, nor the creation of a custom database.
37
+
38
+
!!! note
37
39
38
-
(*note: currently we need to add a small patch to Spack, to make sure its compiler wrapper works correctly with the unusual sysroot configuration of EESSI. This is a known [issue](https://github.com/spack/spack/issues/51582) that will be addressed in future Spack releases.)
40
+
Currently we need to add a small patch to Spack to make sure its compiler wrapper works correctly
41
+
with the unusual sysroot configuration of EESSI. This is a known
42
+
[issue](https://github.com/spack/spack/issues/51582) that will be addressed in future Spack releases.)
39
43
40
44
We implement the following workflow to connect Spack to EESSI, and build a new Quantum ESPRESSO with Spack reusing EESSI packages as dependencies.
*Variants* (e.g. `~mpi+openmp`) should be specified to the best of our knowledge. By default, Spack will fill in the gaps with the package's default variants.
50
54
51
-
*Link* and *runtime dependencies* should be specified whenever possible. Pure build dependencies are not needed (the only exception being the *compiler*, Spack can reuse this information).
52
-
A dependency spec should unambiguously point to another declared external package. If an ambiguity exists, Spack will throw an error.<br>
53
-
Many packages in EESSI depends on packages of the compatibility layer (e.g. `zlib`), that were filtered out during the build process. To detect these packages, see the [next step](#step-2-optional-suggested-eessi-compat-layer).<br>
55
+
*Link* and *runtime dependencies* should be specified whenever possible. Pure build dependencies are not needed (the only exception being the *compiler*, Spack can reuse this information). A dependency spec should unambiguously point to another declared external package. If an ambiguity exists, Spack will throw an error.
56
+
57
+
Many packages in EESSI depends on packages of the compatibility layer (e.g. `zlib`), that were filtered out during the build process. To detect these packages, see the [next step](#step-2-optional-suggested-eessi-compat-layer).
58
+
54
59
Anyway, software packages in EESSI are always RPATH-ed to their dependencies, so in most real-case scenarios linking will likely work even if you forget to declare some dependencies.
It is possible to detect OS packages available under the EESSI compat-layer and configure Spack to use them as externals.
60
-
In EESSI, these packages are often dependencies of software-layer packages (see previous example), so it is suggested to include them.<br>
65
+
In EESSI, these packages are often dependencies of software-layer packages (see previous example), so it is suggested to include them.
66
+
61
67
This can be done automatically via `spack external find`:
62
68
63
69

@@ -80,7 +86,8 @@ We first check what the concretizer comes up with, using `spack spec`:
80
86
81
87

82
88
83
-
Looks good! Spack is reusing EESSI packages as external dependencies, and only needs to build the new package itself and a few (Spack-specific) ones (`compiler-wrapper`, `gcc-runtime` which is copy of runtime libraries).
89
+
Looks good! Spack is reusing EESSI packages as external dependencies.
90
+
It only needs to build the new `quantum-espresso` itself and a few Spack-specific packages: `compiler-wrapper` that is Spack's compiler wrapper, and `gcc-runtime` that is a local copy of the GCC runtime libraries that are provided by EESSI's `gcc@13.2.0`.
84
91
85
92
Finally, we can proceed with the installation with `spack install quantum-espresso~mpi`:
86
93
@@ -97,7 +104,7 @@ When we inspect the `pw.x` binary, we can see that it links to libraries provide
97
104
98
105

99
106
100
-
(the only exception being `libgomp`, `libgfortran`, `libgcc_s` which come from the `gcc-runtime` package that Spack installs: this is just a local copy of the GCC runtime libraries that were provided by EESSI's `gcc@13.2.0`).
107
+
(the only exception being `libgomp`, `libgfortran`, `libgcc_s` which come from the `gcc-runtime` package that Spack installs).
0 commit comments