Add variants for overriding ESMF_OS and ESMF_COMM for ESMF package (#34808)
* Add variants for overriding ESMF_OS and ESMF_COMM for ESMF package * Add doco for esmf_os/esmf_comm variants
This commit is contained in:
parent
006969a8cd
commit
cc333b600c
@ -90,6 +90,11 @@ class Esmf(MakefilePackage):
|
|||||||
)
|
)
|
||||||
variant("debug", default=False, description="Make a debuggable version of the library")
|
variant("debug", default=False, description="Make a debuggable version of the library")
|
||||||
variant("shared", default=True, description="Build shared 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
|
# Required dependencies
|
||||||
depends_on("zlib")
|
depends_on("zlib")
|
||||||
@ -251,6 +256,11 @@ def edit(self, spec, prefix):
|
|||||||
if self.compiler.name == "cce" or "^cray-mpich" in self.spec:
|
if self.compiler.name == "cce" or "^cray-mpich" in self.spec:
|
||||||
os.environ["ESMF_OS"] = "Unicos"
|
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 #
|
# MPI #
|
||||||
#######
|
#######
|
||||||
@ -284,6 +294,11 @@ def edit(self, spec, prefix):
|
|||||||
# Force use of the single-processor MPI-bypass library.
|
# Force use of the single-processor MPI-bypass library.
|
||||||
os.environ["ESMF_COMM"] = "mpiuni"
|
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 #
|
# LAPACK #
|
||||||
##########
|
##########
|
||||||
|
Loading…
Reference in New Issue
Block a user