This repository contains:
- Spack configuration files required by the Spack instance(s) maintained by ACCESS-NRI on Gadi and ACCESS-NRI's CI Docker image.
- The deprecated
common-v0.2xdirectory contains the required configuration files for older Spack 0.2x versions and should not be used directly. - For clarity, from Spack v1.1 onwards, we have removed symlinks in the versioned directory (e.g.
v1.1) by storing the entire file. - Read the
v1.1/include/user/include.yamlfile to understand the configuration and directory hierarchy. Filev1.1/include/admin/include.yamldescribes the configuration used by the Pre-release and Release Spack instances.
- The deprecated
-
A regular user on Gadi does not need to clone this repository. Simply follow the instructions in How to use Spack on Gadi for building ACCESS models.
-
The default
install_treeis/g/data/$PROJECT/$USER/spack/1.1/release.
- If there is a need to modify a Spack Package Recipe (SPR), simply add an editable Spack repository by using
spack repo add. Runspack repo listto see all the enabled repositories in order of highest precedence to lowest precedence. For example, add an editableaccess-spack-packagesrepository by running:
cd /g/data/$PROJECT/$USER/spack/1.1
git clone https://github.com/ACCESS-NRI/access-spack-packages
spack repo add --scope=access.nri.gadi.user access-spack-packages/spack_repo/access/nri
- Disable upstreams: run
spack config --scope=access.nri.gadi.user edit upstreamsand insertupstreams:: {}.
git clone https://github.com/ACCESS-NRI/spack.git --branch access/releases/v1.1-admin
git clone https://github.com/ACCESS-NRI/spack-config.git
. spack/share/spack/setup-env.sh
export SPACK_USER_CACHE_PATH="$SPACK_ROOT/../spack-admin-cache"
spack bootstrap now
git clone https://github.com/ACCESS-NRI/spack.git --branch access/releases/v1.1
git clone https://github.com/ACCESS-NRI/spack-config.git
. spack/share/spack/setup-env.sh
export SPACK_USER_CACHE_PATH="/g/data/$PROJECT/$USER/spack/$SPACK_VERSION/spack-user-cache"
spack repo update
Do not run spack bootstrap now as the service user because it create temporary and permanent files in /g/data/$PROJECT/$USER/spack/$SPACK_VERSION.
git -C spack fetch --all -Pp
git -C spack reset --hard origin/access/releases/v1.1
git -C spack-config pull
. spack/share/spack/setup-env.sh
spack repo update
- A user on Gadi shall NOT need to run
git cloneto use Spack. - The CI Spack architecture/configuration shall be based on the Gadi architecture/configuration to ensure additional testing coverage.
-
Gadi service user
- Responsible for Pre-release and Release
-
Gadi regular user
- Modify and build Model Deployment Repository
-
Gadi advanced user
- Modify Spack Package Recipes
-
Build-ci
- Upstream Docker image
- Runner Docker image
-
Using Spack v1.1's include.yaml mechanism allows defining tiered configuration directories with a common directory for both Gadi and CI.
-
Using Spack v1.1's include.yaml mechanism choose a
spack-configdirectory based on thehostnameof the system. -
Define an
upstreamfor the Gadi user and CI runner to speed up builds.
╭╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮
┊ Upstream / Admin User ┊
┊ --------------------- ┊
┊ ┊
┊ $spack/.. ┊
┊ ├── access-spack-packages ┊
┊ ├── bootstrap ┊
┊ ├── cache ┊
┊ ├── environments ┊
┊ ├── intel ┊
┊ ├── release ┊
┊ ├── release/modules ┊
┊ ├── sourcecache ┊
┊ ├── spack ┊
┊ ├── spack-admin-cache ┊
┊ ├── spack-admin-config ┊
┊ ├── spack-config ┊
┊ └── spack-packages ┊
╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯
|
V
╭╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮
┊ Downstream / Regular User ┊
┊ ------------------------- ┊
┊ ┊
┊ /g/data/$PROJECT/$USER/spack/1.1 ┊
┊ ├── bootstrap ┊
┊ ├── cache ┊
┊ ├── environments ┊
┊ ├── release ┊
┊ ├── release/modules ┊
┊ ├── sourcecache ┊
┊ ├── spack-user-cache ┊
┊ └── spack-user-config ┊
╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯
- Use Spack scopes to differentiate between the configuration of an
upstreamand adownstream. Scopes in highest to lowest precedence order:
- name: "access.nri.gadi.user"
path: "/g/data/$PROJECT/$USER/spack/1.1/spack-user-config"
optional: true
when: '"gadi.nci.org.au" in hostname'
╭╌╌╌╌╌╌╌╮
┊ empty ┊
╰╌╌╌╌╌╌╌╯
- name: "access.nri.ci.user"
path: "$spack/../runner/spack-user-config"
optional: true
when: '"gadi.nci.org.au" not in hostname'
╭╌╌╌╌╌╌╌╮
┊ empty ┊
╰╌╌╌╌╌╌╌╯
- name: "access.nri.gadi.downstream"
path: "$spack/../spack-config/v1.1/gadi/downstream"
when: '"gadi.nci.org.au" in hostname'
╭╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮
┊ v1.1/gadi/downstream ┊
┊ ├── bootstrap.yaml ┊
┊ ├── config.yaml ┊
┊ ├── modules.yaml ┊
┊ └── upstreams.yaml ┊
╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯
- name: "access.nri.ci.downstream"
path: "$spack/../spack-config/v1.1/ci/downstream"
when: '"gadi.nci.org.au" not in hostname'
╭╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮
┊ v1.1/ci/downstream ┊
┊ ├── bootstrap.yaml ┊
┊ ├── config.yaml ┊
┊ ├── modules.yaml ┊
┊ └── upstreams.yaml ┊
╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯
- name: "access.nri.gadi"
path: "$spack/../spack-config/v1.1/gadi"
when: '"gadi.nci.org.au" in hostname'
╭╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮
┊ v1.1/gadi ┊
┊ ├── modules.yaml ┊
┊ └── packages.yaml ┊
╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯
- name: "access.nri.defaults"
path: "$spack/../spack-config/v1.1"
╭╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮
┊ v1.1 ┊
┊ ├── bootstrap.yaml ┊
┊ ├── concretizer.yaml ┊
┊ ├── config.yaml ┊
┊ ├── modules.yaml ┊
┊ ├── packages.yaml ┊
┊ ├── repos.yaml ┊
┊ ├── toolchains.yaml ┊
┊ └── upstreams.yaml ┊
╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯
- name: "access.nri.admin"
path: "$spack/../spack-admin-config"
optional: true
╭╌╌╌╌╌╌╌╮
┊ empty ┊
╰╌╌╌╌╌╌╌╯
- name: "access.nri.gadi"
path: "$spack/../spack-config/v1.1/gadi"
when: '"gadi.nci.org.au" in hostname'
╭╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮
┊ v1.1/gadi ┊
┊ ├── modules.yaml ┊
┊ └── packages.yaml ┊
╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯
- name: "access.nri.defaults"
path: "$spack/../spack-config/v1.1"
╭╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮
┊ v1.1 ┊
┊ ├── bootstrap.yaml ┊
┊ ├── concretizer.yaml ┊
┊ ├── config.yaml ┊
┊ ├── modules.yaml ┊
┊ ├── packages.yaml ┊
┊ ├── repos.yaml ┊
┊ ├── toolchains.yaml ┊
┊ └── upstreams.yaml ┊
╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯