Spack — building a stack without root

On a cluster you cannot apt-get anything. Spack builds from source into your own prefix, resolves the dependency graph, and hands the result to the module system.

Specs

Reading gromacs@2026.1 +mpi %gcc@16.1.0: version, variants, compiler, dependencies — the language the whole tool speaks.

Concretization

Turning an abstract request into one exact build. Why spack spec before spack install saves hours.

Environments

spack.yaml and spack.lock: a reproducible stack you can hand to someone else, or rebuild next year.

Modules

What module load actually does to your environment, and how an installed package becomes a module in the first place.

When builds fail

Reading the build log, finding the stage directory, and the difference between a compiler error and a bad dependency resolution.

Not rebuilding the world

Externals, mirrors and build caches: how to avoid compiling a dependency the cluster already has.

The simulator ships the whole builtin repository — 9,024 packages, generated from Spack's own recipes: name, preferred version, variants, and the dependency edges parsed out of each package.py. Every edge points at a package that is also here, so spack spec resolves a real chain and spack install hdf5 builds its forty dependencies in order.

What is not modelled: real compilation, real build times, version-range and compiler-conditional edges, and the concretizer's actual solver. Builds are simulated and fail on conditions you can fix — memory limits on large C++ builds, a toolchain that is not loaded — because a build that always succeeds teaches nothing about the week people actually spend on this. Run spack coverage for the current numbers.

Open the cluster →