Files
ilkerandClaude Opus 5 275997c52a hpcod: make the Spack path work, and give it a build cache
Four things stood between a spack.yaml recipe and an image, and all
four were invisible because nothing had ever run this path: every
Spack recipe in the catalogue was still draft.

The default builder image was spack/rockylinux9:v0.23.1, a tag that
has never existed - Spack's images are tagged by release and Spack
went to 1.x. Pinned to 1.2.2 rather than :latest, because the
concretizer decides the whole catalogue's ABI and should not change
under us between two applications.

Spack was assumed to be on PATH. `spack env activate` changes the
calling shell, so it is a function that setup-env.sh defines; running
the binary prints what it would have set and changes nothing.

config: install_tree took a bare path, which Spack 1.x rejects.

And the MPI line could not concretize at all: +pmi and +legacylaunchers
exist only up to OpenMPI 4, so asking for them with @5.0.6 collapsed
the spec to 4.1.8 and then refused it. OpenMPI 5 is launched by srun
through PMIx, and ~internal-pmix is what makes it use the external
pmix@4.2.9 the recipes pin - without it OpenMPI bundles its own and
the pin means nothing.

The build cache was a dead wire at both ends. The template read from
$SPACK_MIRROR and build-push.sh never passed it, and nothing ever
pushed, so it could only have been empty. It is now passed by default,
pointing at the same registry the images go to, and the install
autopushes - during, not after, so a build that fails on its last
package still leaves the half hour of OpenMPI before it.

Reading needs no credential, because the registry is public by
design; writing does, and it arrives as a mounted secret rather than
a build argument. Arguments are recorded in the image metadata, and
these images are published - a token passed that way would ship
inside every application in the catalogue.

osu-micro-benchmarks is the first entry that claims to run across
nodes. Everything else says single-node, so the path that carries
ranks between two machines had never been exercised by anything the
catalogue offers. Its binaries are declared by absolute path because
that is where OSU puts them: under libexec, which the view carries
and nothing puts on PATH, so a bare name would be a promise the image
does not keep.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 13:22:36 +02:00

45 lines
1.8 KiB
YAML

# The smallest honest test of the MPI path: a few megabytes of benchmark on
# top of the same OpenMPI every other application in this catalogue is built
# against. If these run across two nodes, the stack works; if they do not,
# nothing larger was ever going to.
spack:
specs:
- osu-micro-benchmarks@7.5.2
# +pmi and +legacylaunchers exist only up to OpenMPI 4
# (`when @1.5.5:4 schedulers=slurm`), so this line pinned to 5.0.6
# could not concretize at all - it collapsed to 4.1.8 and then
# refused. OpenMPI 5 is launched by srun through PMIx instead, and
# ~internal-pmix is what makes it use the external one pinned below
# rather than bundling its own.
- openmpi@5.0.6 ~internal-pmix schedulers=slurm fabrics=ofi,ucx
packages:
all:
providers:
mpi: [openmpi]
# Measured on the head, not assumed: the hypervisor is a Xeon
# E5-2680 v4 and the guests advertise x86_64_v3. A binary
# concretised for v4 does not merely miss the cache here - it needs
# AVX-512, which this CPU does not have, and dies on the first
# instruction that uses it.
target: [x86_64_v3]
pmix:
# The head's Slurm offers pmix_v4 and nothing else, and links
# libpmix.so.2.9.5. A client built against PMIx 6 does not fail
# against a PMIx 4 server: the job starts, the ranks never
# rendezvous, and it sits there until the wall clock kills it. That
# reads as a slow application rather than a broken stack, which is
# why this is pinned rather than left to the concretizer.
require: ["@4.2.9"]
concretizer:
unify: true
reuse: true
config:
# Spack 1.x wants an object here; the bare path that 0.23 took is
# rejected with "'/opt/software' is not of type 'object'".
install_tree:
root: /opt/software
view: /opt/view