Introduction
In the High-Performance Computing (HPC) ecosystem, software deployment is often a choice between two extremes. Source-based package managers, such as Spack, offer the granular control necessary to optimize software for specific micro-architectures and interconnects. However, this flexibility comes at the cost of the "rebuild the world" problem: a minor update to a low-level library, like MPI or libc, can trigger a cascade of recompilations for every dependent package. Conversely, binary package managers like apt or rpm provide rapid deployment but lack the configurability required for specialized supercomputing hardware.
This paper introduces splicing, a novel mechanism for Spack that combines the flexibility of source-based builds with the speed of binary distributions. By modeling Application Binary Interface (ABI) compatibility, splicing allows users to swap compatible binary dependencies into an existing software stack without requiring a full rebuild.
The Splicing Mechanism
The authors implemented splicing by integrating three core components into the Spack ecosystem:
- DSL Augmentation: The Spack Python-based domain-specific language (DSL) was extended with a
can_splicedirective. This allows package maintainers to explicitly declare when a specific version or implementation of a library is ABI-compatible with another, providing the metadata necessary for safe substitutions. - ASP Solver Logic: Spack utilizes Answer Set Programming (ASP) via the
clingosolver to resolve complex dependency trees. The authors introduced a layer of indirection in the solver's logic. Instead of forcing the solver to use the exact dependency a binary was originally built with, the new rules allow the solver to "choose" an ABI-compatible alternative (a splice) if one is available in a binary cache or already present on the system. - Binary Rewiring: Once a splice is selected, the installer must physically link the binaries. The authors generalized Spack’s existing binary relocation tools—which typically rewrite RPATHs in ELF binaries for relocation—to perform "rewiring." This process patches the binary to point to the new, spliced dependency paths instead of the original build-time paths.
Conceptual Shifts in Dependency Management
Splicing introduces several key insights into how package managers handle compatibility:
- Inverting Compatibility Declarations: Traditionally, a consumer package defines what it needs. Splicing allows the provider of a library to declare what it can replace. This is a more scalable approach; the author of a new, optimized MPI implementation knows it is ABI-compatible with a standard version, whereas the authors of thousands of dependent packages cannot be expected to track every future compatible implementation.
- Build vs. Runtime Provenance: Splicing creates a distinction between the "build spec" (the exact environment used for initial compilation) and the "spliced spec" (the configuration used for deployment). This distinction preserves full reproducibility while enabling runtime flexibility.
- The Power of Indirection: By representing reusable packages as queryable attributes rather than hard facts within the ASP solver, the authors enabled complex binary swaps without significantly increasing the computational complexity of dependency resolution.
Evaluation and Results
The authors evaluated the system using the RADIUSS Stack, a collection of HPC software from Lawrence Livermore National Laboratory (LLNL), and a massive public Spack buildcache containing over 20,000 pre-built packages. To test scaling, they utilized a mock package (mpiabi) designed to mimic mvapich compatibility with mpich across numerous versions.
Performance and Scalability
The results demonstrate that the overhead of splicing is minimal:
- Solver Efficiency: Modifying the solver's internal encoding to support splicing added only 4.7% to 7.1% to the dependency resolution time. This cost is negligible when compared to the hours of compilation time saved by avoiding a rebuild.
- Scaling: In tests with up to 100 different potential splice candidates for a single dependency, the solver remained performant. The increase in resolution time was found to be inconsequential relative to the overall deployment lifecycle.
- Correctness: The system successfully produced spliced solutions for the RADIUSS stack, correctly identifying and swapping in compatible MPI implementations to satisfy complex requirements.
Limitations and Future Work
While splicing significantly improves deployment speed, it currently relies on manual effort. Package developers must identify and add can_splice directives, which requires deep knowledge of a library's ABI.
Future work aims to automate this process. The authors suggest integrating tools like libabigail into the Spack ecosystem to automatically detect ABI compatibility between different binary versions. Such automation would further reduce the burden on maintainers and make splicing a seamless part of the HPC software lifecycle.
Summary updated