Skip to content

Update for CICE5 with CMake#1138

Open
anton-seaice wants to merge 3 commits intodevelopmentfrom
1137
Open

Update for CICE5 with CMake#1138
anton-seaice wants to merge 3 commits intodevelopmentfrom
1137

Conversation

@anton-seaice
Copy link
Contributor

Closes #1137

This makes the CICE5 instructions simpler for changing processor count, based on the newer CMake build

@anton-seaice anton-seaice self-assigned this Feb 2, 2026
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

PR Preview
🚀 Preview of PR head commit 9ffddde deployed to https://docs.access-hive.org.au/pr-previews/1138
2026-02-20 10:53 AEDT
Preview generated through the Deploy to GitHub Pages workflow run 22205172460.

@anton-seaice anton-seaice marked this pull request as ready for review February 18, 2026 22:45
@anton-seaice anton-seaice requested a review from a team as a code owner February 18, 2026 22:45
@anton-seaice
Copy link
Contributor Author

Ready to go @ACCESS-NRI/hivedocsteam and @manodeep

Copy link
Contributor

@atteggiani atteggiani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please reintroduce all the deleted assets? :D

@anton-seaice
Copy link
Contributor Author

OOPPS!

@anton-seaice
Copy link
Contributor Author

Try again @atteggiani

@manodeep
Copy link

Hahahaha - I was wondering about the deleted assets! Didn't look relevant to the context :D

Copy link

@manodeep manodeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the docs - I have requested some clarifications, which should make the document easier to parse for users

* __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__: Requires the user to have 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_<driver>_<grid>_<blocks>_<nprocs>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__: Requires the user to have their own Spack installation. In the user's Spack installation, in `${SPACK_ROOT}/spack-packages/packages/cice5/package.py`, modify the entries in the `self.__targets` dictionary and `self.add_target` calls 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_<driver>_<grid>_<blocks>_<nprocs>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__: 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 (see Section 4.7 of the CICE5 [documentation](https://github.com/ACCESS-NRI/cice5/blob/master/doc/cicedoc.pdf)). For one degree resolution models, this can be easily achieved by scaling _blckx_ inversely with the number of processes—for example, if the process count is halved, double _blckx_. 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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to add a clarification that the user needs to rebuild CICE5 to run on a different number of cores. Also, might be good to add a link to the relevant spack.yaml here

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have many thoughts :)

  • may be remove "easily" from the "... easily achieved ..."
  • does cice_ncpus need to be a factor of nxglob?
  • does the product of cice_ncpus and _blckx_ need to i) equal or ii) exceed nxglob?
  • does the user need to specify all 5 variants or could they get away with specifying the ones they are changing
  • I thought mxblcks was required to be exactly 1 (from that #error line in the code that you showed me) - is that no longer the case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never know how much detail to write in access-hive-docs ... its not something easy to explain in 4 sentences!

"easily" is maybe optimistic

Some of these things are true for esm1.6 and not true for om2 -

We found for esm1.6 that mxblcks needs to be 1, and blckx needs to be an exact factor of nxglob. But these are not true to om2.

They do need to set all 5 variants (this makes more sense in the om2 context where there are multiple grid sizes, and less sense in the esm1.6 context)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does ensuring nxglob/blckx = nprocs for esm1.6 always work ?

Copy link
Contributor

@atteggiani atteggiani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @anton-seaice, it looks good.

I just added some comments to make the whole paragraph (also the portion not touched by this PR) more legible.

Comment on lines 783 to 785
* __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__: Requires the user to have 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_<driver>_<grid>_<blocks>_<nprocs>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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* __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__: Requires the user to have 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_<driver>_<grid>_<blocks>_<nprocs>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.
- **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**<br>
Requires the user to have their [own _Spack_ installation](/getting_started/spack/).
- 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_<driver>_<grid>_<blocks>_<nprocs>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.

* __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__: Requires the user to have 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_<driver>_<grid>_<blocks>_<nprocs>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__: Requires the user to have their own Spack installation. In the user's Spack installation, in `${SPACK_ROOT}/spack-packages/packages/cice5/package.py`, modify the entries in the `self.__targets` dictionary and `self.add_target` calls 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_<driver>_<grid>_<blocks>_<nprocs>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__: 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 (see Section 4.7 of the CICE5 [documentation](https://github.com/ACCESS-NRI/cice5/blob/master/doc/cicedoc.pdf)). For one degree resolution models, this can be easily achieved by scaling _blckx_ inversely with the number of processes—for example, if the process count is halved, double _blckx_. 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* __CICE5__: 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 (see Section 4.7 of the CICE5 [documentation](https://github.com/ACCESS-NRI/cice5/blob/master/doc/cicedoc.pdf)). For one degree resolution models, this can be easily achieved by scaling _blckx_ inversely with the number of processes—for example, if the process count is halved, double _blckx_. 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.
- **CICE5**
- 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 details, see Section 4.7 of [CICE5 documentation](https://github.com/ACCESS-NRI/cice5/blob/master/doc/cicedoc.pdf)). For one degree resolution models, this can be easily achieved by scaling `blckx` inversely with the number of processes (for example, if the process count is halved, double the value of `blckx`).
- In the configuration's `ice/cice_in.nml`, change `nprocs` in the `&domain_nml` namelist to the desired number of processes.
- In the `config.yaml`, change the executable name to the new build and change `ice: ncpus` to the desired number of processes.

@anton-seaice
Copy link
Contributor Author

Is this clearer @manodeep ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build a model for debugging section for CICE5 can be updated

3 participants

Comments