Skip to content

Commit de6da83

Browse files
authored
Merge pull request #653 from boegel/spack-poc
add blog post on PoC with using Spack on top of EESSI
2 parents 08d887d + 23a70f7 commit de6da83

9 files changed

+99
-0
lines changed

docs/blog/.authors.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,8 @@ authors:
7979
description: CECAM-HQ (EPFL)
8080
avatar: https://avatars.githubusercontent.com/u/34096612?v=4
8181
slug: https://github.com/Crivella
82+
lorisercole:
83+
name: Loris Ercole
84+
description: CECAM-HQ (EPFL)
85+
avatar: https://avatars.githubusercontent.com/u/30901257?v=4
86+
slug: https://github.com/lorisercole
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
authors: [lorisercole, ocaisa, boegel]
3+
date: 2026-01-09
4+
slug: Spack-on-top-of-EESSI-PoC
5+
---
6+
7+
# Using Spack on top of EESSI: A Proof of Concept
8+
9+
<figure markdown="span">
10+
![Spack + EESSI](spack-plus-eessi.webp){width=75%}
11+
</figure>
12+
13+
EESSI provides a rich set of software installations, which were built and installed using
14+
[EasyBuild](https://easybuild.io).
15+
16+
Can we convince [Spack](https://spack.io) to reuse software installed in EESSI,
17+
and by doing so make EESSI more attractive to those of you who prefer using Spack over EasyBuild?
18+
19+
Several people have expressed interest in exposing the software installations provided by EESSI
20+
to Spack, so they can be used as dependencies when building and installing software with Spack.
21+
22+
Recently, we have explored how this could be achieved through a proof-of-concept with [QuantumESPRESSO](https://www.quantum-espresso.org/).
23+
24+
The goal here is to build and install only QuantumESPRESSO with Spack,
25+
and leveraging software installations from EESSI for all required dependencies, including the compiler and libraries for MPI, BLAS/LAPACK, FFTW, etc.
26+
27+
<!-- more -->
28+
29+
### Step 1: A Spack database for EESSI
30+
31+
To get started, we created an external *Spack database* using the [`spack.database.Database` class](https://spack.readthedocs.io/en/latest/spack.html#module-spack.database)
32+
that Spack provides, which exposes software installed in EESSI to Spack.
33+
34+
This was done through a Python script, and only for a small set of hand-picked software
35+
installations: those that are build or runtime dependencies of QuantumESPRESSO.
36+
37+
Using `spack find`, we can check whether Spack is aware of these installations:
38+
39+
![Spack database for software installations included in EESSI](spack-eessi-20251106-001.webp)
40+
41+
Looks good so far...
42+
43+
44+
### Step 2: Checking required dependencies for QuantumESPRESSO
45+
46+
Spack being aware of software installed in EESSI is not sufficient though.
47+
We need to make sure those installations are also actually *used* by Spack to resolve required dependencies.
48+
49+
For this, we need to provide the necessary metadata for those installations,
50+
including which [*variants*](https://spack.readthedocs.io/en/latest/packaging_guide_creation.html#variants) they provide.
51+
When done correctly, we can see that all required dependencies are indeed resolved using `spack spec`:
52+
53+
![Checking required dependencies with `spack spec`](spack-eessi-20251106-002.webp)
54+
55+
Here, we use `@7.4.1` to specify the QuantumESPRESSO version we want to install,
56+
and `~mpi` to ensure that the QuantumESPRESSO installation will have MPI support.
57+
58+
59+
### Step 3: Installing QuantumESPRESSO with Spack
60+
61+
The real test consist of actually trying to build and install QuantumESPRESSO using Spack,
62+
by running `spack install quantum-espresso`:
63+
64+
![Installing QuantumESPRESSO with `spack install`](spack-eessi-20251106-003.webp)
65+
66+
That worked like charm!
67+
68+
69+
### Step 4: Running QuantumESPRESSO
70+
71+
Finally, we try to actually *run* QuantumESPRESSO as it was installed with Spack.
72+
73+
We set up the environment with `spack load quantum-espresso`, and feed an input file into the main command `pw.x`:
74+
75+
![Running the `pw.x` binary](spack-eessi-20251106-004.webp)
76+
77+
This was just a simple single-core test, but it does seem to work as expected!
78+
79+
When we inspect the `pw.x` binary a bit more closely, we can see that it (only) links to libraries provided by EESSI:
80+
81+
![Inspecting the list of libraries that `pw.x` binary links to](spack-eessi-20251106-005.webp)
82+
83+
84+
It's clear that more work needs to be done to further validate the installation and check its performance,
85+
but this is a nice first step...
86+
87+
88+
### More information & updates
89+
90+
This work is being done in collaboration with member of the Spack development team,
91+
including Todd Gamblin and Massimiliano Culpo.
92+
93+
For updates, check the [dedicated support issue](https://gitlab.com/eessi/support/-/issues/170)
94+
that was opened on using Spack on top of EESSI, or stay tuned for future blog posts!
166 KB
Loading
171 KB
Loading
298 KB
Loading
79.6 KB
Loading
142 KB
Loading
11.1 KB
Loading
13.5 KB
Loading

0 commit comments

Comments
 (0)