Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spack Components for OM3 #171

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft

Spack Components for OM3 #171

wants to merge 22 commits into from

Conversation

anton-seaice
Copy link
Contributor

@anton-seaice anton-seaice commented Nov 27, 2024

This is an extremely draft collection of changes to spack-packages to build OM3 by component.

I've been building access3-share with '+install_libraries' in the spec, I haven't looked at building with an executable yet

I've been using these git versions :

https://github.com/ACCESS-NRI/CICE/tree/5-port_cmake_build

and

https://github.com/ACCESS-NRI/access3-share/tree/share_prototype

Example deployment: ACCESS-NRI/ACCESS-OM3#35

@anton-seaice anton-seaice marked this pull request as draft November 29, 2024 04:29
@anton-seaice
Copy link
Contributor Author

Contributes to #163

@anton-seaice
Copy link
Contributor Author

This is still a draft but is ready for a review for style / approach.

I've only implemented for CICE6 at this point, see the example deployment in ACCESS-NRI/ACCESS-OM3#35

@anton-seaice
Copy link
Contributor Author

In deployment, I have been trying to build 'access3-exe' with 'configurations=CICE6'

When concretising, the requested configuration gets added to the default:

 -   myn2njk      ^[email protected]_prototype=0-git.175%[email protected]~ipo~openmp build_system=cmake build_type=Release configurations=CICE6,CICE6-WW3,MOM6-CICE6,MOM6-CICE6-WW3 generator=make arch=linux-rocky8-x86_64

The default in the access3-exe spack package is for 'configurations = CICE6-WW3,MOM6-CICE6,MOM6-CICE6-WW3' and so the CICE6 gets added to this list rather than replacing it. There doesn't appear to be a way in spack to remove variants, when multi=True (i.e. multiple are supported). So i think I will set the default to be None.

The spack MultiValuedVariant class only has an append function (no remove function ...), see https://github.com/spack/spack/blob/2447d16e55d800e6a9cb82a645ab9edfd24f08ac/lib/spack/spack/variant.py#L503

description="Install component libraries"
)
variant("openmp", default=False, description="Enable OpenMP")
variant("mom_symmetric", default=False, description="Use symmetric memory in MOM6")
Copy link
Contributor Author

@anton-seaice anton-seaice Jan 15, 2025

Choose a reason for hiding this comment

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

We probably make mom_symmetric True by default, need to confirm. See COSIMA/access-om3#255

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.

2 participants