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 36 commits into
base: main
Choose a base branch
from
Draft

Spack Components for OM3 #171

wants to merge 36 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      ^access3-exe@git.share_prototype=0-git.175%intel@2021.10.0~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

Comment on lines 50 to 51
depends_on("access-cice+cesmcoupled+access3")
depends_on("access-mom6+cesmcoupled+access3")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should these have when statements ?

Comment on lines +21 to +26
version("cmake_build",
git="https://github.com/ACCESS-NRI/MOM6.git",
branch="cmake_build",
submodules=True,
preferred=True,
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
version("cmake_build",
git="https://github.com/ACCESS-NRI/MOM6.git",
branch="cmake_build",
submodules=True,
preferred=True,
)
version("dev/access", branch="dev/access",preferred=True)

Comment on lines +16 to +17
url = "https://github.com/CICE-Consortium/CICE/archive/refs/tags/CICE6.6.0.tar.gz"
version("6.6.0", md5="1c678c0af67bf09f92c0a861344c3a92")
Copy link
Contributor Author

@anton-seaice anton-seaice Feb 4, 2025

Choose a reason for hiding this comment

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

Suggested change
url = "https://github.com/CICE-Consortium/CICE/archive/refs/tags/CICE6.6.0.tar.gz"
version("6.6.0", md5="1c678c0af67bf09f92c0a861344c3a92")

Shall we pre-emptively create a version("access-om3", branch="main") here ?

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