add magma variant to strumpack (#39224)

* add magma variant to strumpack
* clarify conflicts to be excuive to rocm/cuda, without it +magma+cuda fails as it is ~rocm
   modified:   var/spack/repos/builtin/packages/strumpack/package.py
* add missing depends_on for magma variant
This commit is contained in:
Sajid Ali 2023-08-24 10:39:24 -05:00 committed by GitHub
parent 46285d9725
commit 4b618704bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,6 +61,7 @@ class Strumpack(CMakePackage, CudaPackage, ROCmPackage):
variant("count_flops", default=False, description="Build with flop counters")
variant("task_timers", default=False, description="Build with timers for internal routines")
variant("slate", default=True, description="Build with SLATE support")
variant("magma", default=False, description="Build with MAGMA support")
depends_on("cmake@3.11:", when="@:6.2.9", type="build")
depends_on("cmake@3.17:", when="@6.3.0:", type="build")
@ -84,6 +85,8 @@ class Strumpack(CMakePackage, CudaPackage, ROCmPackage):
depends_on("rocsolver", when="+rocm")
depends_on("rocthrust", when="+rocm")
depends_on("slate", when="+slate")
depends_on("magma+cuda", when="+magma+cuda")
depends_on("magma+rocm", when="+magma+rocm")
depends_on("slate+cuda", when="+cuda+slate")
depends_on("slate+rocm", when="+rocm+slate")
for val in ROCmPackage.amdgpu_targets:
@ -100,6 +103,7 @@ class Strumpack(CMakePackage, CudaPackage, ROCmPackage):
conflicts("+rocm", when="+cuda")
conflicts("+slate", when="@:5.1.1")
conflicts("+slate", when="~mpi")
conflicts("+magma", when="~rocm~cuda")
patch("intel-19-compile.patch", when="@3.1.1")
patch("shared-rocm.patch", when="@5.1.1")
@ -118,6 +122,7 @@ def cmake_args(self):
self.define_from_variant("TPL_ENABLE_PARMETIS", "parmetis"),
self.define_from_variant("TPL_ENABLE_SCOTCH", "scotch"),
self.define_from_variant("TPL_ENABLE_BPACK", "butterflypack"),
self.define_from_variant("TPL_ENABLE_MAGMA", "magma"),
self.define_from_variant("STRUMPACK_COUNT_FLOPS", "count_flops"),
self.define_from_variant("STRUMPACK_TASK_TIMERS", "task_timers"),
"-DTPL_BLAS_LIBRARIES=%s" % spec["blas"].libs.joined(";"),