petsc, mfem: update rocm dependency (#46324)

* petsc: configure requires rocm-core/rocm_version.h to detect ROCM_VERSION_MAJOR.ROCM_VERSION_MINOR.ROCM_VERSION_PATCH

* mfem: add dependency on rocprim (as needed via petsc dependency)

In file included from linalg/petsc.cpp:19:
In file included from linalg/linalg.hpp:65:
In file included from linalg/petsc.hpp:48:
In file included from /scratch/svcpetsc/spack.x/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.4.0/petsc-3.22.0-7dsxwizo24ycnqvwnsscupuh4i7yusrh/include/petscsystypes.h:530:
In file included from /scratch/svcpetsc/spack.x/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.4.0/rocthrust-6.1.2-ux5nmi4utw27oaqmz3sfjmhb6hyt5zed/include/thrust/complex.h:30:
/scratch/svcpetsc/spack.x/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.4.0/rocthrust-6.1.2-ux5nmi4utw27oaqmz3sfjmhb6hyt5zed/include/thrust/detail/type_traits.h:29:10: fatal error: 'rocprim/detail/match_result_type.hpp' file not found
   29 | #include <rocprim/detail/match_result_type.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
Satish Balay 2024-09-15 13:30:55 -05:00 committed by GitHub
parent b4e32706db
commit 02320b18f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -973,6 +973,9 @@ def find_optional_library(name, prefix):
if "^rocthrust" in spec and not spec["hip"].external:
# petsc+rocm needs the rocthrust header path
hip_headers += spec["rocthrust"].headers
if "^rocprim" in spec and not spec["hip"].external:
# rocthrust [via petsc+rocm] has a dependency on rocprim
hip_headers += spec["rocprim"].headers
if "^hipblas" in spec and not spec["hip"].external:
# superlu-dist+rocm needs the hipblas header path
hip_headers += spec["hipblas"].headers

View File

@ -253,6 +253,7 @@ def check_fortran_compiler(self):
depends_on("hip", when="+rocm")
with when("+rocm"):
depends_on("rocm-core")
depends_on("hipblas")
depends_on("hipsparse")
depends_on("hipsolver")
@ -602,7 +603,7 @@ def configure_options(self):
hip_arch = spec.variants["amdgpu_target"].value
options.append("--with-hip-arch={0}".format(hip_arch[0]))
hip_pkgs = ["hipsparse", "hipblas", "hipsolver", "rocsparse", "rocsolver", "rocblas"]
hip_ipkgs = hip_pkgs + ["rocthrust", "rocprim"]
hip_ipkgs = hip_pkgs + ["rocthrust", "rocprim", "rocm-core"]
hip_lpkgs = hip_pkgs
if spec.satisfies("^rocrand@5.1:"):
hip_ipkgs.extend(["rocrand"])