legion package: use conditional variants for gasnet (#38902)
This commit is contained in:
parent
b72d0e850d
commit
206a0a1658
@ -148,42 +148,26 @@ def validate_gasnet_root(value):
|
|||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
variant(
|
with when("network=gasnet"):
|
||||||
"gasnet_root",
|
variant(
|
||||||
default="none",
|
"gasnet_root",
|
||||||
values=validate_gasnet_root,
|
default="none",
|
||||||
description="Path to a pre-installed version of GASNet (prefix directory).",
|
values=validate_gasnet_root,
|
||||||
multi=False,
|
description="Path to a pre-installed version of GASNet (prefix directory).",
|
||||||
)
|
multi=False,
|
||||||
conflicts("gasnet_root", when="network=mpi")
|
)
|
||||||
|
variant(
|
||||||
gasnet_conduits = ["aries", "ibv", "udp", "mpi", "ucx", "ofi-slingshot11"]
|
"conduit",
|
||||||
variant(
|
default="none",
|
||||||
"conduit",
|
values=("none", "aries", "ibv", "udp", "mpi", "ucx", "ofi-slingshot11"),
|
||||||
default="none",
|
description="The gasnet conduit(s) to enable.",
|
||||||
values=gasnet_conduits + ["none"],
|
sticky=True,
|
||||||
description="The gasnet conduit(s) to enable.",
|
multi=False,
|
||||||
multi=False,
|
|
||||||
)
|
|
||||||
|
|
||||||
conflicts(
|
|
||||||
"conduit=none",
|
|
||||||
when="network=gasnet",
|
|
||||||
msg="a conduit must be selected when 'network=gasnet'",
|
|
||||||
)
|
|
||||||
|
|
||||||
for c in gasnet_conduits:
|
|
||||||
conflict_str = "conduit=%s" % c
|
|
||||||
conflicts(
|
|
||||||
conflict_str, when="network=mpi", msg="conduit attribute requires 'network=gasnet'."
|
|
||||||
)
|
)
|
||||||
conflicts(
|
conflicts(
|
||||||
conflict_str, when="network=none", msg="conduit attribute requires 'network=gasnet'."
|
"conduit=none", msg="the 'conduit' variant must be set to a value other than 'none'"
|
||||||
)
|
)
|
||||||
|
variant("gasnet_debug", default=False, description="Build gasnet with debugging enabled.")
|
||||||
variant("gasnet_debug", default=False, description="Build gasnet with debugging enabled.")
|
|
||||||
conflicts("+gasnet_debug", when="network=mpi")
|
|
||||||
conflicts("+gasnet_debug", when="network=none")
|
|
||||||
|
|
||||||
variant("shared", default=False, description="Build shared libraries.")
|
variant("shared", default=False, description="Build shared libraries.")
|
||||||
|
|
||||||
@ -313,11 +297,7 @@ def cmake_args(self):
|
|||||||
options.append("-DLegion_EMBED_GASNet_CONFIGURE_ARGS=--enable-debug")
|
options.append("-DLegion_EMBED_GASNet_CONFIGURE_ARGS=--enable-debug")
|
||||||
elif "network=mpi" in spec:
|
elif "network=mpi" in spec:
|
||||||
options.append("-DLegion_NETWORKS=mpi")
|
options.append("-DLegion_NETWORKS=mpi")
|
||||||
if spec.variants["gasnet_root"].value != "none":
|
|
||||||
raise InstallError("'gasnet_root' is only valid when 'network=gasnet'.")
|
|
||||||
else:
|
else:
|
||||||
if spec.variants["gasnet_root"].value != "none":
|
|
||||||
raise InstallError("'gasnet_root' is only valid when 'network=gasnet'.")
|
|
||||||
options.append("-DLegion_EMBED_GASNet=OFF")
|
options.append("-DLegion_EMBED_GASNet=OFF")
|
||||||
|
|
||||||
if "+shared" in spec:
|
if "+shared" in spec:
|
||||||
|
Loading…
Reference in New Issue
Block a user