summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/esmf/package.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/esmf/package.py b/var/spack/repos/builtin/packages/esmf/package.py
index 31c97b2003..4d7ef3bccb 100644
--- a/var/spack/repos/builtin/packages/esmf/package.py
+++ b/var/spack/repos/builtin/packages/esmf/package.py
@@ -90,6 +90,11 @@ class Esmf(MakefilePackage):
)
variant("debug", default=False, description="Make a debuggable version of the library")
variant("shared", default=True, description="Build shared library")
+ # 'esmf_comm' and 'esmf_os' variants allow override values for their corresponding
+ # build environment variables. Documentation, including valid values, can be found at
+ # https://earthsystemmodeling.org/docs/release/latest/ESMF_usrdoc/node10.html#SECTION000105000000000000000
+ variant("esmf_comm", default="auto", description="Override for ESMF_COMM variable")
+ variant("esmf_os", default="auto", description="Override for ESMF_OS variable")
# Required dependencies
depends_on("zlib")
@@ -251,6 +256,11 @@ class Esmf(MakefilePackage):
if self.compiler.name == "cce" or "^cray-mpich" in self.spec:
os.environ["ESMF_OS"] = "Unicos"
+ # Allow override of ESMF_OS:
+ os_variant = spec.variants["esmf_os"].value
+ if os_variant != "auto":
+ os.environ["ESMF_OS"] = os_variant
+
#######
# MPI #
#######
@@ -284,6 +294,11 @@ class Esmf(MakefilePackage):
# Force use of the single-processor MPI-bypass library.
os.environ["ESMF_COMM"] = "mpiuni"
+ # Allow override of ESMF_COMM:
+ comm_variant = spec.variants["esmf_comm"].value
+ if comm_variant != "auto":
+ os.environ["ESMF_COMM"] = comm_variant
+
##########
# LAPACK #
##########