This is my initial work on support for Spack.
Pros:
- Spack provides a
spack.yaml
which makes it easy to configure the environment, andspack.lock
makes sure everyone else gets the same results. No more divergence between different users. - I've configured Spack to reuse:
- System compiler (GCC)
- System MPI
- Key system libraries (those which can be automatically discovered via
spack external find --all
, minus a few that cause issues in the build)
Cons:
- Building from source takes a long time. The main culprit seems to be that, even with the autodetection I do, there are still a lot of basic libraries Spack tries to build. (This is even after trying to get Spack to autodetect everything it knows how to autodetect.) I'm trying to look deeper into whether Spack can autodetect more libraries, but this is still up in the air.
- Certain LCLS libraries (like
amityping
) are not in PyPI. I'm working around this bypip install
on the URL directly. We should contact the LCLS folks to get these into PyPI.
Outstanding issues:
- https://github.com/spack/spack/issues/31959 (not strictly necessary for what I'm currently doing, but might be useful)
- Unclear how to discover other packages (besides executables), see discussion at https://spackpm.slack.com/archives/C5W7NKZJT/p1659734369147249