Skip to content

Add default CICE5 builds when using CMake#383

Merged
anton-seaice merged 5 commits intoapi-v2from
382
Feb 18, 2026
Merged

Add default CICE5 builds when using CMake#383
anton-seaice merged 5 commits intoapi-v2from
382

Conversation

@anton-seaice
Copy link
Copy Markdown
Contributor

@anton-seaice anton-seaice commented Feb 11, 2026

This change adds support for doing multiple CMake builds within a spack package.

For model releases & deployments, we use the defaults in this package. For OM2 this produces three executables.

For development, optimisation work etc, the user can specify the grid & processor layout, but only one executable per spack spec.

All current behaviour is unmodified, except that setting build_system=cmake without providing the layout variants is now supported, and builds the default layouts.

In the unlikely case we changed the default build layouts such that the executable names were not unique, some builds would be missing.

ll .../spack/om2/release/linux-rocky8-x86_64_v4/oneapi-2025.2.0/cice5-2026.01.000-etrk3e4vjol5algldjnsorw2hy3piagf/bin

-rwxr-xr-x 1 as2285 tm70 18651432 Feb 11 13:11 cice_auscom_1440x1080_30x27.exe
-rwxr-xr-x 1 as2285 tm70 19013264 Feb 11 13:11 cice_auscom_3600x2700_40x30.exe
-rwxr-xr-x 1 as2285 tm70 17885064 Feb 11 13:11 cice_auscom_360x300_15x300.exe

closes #382

@anton-seaice anton-seaice self-assigned this Feb 11, 2026
@anton-seaice anton-seaice changed the base branch from api-v2 to main February 11, 2026 00:38
@anton-seaice anton-seaice changed the base branch from main to api-v2 February 11, 2026 00:39
@anton-seaice anton-seaice changed the base branch from api-v2 to main February 11, 2026 00:39
@anton-seaice anton-seaice marked this pull request as ready for review February 11, 2026 00:42
@anton-seaice anton-seaice marked this pull request as draft February 11, 2026 00:42
@anton-seaice anton-seaice changed the title demo for calling CMake multiple time demo for calling CMake multiple times Feb 11, 2026
Comment thread packages/cice5/package.py Outdated
Comment thread packages/cice5/package.py Outdated
Comment thread packages/cice5/package.py Outdated
Comment thread packages/cice5/package.py Outdated
Comment thread spack_repo/access/nri/packages/cice5/package.py Outdated
@anton-seaice anton-seaice changed the title demo for calling CMake multiple times Add default CICE5 builds when using CMake Feb 13, 2026
@anton-seaice anton-seaice changed the base branch from main to api-v2 February 13, 2026 03:03
@anton-seaice anton-seaice marked this pull request as ready for review February 13, 2026 03:38
Split into seperate cmake, build and install steps
Copy link
Copy Markdown
Contributor

@dougiesquire dougiesquire left a comment

Choose a reason for hiding this comment

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

LGTM @anton-seaice. One nothing suggestion to prove I looked

Comment thread spack_repo/access/nri/packages/cice5/package.py Outdated
@anton-seaice
Copy link
Copy Markdown
Contributor Author

Ready for final reviews

See ACCESS-NRI/ACCESS-OM2#135 for builds on gadi and links to repro tests with the OM2

Comment thread spack_repo/access/nri/packages/cice5/package.py Outdated
Co-authored-by: Dougie Squire <42455466+dougiesquire@users.noreply.github.com>
Comment on lines +179 to +182
if all([
self.spec.variants[variant].value != 'none'
for variant in layout_variants
]):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It would be clearer that this is a list comprehension if the square brackets are immediately at the start and end of the list comprehension.

Comment on lines +186 to +189
elif all([
self.spec.variants[variant].value == 'none'
for variant in layout_variants
]):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It would be clearer that this is a list comprehension if the square brackets are immediately at the start and end of the list comprehension.

Copy link
Copy Markdown
Collaborator

@harshula harshula left a comment

Choose a reason for hiding this comment

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

Thanks! Great work.

@anton-seaice anton-seaice merged commit ae53ade into api-v2 Feb 18, 2026
5 checks passed
@anton-seaice anton-seaice deleted the 382 branch February 18, 2026 21:50
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.

Investigate invoking CMake multiple times in a spack package

3 participants