-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mom5: add support for generic tracers (#166)
* Add new variant access-gtracers * Add new dependencies access-fms & access-generic-tracers
- Loading branch information
Showing
1 changed file
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ class Mom5(MakefilePackage): | |
version("access-esm1.6", branch="master") | ||
|
||
variant("restart_repro", default=True, description="Reproducible restart build.") | ||
variant("access-gtracers", default=False, description="Use ACCESS-NRI's fork of GFDL-generic-tracers.") | ||
# 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.") | ||
|
@@ -30,6 +31,9 @@ class Mom5(MakefilePackage): | |
multi=False, | ||
description="Build MOM5 to support a particular use case.") | ||
|
||
depends_on("access-fms", when="+access-gtracers") | ||
depends_on("access-generic-tracers", when="+access-gtracers") | ||
|
||
with when("@:access-esm0,access-esm2:"): | ||
depends_on("[email protected]:") | ||
depends_on("[email protected]:") | ||
|
@@ -82,6 +86,10 @@ def edit(self, spec, prefix): | |
FFLAGS_OPT = "-g0 -O0 -xCORE-AVX2 -debug none -check none" | ||
CFLAGS_OPT = "-O0 -debug none -xCORE-AVX2" | ||
|
||
if self.spec.satisfies("+access-gtracers"): | ||
ideps.extend(["access-fms", "access-generic-tracers"]) | ||
ldeps.extend(["access-fms", "access-generic-tracers"]) | ||
|
||
incs = " ".join([istr] + [(spec[d].headers).cpp_flags for d in ideps]) | ||
libs = " ".join([(spec[d].libs).ld_flags for d in ldeps]) | ||
|
||
|
@@ -488,6 +496,10 @@ def build(self, spec, prefix): | |
build = Executable("./MOM_compile.csh") | ||
if "+restart_repro" in self.spec: | ||
build.add_default_env("REPRO", "true") | ||
|
||
if self.spec.satisfies("+access-gtracers"): | ||
build.add_default_env("SPACK_BUILD", "true") | ||
|
||
if not self.spec.satisfies("@access-esm1.5"): | ||
# The MOM5 commit d7ba13a3f364ce130b6ad0ba813f01832cada7a2 | ||
# requires the --no_version switch to avoid git hashes being | ||
|