Background
Spack has been updated to version 1.1.1. The first 1.0 release was the first stable API.
As part of this transition the builtin spack packages are no longer included in the spack repo. It has been split out into a separate spack-packages repository with an accompanying spack-packages API that is versioned independently from spack.
As a result the ACCESS-NRI spack-packages repo was renamed access-spack-packages to avoid any possible confusion with the upstream spack-packages repo.
Transition to the latest spack package API required modifications to all spack packages. These changes were accumulated in the api-v2 branch, which was then made the default branch for the repo. The older ACCESS spack packages (the previous main branch) was moved to api-v1.
Migration Plan
The migration to v1.1.1 was tracked in this issue:
Details of Changes
access-spack-packages
- Ported all existing packages to API V2 in the api-v2 branch.
- Updated default branch to api-v2, so pull requests now default to
api-v2. - Created api-v1 branch from current main.
- Spack Package Recipes (SPRs) reside in a sub-directory of
spack_repo/access/nri/packages/.
Personal Spack installs
If you previously followed these instructions to set up Spack v0.22, you will need to repeat the setup process below to install Spack v1.1.
Set up Spack for building ACCESS models
build-ci (Model Component Testing Infra)
spack v1.1.1requiresbuild-ci@v3- If you want to test using
spack < v1, you need to usebuild-ci@v2
- If you want to test using
- You can now specify versions for both the builtin (
spack/spack-packages) and our own (access-spack-packages) repository, through theinputs.builtin-spack-packages-refandaccess-spack-packages-ref. They will be set to sensible defaults otherwise. - The compilers are now part of toolchains. Rather than specifying the compiler package in
spack.packages.all.require(eg.%intel@2021.10.0, we specify a toolchain. That looks like%access_COMPILER(eg.%access_intel/%access_gcc/%access_oneapi).
build-cd (Model Deployment Infra)
spack v1.1.1requiresbuild-cd@v8- If you want to deploy to
spack < v1, you need to usebuild-cd@v7or lower
- If you want to deploy to
- The manifests look a bit different compared to the
spack < v1manifests:- The deployment name and version are specified in
_nameand_versionreserved definitions, rather than in thespack.specssection. You no longer need to use@git.VERSIONon the root spec. - Rather than specifying the compiler and version in
spack.packages.all.require, we specify it as part of thespack.packages.LANGUAGE.requiresection, where language is one ofc|cxx|fortran. - For MDRs with restricted packages, there is no longer a
spack.configsection specifying paths, etc. It is now taken care of in theconfig/versions.jsonscustom-spack-scopesfield.
- The deployment name and version are specified in