summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarah Osborn <30503782+osborn9@users.noreply.github.com>2022-10-10 06:46:26 -0700
committerGitHub <noreply@github.com>2022-10-10 15:46:26 +0200
commitcbc867a24c51b7137768c1c20685c8c9e6cef1fa (patch)
tree3d9e320c2bcc1ee5c07394eac5c84186fba9bfc2
parent86aaede2023aa5717e0749836ba7b7a3bc1ad02c (diff)
downloadspack-cbc867a24c51b7137768c1c20685c8c9e6cef1fa.tar.gz
spack-cbc867a24c51b7137768c1c20685c8c9e6cef1fa.tar.bz2
spack-cbc867a24c51b7137768c1c20685c8c9e6cef1fa.tar.xz
spack-cbc867a24c51b7137768c1c20685c8c9e6cef1fa.zip
hypre: fix to correctly find rocsparse and rocrand when not in ROCM_PATH (#33073)
-rw-r--r--var/spack/repos/builtin/packages/hypre/package.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py
index 36d4ec39df..874b2321cb 100644
--- a/var/spack/repos/builtin/packages/hypre/package.py
+++ b/var/spack/repos/builtin/packages/hypre/package.py
@@ -93,7 +93,9 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
depends_on("blas")
depends_on("lapack")
depends_on("superlu-dist", when="+superlu-dist+mpi")
-
+ depends_on("rocsparse", when="+rocm")
+ depends_on("rocthrust", when="+rocm")
+ depends_on("rocrand", when="+rocm")
depends_on("umpire", when="+umpire")
for sm_ in CudaPackage.cuda_arch_values:
depends_on(
@@ -235,11 +237,16 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
configure_args.append("--disable-cub")
if "+rocm" in spec:
+ rocm_pkgs = ["rocsparse", "rocthrust", "rocprim", "rocrand"]
+ rocm_inc = ""
+ for pkg in rocm_pkgs:
+ rocm_inc += spec[pkg].headers.include_flags + " "
configure_args.extend(
[
"--with-hip",
"--enable-rocrand",
"--enable-rocsparse",
+ "--with-extra-CUFLAGS={0}".format(rocm_inc),
]
)
rocm_arch_vals = spec.variants["amdgpu_target"].value