hypre: add Umpire variant (#32884)
* hypre: Add umpire variant * hypre: Fix to umpire / GPU target propagation
This commit is contained in:
parent
2214f34380
commit
77afad229c
@ -72,6 +72,7 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
|
||||
variant("unified-memory", default=False, description="Use unified memory")
|
||||
variant("fortran", default=True, description="Enables fortran bindings")
|
||||
variant("gptune", default=False, description="Add the GPTune hookup code")
|
||||
variant("umpire", default=False, description="Enable Umpire support")
|
||||
|
||||
# Patch to add gptune hookup codes
|
||||
patch("ij_gptune.patch", when="+gptune@2.19.0")
|
||||
@ -93,17 +94,31 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
|
||||
depends_on("lapack")
|
||||
depends_on("superlu-dist", when="+superlu-dist+mpi")
|
||||
|
||||
depends_on("umpire", when="+umpire")
|
||||
for sm_ in CudaPackage.cuda_arch_values:
|
||||
depends_on(
|
||||
"umpire+cuda cuda_arch={0}".format(sm_), when="+umpire+cuda cuda_arch={0}".format(sm_)
|
||||
)
|
||||
for gfx in ROCmPackage.amdgpu_targets:
|
||||
depends_on(
|
||||
"umpire+rocm amdgpu_target={0}".format(gfx),
|
||||
when="+umpire+rocm amdgpu_target={0}".format(gfx),
|
||||
)
|
||||
|
||||
# Conflicts
|
||||
conflicts("+cuda", when="+int64")
|
||||
conflicts("+rocm", when="+int64")
|
||||
conflicts("+rocm", when="@:2.20")
|
||||
conflicts("+unified-memory", when="~cuda~rocm")
|
||||
conflicts("+gptune", when="~mpi")
|
||||
# Umpire device allocator exports device code, which requires static libs
|
||||
conflicts("+umpire", when="+shared+cuda")
|
||||
|
||||
# Patch to build shared libraries on Darwin does not apply to
|
||||
# versions before 2.13.0
|
||||
conflicts("+shared@:2.12 platform=darwin")
|
||||
|
||||
# Conflicts
|
||||
# Version conflicts
|
||||
# Option added in v2.13.0
|
||||
conflicts("+superlu-dist", when="@:2.12")
|
||||
|
||||
@ -113,6 +128,9 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
|
||||
# Option added in v2.16.0
|
||||
conflicts("+mixedint", when="@:2.15")
|
||||
|
||||
# Option added in v2.21.0
|
||||
conflicts("+umpire", when="@:2.20")
|
||||
|
||||
configure_directory = "src"
|
||||
|
||||
def url_for_version(self, version):
|
||||
@ -176,6 +194,14 @@ def configure_args(self):
|
||||
configure_args.append("--with-dsuperlu-lib=%s" % spec["superlu-dist"].libs)
|
||||
configure_args.append("--with-dsuperlu")
|
||||
|
||||
if "+umpire" in spec:
|
||||
configure_args.append("--with-umpire-include=%s" % spec["umpire"].prefix.include)
|
||||
configure_args.append("--with-umpire-lib=%s" % spec["umpire"].libs)
|
||||
if "~cuda~rocm" in spec:
|
||||
configure_args.append("--with-umpire-host")
|
||||
else:
|
||||
configure_args.append("--with-umpire")
|
||||
|
||||
configure_args.extend(self.enable_or_disable("debug"))
|
||||
|
||||
if "+cuda" in spec:
|
||||
|
Loading…
Reference in New Issue
Block a user