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

mom5 now defaults to "ACCESS-CM" type #115

Closed
dougiesquire opened this issue May 25, 2024 · 4 comments · Fixed by #116
Closed

mom5 now defaults to "ACCESS-CM" type #115

dougiesquire opened this issue May 25, 2024 · 4 comments · Fixed by #116
Assignees

Comments

@dougiesquire
Copy link
Contributor

The mom5 package variant "type" previously defaulted to "ACCESS-OM", but now seems to default to "ACCESS-CM". This breaks the ACCESS-OM2 release spack environment.

E.g.

$ spack spec -I mom5
Input spec
--------------------------------
 -   mom5

Concretized
--------------------------------
 -   mom5@master%gcc@8.5.0~deterministic~optimisation_report+restart_repro build_system=makefile type=ACCESS-CM arch=linux-rocky8-x86_64_v4
 ...

I guess this was introduced in 0283c40 @penguian.

I can't even force type=ACCESS-OM at the moment, because ACCESS-CM is the only option:

$ spack spec mom5 type=ACCESS-OM
==> Error: invalid values for variant "type" in package "mom5": ['ACCESS-OM']
@harshula
Copy link
Collaborator

harshula commented May 27, 2024

Workaround:

diff --git a/packages/mom5/package.py b/packages/mom5/package.py
index 3233467..8a442d6 100644
--- a/packages/mom5/package.py
+++ b/packages/mom5/package.py
@@ -24,8 +24,8 @@ class Mom5(MakefilePackage):
     # The following two variants are not applicable when version is "access-esm1.5":
     variant("deterministic", default=False, description="Deterministic build.")
     variant("optimisation_report", default=False, description="Generate optimisation reports.")
-    with when("@access-esm1.5"):
-        variant("type", default="ACCESS-CM", description="Build MOM5 to support a particular ESM use case.", values=("ACCESS-CM", ), multi=False)
+#    with when("@access-esm1.5"):
+#        variant("type", default="ACCESS-CM", description="Build MOM5 to support a particular ESM use case.", values=("ACCESS-CM", ), multi=False)
 
     # Depend on virtual package "mpi".
     depends_on("mpi")
@@ -38,8 +38,8 @@ class Mom5(MakefilePackage):
         depends_on("oasis3-mct~deterministic", when="~deterministic")
         depends_on("libaccessom2+deterministic", when="+deterministic")
         depends_on("libaccessom2~deterministic", when="~deterministic")
-    with when("@access-esm1.5"):
-        depends_on("oasis3-mct@access-esm1.5")
+#    with when("@access-esm1.5"):
+#        depends_on("oasis3-mct@access-esm1.5")
 
     phases = ["edit", "build", "install"]
 

@harshula
Copy link
Collaborator

Hi @penguian , We are entering:

with when("@access-esm1.5"):

even when we explicitly state mom5@master.

@penguian
Copy link
Contributor

That contradicts the Spack documentation. I will look into it.

@penguian penguian self-assigned this May 28, 2024
@penguian penguian linked a pull request May 28, 2024 that will close this issue
@harshula
Copy link
Collaborator

Thanks @dougiesquire for catching this!

This issue was closed.
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 a pull request may close this issue.

3 participants