Skip to content

Commit c695add

Browse files
committed
address a few comments
1 parent 3485e51 commit c695add

1 file changed

Lines changed: 18 additions & 11 deletions

File tree

docs/blog/posts/2026/02/Spack-on-top-of-EESSI-best-of-both-worlds.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,24 @@ This utility provides you with a pre-configured EasyBuild installation that you
2222
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.
2323
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.
2424

25+
<!-- more -->
26+
27+
2528
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.
2629
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.
2730

2831
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.
2932

30-
<!-- more -->
31-
32-
3333
## How it works
3434

3535
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
3739

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.)
3943

4044
We implement the following workflow to connect Spack to EESSI, and build a new Quantum ESPRESSO with Spack reusing EESSI packages as dependencies.
4145

@@ -48,16 +52,18 @@ Declare EESSI software-layer builds as [external packages](https://spack.readthe
4852

4953
*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.
5054

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+
5459
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.
5560

5661

5762
### Step 2 – (optional, suggested) EESSI compat-layer
5863

5964
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+
6167
This can be done automatically via `spack external find`:
6268

6369
![Detect compat-layer packages with spack external find](spack-eessi-20260205-002.webp)
@@ -80,7 +86,8 @@ We first check what the concretizer comes up with, using `spack spec`:
8086

8187
![Spack spec for quantum-espresso](spack-eessi-20260205-004.webp)
8288

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`.
8491

8592
Finally, we can proceed with the installation with `spack install quantum-espresso~mpi`:
8693

@@ -97,7 +104,7 @@ When we inspect the `pw.x` binary, we can see that it links to libraries provide
97104

98105
![Inspecting the list of libraries that `pw.x` binary links to](spack-eessi-20260205-007.webp)
99106

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).
101108

102109

103110
## Demo code

0 commit comments

Comments
 (0)