diff options
author | liuyangzhuan <liuyangzhuan@gmail.com> | 2022-11-01 10:28:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-01 10:28:01 -0700 |
commit | 973b43b1c1340bd84c4f193f19a6ad01d8de8edb (patch) | |
tree | 78e7ef59981ec6580da9b72cc5cea093231d39ec | |
parent | d925ba9bc67b7dbd638e678930758724124cefb5 (diff) | |
download | spack-973b43b1c1340bd84c4f193f19a6ad01d8de8edb.tar.gz spack-973b43b1c1340bd84c4f193f19a6ad01d8de8edb.tar.bz2 spack-973b43b1c1340bd84c4f193f19a6ad01d8de8edb.tar.xz spack-973b43b1c1340bd84c4f193f19a6ad01d8de8edb.zip |
superlu-dist: fix rocm variant for the master branch (#33624)
* superlu-dist: fix rocm variant for the master branch
* simplify superlu-dist
* add mpi include to HIP_HIPCC_FLAGS
Co-authored-by: liuyangzhuan <liuyangzhuan@users.noreply.github.com>
-rw-r--r-- | var/spack/repos/builtin/packages/superlu-dist/package.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index 21a5da1542..d429da8ce9 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -122,12 +122,15 @@ class SuperluDist(CMakePackage, CudaPackage, ROCmPackage): if cuda_arch[0] != "none": append_define("CMAKE_CUDA_ARCHITECTURES", cuda_arch[0]) - if "+rocm" in spec and spec.satisfies("@amd"): + if "+rocm" in spec and (spec.satisfies("@amd") or spec.satisfies("@8:")): append_define("TPL_ENABLE_HIPLIB", True) append_define("HIP_ROOT_DIR", spec["hip"].prefix) rocm_archs = spec.variants["amdgpu_target"].value + mpiinc = spec["mpi"].prefix.include if "none" not in rocm_archs: - append_define("HIP_HIPCC_FLAGS", "--amdgpu-target=" + ",".join(rocm_archs)) + append_define( + "HIP_HIPCC_FLAGS", "--amdgpu-target=" + ",".join(rocm_archs) + " -I/" + mpiinc + ) append_from_variant("BUILD_SHARED_LIBS", "shared") return cmake_args |