diff --git a/docs/models/build_a_model/build_source_code.md b/docs/models/build_a_model/build_source_code.md index 3022a7179..17323c4da 100644 --- a/docs/models/build_a_model/build_source_code.md +++ b/docs/models/build_a_model/build_source_code.md @@ -1,6 +1,6 @@ {% set esm1_5_build_config = "https://github.com/ACCESS-NRI/ACCESS-ESM1.5" %} -{% set spack_setup = "/getting_started/spack" %} +{% set use_spack = "/getting_started/spack" %} [ACCESS models]: /models [esm1.5 config]: /models/access_models/access-esm/#access-esm15 [mom5 component]: /models/model_components/ocean/#mom5 @@ -8,8 +8,8 @@ [spack-configuration-scopes-documentation]: https://spack.readthedocs.io/en/latest/configuration.html#configuration-scopes !!! danger - This page is tailored to experienced users and collaborators developing ACCESS models.
- This step is *not* required if you *only* want to run a model. If you are looking for information on how to run a model, refer to the [Run a Model](/models/run_a_model) section. + This page is for users needing to change the source code and recompile ACCESS models.
+ This step is *not* required if you *only* want to run an ACCESS released model configuration. If you are looking for information on how to run a model, refer to the [Run a Model](/models/run_a_model) section. # Modify and build an ACCESS model's source code @@ -17,7 +17,7 @@ The following instructions outline how to build an ACCESS model and its dependencies, using the build-from-source package manager [Spack](https://spack.readthedocs.io).
-These instructions may suit more advanced users who are making iterative changes and need to repeatedly modify the source code, recompile it and run tests. This option also requires setting up a Spack build environment.
+These instructions may suit users who are making iterative changes and need to repeatedly modify the source code, recompile it and run tests. This option also requires setting up a Spack build environment.
If you want to modify and build a model, while maintaining a clear record of your changes and being able to share the modified builds with others, refer to [Create Prereleases and Releases for an ACCESS Model](/models/build_a_model/create_a_prerelease) instead. The build workflow described in this page is specifically designed to run on [NCI](https://nci.org.au/about-us/who-we-are)'s supercomputer [_Gadi_][gadi]. @@ -33,39 +33,25 @@ As an example, in the following instructions we will show how to modify [MOM5 co Before building a model, you need to [Set Up your NCI Account](/getting_started/set_up_nci_account). - **_Spack_**
- To set up _Spack_ on _Gadi_, refer to [Set up Spack for building ACCESS models]({{spack_setup}}). - -## Navigate into your Spack directory -Navigate into the directory where you cloned the _Spack_ repositories during the [Spack setup]({{spack_setup}}).
-The suggested directory is `/g/data/$PROJECT/$USER/spack/0.22`: -``` -cd /g/data/$PROJECT/$USER/spack/0.22 -``` + To use _Spack_ on _Gadi_, refer to [How to use Spack on Gadi for building ACCESS models]({{use_spack}}). ## Enable spack -!!! warning - For this step, it is recommended to use a new login _Bash_ shell environment to avoid conflicting environment variables. - Additionally, this step must be repeated for every new login or new shell session. - -To add the `spack` command to your shell, as well as other settings, run: +To use _Spack_, run: ``` -module purge -. spack-config/spack-enable.bash +module use /g/data/vk83/modules +module load spack ``` -!!! warning - There is a space between the `.` and the path to the file, as we are [sourcing](https://tldp.org/HOWTO/Bash-Prompt-HOWTO/x237.html#:~:text=When%20a%20file%20is%20sourced,the%20file%20they%20are%20in.) the file. - ## Create a Spack development environment _Spack_ has [environments](https://spack.readthedocs.io/en/latest/environments.html) that are, in some ways, similar to _Conda_ environments or _Python_ virtual environments: they create an isolated operating environment where _Spack_ can only see and access specific packages. This allows the build and deployment of new packages in a coherent fashion. -_Spack_ [managed environments](https://spack.readthedocs.io/en/latest/environments.html#creating-a-managed-environment) are located inside `/g/data/$PROJECT/$USER/spack/0.22/environments`, each in a separate directory. Each environment configuration is defined within its directory using the [`spack.yaml`](https://spack.readthedocs.io/en/latest/config_yaml.html#config-yaml) file. +_Spack_ [managed environments](https://spack.readthedocs.io/en/latest/environments.html#creating-a-managed-environment) are located inside `/g/data/$PROJECT/$USER/spack/1.1/environments`, each in a separate directory. Each environment configuration is defined within its directory using the [`spack.yaml`](https://spack.readthedocs.io/en/latest/config_yaml.html#config-yaml) file. {: id="spack-environment-folder"} !!! warning - _Spack_ managed environments' location can be changed within _Spack_ configuration files and the directory specified above represents the default location for a _Spack_ instance that has been set up following the [Spack setup instructions]({{spack_setup}}). + _Spack_ managed environments' location can be changed within _Spack_ configuration files and the directory specified above represents the default location chosen by ACCESS-NRI. ### Create the environment @@ -87,11 +73,11 @@ spack env create mom5_dev ACCESS-ESM1.5/spack.yaml Receiving objects: 100% (29/29), 16.40 KiB | 2.38 MiB/s, done. Resolving deltas: 100% (6/6), done. spack env create mom5_dev ACCESS-ESM1.5/spack.yaml - \==> Created environment mom5_dev in: /g/data/\$PROJECT/\$USER/spack/0.22/environments/mom5_dev + \==> Created environment mom5_dev in: /g/data/\$PROJECT/\$USER/spack/1.1/environments/mom5_dev \==> Activate with: spack env activate mom5_dev -The newly-created `mom5_dev` _Spack_ environment folder is `/g/data/$PROJECT/$USER/spack/0.22/environments/mom5_dev`. +The newly-created `mom5_dev` _Spack_ environment folder is `/g/data/$PROJECT/$USER/spack/1.1/environments/mom5_dev`. ### Activate the environment To activate the `mom5_dev` _Spack_ environment, run: @@ -103,16 +89,19 @@ spack env activate -p mom5_dev -### Set Spack Packages version +### Set access-spack-packages version + +By default, spack installations will checkout the newest commit from the default branch of [access-spack-packages](https://github.com/ACCESS-NRI/access-spack-packages). Occasionally, there will be changes to access-spack-packages which are incompatible with the spack environment being installed. -By default, spack installations will checkout the latest from the default branch of [access-spack-packages](https://github.com/ACCESS-NRI/access-spack-packages). Occasionally, there will be changes to access-spack-packages which are incompatible with the spack environment being installed. +To exactly match the version of access-spack-packages to the released model, checkout the version (e.g. `2025.03.006`) defined in [ACCESS-ESM1.5 Spack deployment]({{esm1_5_build_config}}/blob/-/config/versions.json): -To exactly match the version of spack packages to the released model, checkout the version (e.g. `2025.03.006`) defined in [ACCESS-ESM1.5 Spack deployment]({{esm1_5_build_config}}/blob/-/config/versions.json): +The shared Spack instance contains a read-only `access-spack-packages` repository. To set the `access-spack-packages` version, an *editable* repository must be cloned first and added to the Spack configuration. ``` -cd /g/data/$PROJECT/$USER/spack/0.22/spack-packages -git fetch --unshallow -git switch -c +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 +git -C access-spack-packages switch -c ``` ## Compile Spack environment packages (optional) @@ -126,7 +115,7 @@ Compiling all the packages present in a _Spack_ environment is referred to as [i To concretize the `mom5_dev` environment, run: ``` -spack concretize -f --reuse-deps +spack concretize -f ``` !!! warning @@ -139,7 +128,7 @@ spack concretize -f --reuse-deps - spack concretize -f --reuse-deps + spack concretize -f \==> Concretized access-esm1p5@git.2024.05.1=2024.05.1 @@ -214,106 +203,106 @@ spack install \==> Installing glibc-2.28-mqjolvbeskcnhz5chvtdshk4x4sfnycs [1/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/glibc-2.28-mqjolvbeskcnhz5chvtdshk4x4sfnycs + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/glibc-2.28-mqjolvbeskcnhz5chvtdshk4x4sfnycs \==> Installing cmake-3.24.2-vc4y4c64s55j5u6kp37ciw2hcghuxhhc [2/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/cmake-3.24.2-vc4y4c64s55j5u6kp37ciw2hcghuxhhc + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/cmake-3.24.2-vc4y4c64s55j5u6kp37ciw2hcghuxhhc \==> Installing openmpi-4.0.2-ikhujrkyukytbkxxyk3mub44v63vuzfz [3/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/openmpi-4.0.2-ikhujrkyukytbkxxyk3mub44v63vuzfz + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/openmpi-4.0.2-ikhujrkyukytbkxxyk3mub44v63vuzfz \==> Installing gmake-4.4.1-j6yscmmcn3qws7n35klote7rivw7foa6 [4/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/gmake-4.4.1-j6yscmmcn3qws7n35klote7rivw7foa6 + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/gmake-4.4.1-j6yscmmcn3qws7n35klote7rivw7foa6 \==> Installing fcm-2021.05.0-ho2ie66tizhxpjjiilnrjnlnbi6safwq [5/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/fcm-2021.05.0-ho2ie66tizhxpjjiilnrjnlnbi6safwq + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/fcm-2021.05.0-ho2ie66tizhxpjjiilnrjnlnbi6safwq \==> Installing zlib-ng-2.1.6-h45fvywj47wc4uwa37mfzkdsqrgcqxux [6/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/zlib-ng-2.1.6-h45fvywj47wc4uwa37mfzkdsqrgcqxux + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/zlib-ng-2.1.6-h45fvywj47wc4uwa37mfzkdsqrgcqxux \==> Installing dummygrib-1.0-qy5w2d7tmsbmvnqng2xlopdkd4m2grvb [7/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/dummygrib-1.0-qy5w2d7tmsbmvnqng2xlopdkd4m2grvb + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/dummygrib-1.0-qy5w2d7tmsbmvnqng2xlopdkd4m2grvb \==> Installing pkgconf-2.2.0-ugenh6g4dnhti4p6ktbkfku6pzlq5fkr [8/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/pkgconf-2.2.0-ugenh6g4dnhti4p6ktbkfku6pzlq5fkr + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/pkgconf-2.2.0-ugenh6g4dnhti4p6ktbkfku6pzlq5fkr \==> Installing gcom4-git.2024.05.28=access-esm1.5-xalavwvyp3jv6emsnj7yecrqprwp3kag [9/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/gcom4-git.2024.05.28_access-esm1.5-xalavwvyp3jv6emsnj7yecrqprwp3kag + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/gcom4-git.2024.05.28_access-esm1.5-xalavwvyp3jv6emsnj7yecrqprwp3kag \==> Installing hdf5-1.10.11-yfo7fumh2agj6itfzqa6l2dpccrypp2l [10/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/hdf5-1.10.11-yfo7fumh2agj6itfzqa6l2dpccrypp2l + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/hdf5-1.10.11-yfo7fumh2agj6itfzqa6l2dpccrypp2l \==> Installing netcdf-c-4.7.4-725rz7cn7qupsi4egyeaix2crssvtoxp [11/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/netcdf-c-4.7.4-725rz7cn7qupsi4egyeaix2crssvtoxp + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/netcdf-c-4.7.4-725rz7cn7qupsi4egyeaix2crssvtoxp \==> Installing netcdf-fortran-4.5.2-5xcyy2h34vaq77ouwsgd6lfes5zycoii [12/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/netcdf-fortran-4.5.2-5xcyy2h34vaq77ouwsgd6lfes5zycoii + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/netcdf-fortran-4.5.2-5xcyy2h34vaq77ouwsgd6lfes5zycoii \==> Installing oasis3-mct-git.access-esm1.5_2024.05.24=access-esm1.5-py3awb76nw3lwjw5ea3uktmh2nm254gi [13/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/oasis3-mct-git.access-esm1.5_2024.05.24_access-esm1.5-py3awb76nw3lwjw5ea3uktmh2nm254gi + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/oasis3-mct-git.access-esm1.5_2024.05.24_access-esm1.5-py3awb76nw3lwjw5ea3uktmh2nm254gi \==> Installing mom5-git.access-esm1.5_2024.08.23=access-esm1.5-oopqoqgqu65cybqht23l6m6coxbrpzqh [14/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/mom5-git.access-esm1.5_2024.08.23_access-esm1.5-oopqoqgqu65cybqht23l6m6coxbrpzqh + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/mom5-git.access-esm1.5_2024.08.23_access-esm1.5-oopqoqgqu65cybqht23l6m6coxbrpzqh \==> Installing um7-git.2024.07.03=access-esm1.5-udr7pbnflpwzuawejuuc4xpmfuwtpc4x [15/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/um7-git.2024.07.03_access-esm1.5-udr7pbnflpwzuawejuuc4xpmfuwtpc4x + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/um7-git.2024.07.03_access-esm1.5-udr7pbnflpwzuawejuuc4xpmfuwtpc4x \==> Installing cice4-git.2024.05.21=access-esm1.5-hhtnigwxdyz7ta4dv3gvhwulze6hxqra [16/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/cice4-git.2024.05.21_access-esm1.5-hhtnigwxdyz7ta4dv3gvhwulze6hxqra + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/cice4-git.2024.05.21_access-esm1.5-hhtnigwxdyz7ta4dv3gvhwulze6hxqra \==> Installing access-esm1p5-git.2024.05.1=2024.05.1-nkvasig2zrq2ocz6evva6bmurdq7nh3h [17/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/access-esm1p5-git.2024.05.1_2024.05.1-nkvasig2zrq2ocz6evva6bmurdq7nh3h + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/access-esm1p5-git.2024.05.1_2024.05.1-nkvasig2zrq2ocz6evva6bmurdq7nh3h - \==> Updating view at /g/data/\$PROJECT/\$USER/spack/0.22/environments/mom5_dev/.spack-env/view + \==> Updating view at /g/data/\$PROJECT/\$USER/spack/1.1/environments/mom5_dev/.spack-env/view @@ -378,7 +367,7 @@ I this case, the `development` branch of the _mom5_ repository would be automati !!! info The source code is automatically cloned in the [environment's folder](#spack-environment-folder).

The repository URL is set within the package definition file `package.py`.
- In the case of _mom5_, the package definition file is in `spack-packages/packages/mom5/package.py`.
+ In the case of _mom5_, the package definition file is in `access-spack-packages/spack_repo/access/nri/packages/mom5/package.py`.
For more information about _Spack_ packages definition, please refer to [Creating new spack packages](https://spack.readthedocs.io/en/latest/packaging_guide.html#creating-new-packages). #### Specify the source code from a local folder {: id='local-package'} @@ -518,7 +507,7 @@ spack: After setting a development package the _Spack_ environment needs to be re-concretized (because the `spack.yaml` file changed). The _Spack_ environment can be concretized following the same steps listed in [Concretize the Spack environment](#concretize-the-spack-environment). Then, the new package can be built following the steps listed in [Compile Spack environment packages](#compile-spack-environment-packages-optional): ``` -spack concretize -f --reuse-deps +spack concretize -f spack install ``` !!! warning @@ -531,7 +520,7 @@ spack install - spack concretize -f --reuse-deps + spack concretize -f \==> Concretized access-esm1p5@git.2024.05.1=2024.05.1 @@ -589,64 +578,64 @@ spack install spack install - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/glibc-2.28-mqjolvbeskcnhz5chvtdshk4x4sfnycs + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/glibc-2.28-mqjolvbeskcnhz5chvtdshk4x4sfnycs - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/cmake-3.24.2-vc4y4c64s55j5u6kp37ciw2hcghuxhhc + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/cmake-3.24.2-vc4y4c64s55j5u6kp37ciw2hcghuxhhc - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/openmpi-4.0.2-ikhujrkyukytbkxxyk3mub44v63vuzfz + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/openmpi-4.0.2-ikhujrkyukytbkxxyk3mub44v63vuzfz - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/gmake-4.4.1-j6yscmmcn3qws7n35klote7rivw7foa6 + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/gmake-4.4.1-j6yscmmcn3qws7n35klote7rivw7foa6 - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/fcm-2021.05.0-ho2ie66tizhxpjjiilnrjnlnbi6safwq + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/fcm-2021.05.0-ho2ie66tizhxpjjiilnrjnlnbi6safwq - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/zlib-ng-2.1.6-h45fvywj47wc4uwa37mfzkdsqrgcqxux + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/zlib-ng-2.1.6-h45fvywj47wc4uwa37mfzkdsqrgcqxux - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/dummygrib-1.0-qy5w2d7tmsbmvnqng2xlopdkd4m2grvb + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/dummygrib-1.0-qy5w2d7tmsbmvnqng2xlopdkd4m2grvb - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/pkgconf-2.2.0-ugenh6g4dnhti4p6ktbkfku6pzlq5fkr + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/pkgconf-2.2.0-ugenh6g4dnhti4p6ktbkfku6pzlq5fkr - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/gcom4-git.2024.05.28_access-esm1.5-xalavwvyp3jv6emsnj7yecrqprwp3kag + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/gcom4-git.2024.05.28_access-esm1.5-xalavwvyp3jv6emsnj7yecrqprwp3kag - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/hdf5-1.10.11-yfo7fumh2agj6itfzqa6l2dpccrypp2l + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/hdf5-1.10.11-yfo7fumh2agj6itfzqa6l2dpccrypp2l - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/netcdf-c-4.7.4-725rz7cn7qupsi4egyeaix2crssvtoxp + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/netcdf-c-4.7.4-725rz7cn7qupsi4egyeaix2crssvtoxp - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/netcdf-fortran-4.5.2-5xcyy2h34vaq77ouwsgd6lfes5zycoii + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/netcdf-fortran-4.5.2-5xcyy2h34vaq77ouwsgd6lfes5zycoii - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/oasis3-mct-git.access-esm1.5_2024.05.24_access-esm1.5-py3awb76nw3lwjw5ea3uktmh2nm254gi + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/oasis3-mct-git.access-esm1.5_2024.05.24_access-esm1.5-py3awb76nw3lwjw5ea3uktmh2nm254gi \==> Installing mom5-git.access-esm1.5_2024.08.23=access-esm1.5-l34w7is54xzer7s4ztvb5ymgjbtduknh [14/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/mom5-git.access-esm1.5_2024.08.23_access-esm1.5-l34w7is54xzer7s4ztvb5ymgjbtduknh + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/mom5-git.access-esm1.5_2024.08.23_access-esm1.5-l34w7is54xzer7s4ztvb5ymgjbtduknh - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/um7-git.2024.07.03_access-esm1.5-udr7pbnflpwzuawejuuc4xpmfuwtpc4x + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/um7-git.2024.07.03_access-esm1.5-udr7pbnflpwzuawejuuc4xpmfuwtpc4x - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/cice4-git.2024.05.21_access-esm1.5-hhtnigwxdyz7ta4dv3gvhwulze6hxqra + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/cice4-git.2024.05.21_access-esm1.5-hhtnigwxdyz7ta4dv3gvhwulze6hxqra \==> Installing access-esm1p5-git.2024.05.1_2024.05.1-nkvasig2zrq2ocz6evva6bmurdq7nh3h [17/17] - [+] /g/data/\$PROJECT/\$USER/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/access-esm1p5-git.2024.05.1_2024.05.1-nkvasig2zrq2ocz6evva6bmurdq7nh3h + [+] /g/data/\$PROJECT/\$USER/spack/1.1/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/access-esm1p5-git.2024.05.1_2024.05.1-nkvasig2zrq2ocz6evva6bmurdq7nh3h - \==> Updating view at /g/data/\$PROJECT/\$USER/spack/0.22/environments/mom5_dev/.spack-env/view + \==> Updating view at /g/data/\$PROJECT/\$USER/spack/1.1/environments/mom5_dev/.spack-env/view @@ -659,10 +648,7 @@ spack install ## Output directory for compiled packages -!!! tip - For the _Spack_ instance obtained through the [Spack setup instructions]({{spack_setup}}), `$spack`(referred to as `$(prefix)` in [_Spack_ configuration scopes documentation][spack-configuration-scopes-documentation]) corresponds to the `/g/data/$PROJECT/$USER/spack/0.22/spack` directory. - -For the Spack instance obtained through the [Spack setup instructions]({{spack_setup}}), all compiled packages will be placed in directories having the following format: `//-/--`. +All compiled packages will be placed in directories having the following format: `//-/--`. `` depends on the [`install_tree.root`](https://spack.readthedocs.io/en/latest/config_yaml.html#install-tree-root) configuration field. _Spack_ reads this configuration field from files in several directories, following [Spack's configuration scopes][spack-configuration-scopes-documentation]. @@ -676,7 +662,7 @@ config: root: $spack/../restricted/ukmo/release ``` -This means the packages built in this example can be found in `/g/data/$PROJECT/$USER/spack/0.22/spack/../restricted/ukmo/release//-/--`. +This means the packages built in this example can be found in `/g/data/$PROJECT/$USER/spack/1.1/spack/../restricted/ukmo/release//-/--`. ## Troubleshooting build errors @@ -686,7 +672,7 @@ _Spack_ prints out the error message and generates a full build log that can be For example, if we try to install the `mom5_dev` environment with an error in the new `mom5` source code (in this example a `use` statement in the `/src/accessom_coupler/ocean_solo.F90` file has been purposely commented out to force an error in compilation), we might get an output error similar to the following:
...
- >> 415    /g/data/$PROJECT/$USER/spack/0.22/environments/mom5_dev/mom5/src/access_coupler/ocean_solo.F90:224: undefined reference to `constant s_init_'
+ >> 415    /g/data/$PROJECT/$USER/spack/1.1/environments/mom5_dev/mom5/src/access_coupler/ocean_solo.F90:224: undefined reference to `constant s_init_'
  >> 416    make: *** [Makefile:931: fms_ACCESS-CM.x] Error 1
 ...
 See build log for details:
@@ -794,7 +780,7 @@ A limitation of the NCI's _Linaro Forge_ license is that the maximum number of p
 
 * __UM7__: In `atmosphere/um_env.yaml`, change `UM_ATM_NPROCX` and `UM_ATM_NPROCY`, which describe the number of chunks in the x and y directions, as well as `UM_NPES` to the product of `UM_ATM_NPROCX` and `UM_ATM_NPROCY`. In `config.yaml`, change the `atmosphere: ncpus` to be the same as `UM_NPES`.
 * __MOM5__: In `ocean/input.nml`, change `layout` in the `&ocean_model_nml` namelist, which describes the number of chunks in the x and y directions in `nx,ny` format. In `config.yaml`, change the `ocean: ncpus` to the product of `nx` and `ny`.
-* __CICE4__: To change the number of processes used by _CICE4_, the _CICE4_ executable needs to be recompiled. This requires the user to modify their own _Spack_ installation. In the user's Spack installation, in `${SPACK_ROOT}/spack-packages/packages/cice4/package.py`, modify the entries in the `__targets` dictionary to the desired number of processes and blocks (the product of the blocks must be the same as the processes). The resulting executable name is `cice____p.exe`, which must be specified in the `config.yaml`. In the configuration's `ice/cice_in.nml`, change `nprocs` in the `&domain_nml` namelist to the desired number of processes. Finally, in the `config.yaml`, change the `ice: ncpus` to the desired number of processes.
+* __CICE4__: To change the number of processes used by _CICE4_, the _CICE4_ executable needs to be recompiled. This requires the user to modify their own _Spack_ installation. In the user's Spack installation, in `access-spack-packages/spack_repo/access/nri/packages/cice4/package.py`, modify the entries in the `__targets` dictionary to the desired number of processes and blocks (the product of the blocks must be the same as the processes). The resulting executable name is `cice____p.exe`, which must be specified in the `config.yaml`. In the configuration's `ice/cice_in.nml`, change `nprocs` in the `&domain_nml` namelist to the desired number of processes. Finally, in the `config.yaml`, change the `ice: ncpus` to the desired number of processes.
 * __CICE5__: To change the number of processes used by CICE5, the CICE5 executable needs to be recompiled, and the new blocksizes need to be specified. In `spack.yaml`, modify or add the [five variants _nxglob_, _nyglob_, _blckx_, _blcky_, _mxblcks_](https://github.com/search?q=repo%3AACCESS-NRI%2Faccess-spack-packages+%5C%22nxglob%5C%22+%5C%22nyglob%5C%22+%5C%22blckx%5C%22+%5C%22blcky%5C%22+%5C%22mxblcks%5C%22&type=code) to the desired number of processes and blocks. For ACCESS-ESM1.6, nprocs must be a divisor of _nxglob_(=360), therefore set _blckx = 360/nprocs_ and _mxblcks=1_. For ACCESS-OM2, there are more options (see Section 4.7 of the CICE5 [documentation](https://github.com/ACCESS-NRI/cice5/blob/master/doc/cicedoc.pdf)). In the configuration's `ice/cice_in.nml`, change `nprocs` in the `&domain_nml` namelist to the desired number of processes. Finally, in the `config.yaml`, change the executable name to the new build and change `ice: ncpus` to the desired number of processes.
 * __ACCESS-OM3__: In `nuopc.runconfig` change `_ntasks` for each model component to be less than or equal to 256. Change `_rootpe` for every component to 0 (or such that `_rootpe` + `_ntasks` is less than 256). In `MOM_Input`, add `AUTO_MASKTABLE = True`, and remove entries for `MASKTABLE`, `LAYOUT` and `IO_LAYOUT`. Finally in `config.yaml`, change `ncpus` to the desired number of processes.