HackerPapers

arXiv:2210.08404cs.SE

Using Answer Set Programming for HPC Dependency Solving

Todd Gamblin, Massimiliano Culpo, Gregory Becker, Sergei Shudler

Abstract

Modern scientific software stacks have become extremely complex, using many programming models and libraries to exploit a growing variety of GPUs and accelerators. Package managers can mitigate this complexity using dependency solvers, but they are reaching their limits. Finding compatible dependency versions is NP-complete, and modeling the semantics of package compatibility modulo build-time options, GPU runtimes, flags, and other parameters is extremely difficult. Within this enormous configuration space, defining a "good" configuration is daunting. We tackle this problem using Answer Set Programming (ASP), a declarative model for combinatorial search problems. We show, using the Spack package manager, that ASP programs can concisely express the compatibility rules of HPC software stacks and provide strong quality-of-solution guarantees. Using ASP, we can mix new builds with preinstalled binaries, and solver performance is acceptable even when considering tens of thousands of packages.

arXiv comments
Journal reference
DOI
Subjects
cs.SESoftware Engineering

On Hacker News

Linked by 2 identifiable commenters in 5 comments across 5 threads, from Nov 2022 to Oct 2025. Found in 3 HN submissions from Oct 2022 to Apr 2023. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments5 threads

    • It's good that you've mentioned Spack but not for HPC work, and that's very interesting. This a high level overview by one of the Spack authors from the HN post back in 2023 (top comment from 100 comments), including the Spack original paper link [1]: At a very high level, Spack…

      teleforceView on HNParent context

    • Love this article and the push to build awareness of what modern SAT solvers can do. It's worth mentioning that there are higher level abstractions that are far more accessible than SAT. If I were teaching a course on this, I would start with either Answer Set Programming (ASP)…

      tgamblinView on HNParent context

    • Original author here -- since I know that people click the comments to decide whether to read further, here's a (biased?) summary: Spack is aimed at end users, developers, and admins. It's used primarily in HPC at the moment but it would be great to see use outside of the HPC…

      tgamblinView on HNParent context

  1. The birth of a package manager 1 comment
    • Have you looked at Spack (https://github.com/spack/spack)? Disclaimer: I lead the project. Spack essentially is nix with dependency resolution. spack packages can have conditional (nearly) anything: versions, options, compiler choices, dependencies (including virtual deps). The…

      tgamblinView on HNParent context

    • Co-author/spack guy/occasional frequenter of Nix fora here. Aside from what p4ul said above, the main architectural differences between Nix and Spack are: 1. Spack has a dependency solver (the "concretizer"), Nix does not 2. Spack packages are parameterized, and we solve for…

      tgamblinView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.