Updating Spack Dependencies
Updating shared Spack dependencies in Polaris is part of the release workflow for supported machines. Compared with pixi dependency updates, Spack updates are heavier-weight because environments are shared and build times are often long.
Polaris now uses ./deploy.py backed by mache.deploy. For deployment
behavior and templates, treat the mache docs as the source of truth:
Workflow for Spack Dependency Changes
Create a version-update branch
Use a branch like
update-to-<version>(for exampleupdate-to-0.9.0-alpha.1).Bump the Polaris version
Update
polaris/version.pyto the target version and commit that change.Update
mache, if neededTo move to a new
mache, regeneratedeploy.pyanddeploy/cli_spec.jsonwith./deploy.py --bootstrap-onlyandmache deploy update, then update themachepin, as described in Updating Polaris to a new mache. To test amachebranch that is not released yet, see Testing an unreleased mache.Update deployment inputs
Update pinned versions in
deploy/pins.cfg:[spack]for Spack-only pins[all]for pins shared by pixi and Spack. These follow the versions that conda-forge builds against (conda-forge-pinning-feedstock), so leave them alone unless a pixi dependency needs a newer one. For example, mpas_tools 2.2.1 is built against netcdf-fortran 4.6.4 and requires it.
If Spack needs a package version that the e3sm-spack-packages tag pinned by
machedoes not have, add it to e3sm-spack-packages, tag a release there, and pin that tag underspack: pins:indeploy/config.yaml.j2. This needs no newmacherelease.Update Spack specs in
deploy/spack.yaml.j2as neededUpdate deployment defaults/behavior in
deploy/config.yaml.j2only if deployment logic or paths need to change
Open a PR and track testing/deployment
Include:
an Updates section listing changed versions and rationale
a Testing checklist by machine/compiler/MPI
a Deployment checklist for final shared deployment
Run test deployments before shared deployment
Example:
./deploy.py --deploy-spack --spack-path <test_spack_path> \ --compiler <compiler...> --mpi <mpi...> --recreate
Run required validation suites
Follow the testing pages under
updating_spack/testing/before final deployment.
Adding a New Spack Package
To add a new package to Polaris Spack environments:
Add or update the package pin in
deploy/pins.cfg([spack]or[all]).Add the corresponding spec in
deploy/spack.yaml.j2underlibraryand/orsoftware, whichever is appropriate.If inclusion should be conditional, express that condition in Jinja2 template logic and document it in your PR.
Test on supported machine/compiler/MPI combinations.
Summary
Update version and deployment inputs (
deploy/pins.cfg,deploy/spack.yaml.j2).Validate with
./deploy.pytest deployments.Coordinate final shared Spack deployment only after testing passes.
If deployment (pixi) dependencies also changed, follow Updating Deployment Dependencies.