diff options
author | Vicente Bolea <vicente.bolea@kitware.com> | 2024-07-01 12:20:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-01 09:20:48 -0700 |
commit | 7c65655c7e086b57bcb05d8b4d6c04e49183b1fd (patch) | |
tree | 4ea55eea1f3458dfe0d9d8cfb708dec6187a76f6 | |
parent | 76ca264b7299f57019623335d8ecb1b2bb05db12 (diff) | |
download | spack-7c65655c7e086b57bcb05d8b4d6c04e49183b1fd.tar.gz spack-7c65655c7e086b57bcb05d8b4d6c04e49183b1fd.tar.bz2 spack-7c65655c7e086b57bcb05d8b4d6c04e49183b1fd.tar.xz spack-7c65655c7e086b57bcb05d8b4d6c04e49183b1fd.zip |
adios2: add patch to support rocm6 (#44941)
* adios2: add patch to support rocm6
* e4s rocm ci: re-enable adios2 +rocm
---------
Co-authored-by: eugeneswalker <eugenesunsetwalker@gmail.com>
3 files changed, 34 insertions, 2 deletions
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml index 5b5b9e0e75..d63720dcfa 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml @@ -245,7 +245,7 @@ spack: # - paraview +rocm amdgpu_target=gfx908 # mesa: https://github.com/spack/spack/issues/44745 # - vtk-m ~openmp +rocm amdgpu_target=gfx908 # vtk-m: https://github.com/spack/spack/issues/40268 # -- - # - adios2 +kokkos +rocm amdgpu_target=gfx908 # adios2:https://github.com/spack/spack/issues/44594 + - adios2 +kokkos +rocm amdgpu_target=gfx908 # adios2:https://github.com/spack/spack/issues/44594 # - cp2k +mpi +rocm amdgpu_target=gfx908 # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]), # - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx908 ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx908 # raja: https://github.com/spack/spack/issues/44593 # - lbann ~cuda +rocm amdgpu_target=gfx908 # aluminum: https://github.com/spack/spack/issues/38807 @@ -287,7 +287,7 @@ spack: # - paraview +rocm amdgpu_target=gfx90a # mesa: https://github.com/spack/spack/issues/44745 # - vtk-m ~openmp +rocm amdgpu_target=gfx90a # vtk-m: https://github.com/spack/spack/issues/40268 # -- - # - adios2 +kokkos +rocm amdgpu_target=gfx90a # adios2: https://github.com/spack/spack/issues/44594 + - adios2 +kokkos +rocm amdgpu_target=gfx90a # adios2: https://github.com/spack/spack/issues/44594 # - cp2k +mpi +rocm amdgpu_target=gfx90a # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]), # - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx90a ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx90a # raja: https://github.com/spack/spack/issues/44593 # - lbann ~cuda +rocm amdgpu_target=gfx90a # aluminum: https://github.com/spack/spack/issues/38807 diff --git a/var/spack/repos/builtin/packages/adios2/2.10-enable-rocm6.patch b/var/spack/repos/builtin/packages/adios2/2.10-enable-rocm6.patch new file mode 100644 index 0000000000..abd69a9d99 --- /dev/null +++ b/var/spack/repos/builtin/packages/adios2/2.10-enable-rocm6.patch @@ -0,0 +1,28 @@ +From c718e99a9e226b7327ab41396823873999206e38 Mon Sep 17 00:00:00 2001 +From: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com> +Date: Thu, 27 Jun 2024 18:25:58 -0400 +Subject: [PATCH] kokkos: support ROCM >=6 + +--- + source/adios2/helper/kokkos/adiosKokkos.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/source/adios2/helper/kokkos/adiosKokkos.cpp b/source/adios2/helper/kokkos/adiosKokkos.cpp +index e0599944e..d2619f0d4 100644 +--- a/source/adios2/helper/kokkos/adiosKokkos.cpp ++++ b/source/adios2/helper/kokkos/adiosKokkos.cpp +@@ -85,7 +85,11 @@ bool IsGPUbuffer(const void *ptr) + hipError_t ret; + hipPointerAttribute_t attr; + ret = hipPointerGetAttributes(&attr, ptr); ++#if defined(ROCM_VERSION_MAJOR) && ROCM_VERSION_MAJOR < 6 + if (ret == hipSuccess && attr.memoryType == hipMemoryTypeDevice) ++#else ++ if (ret == hipSuccess && attr.type == hipMemoryTypeDevice) ++#endif + { + return true; + } +-- +2.35.3 + diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py index b23120c599..8df3d9e918 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -232,6 +232,10 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage): # https://github.com/ornladios/ADIOS2/pull/3893 patch("2.9.2-cmake-find-threads-package-first.patch", when="@2.9") + # ROCM: enable support for rocm >= 6 + # https://github.com/ornladios/ADIOS2/pull/4214 + patch("2.10-enable-rocm6.patch", when="@2.9.1:") + @when("%fj") def patch(self): """add fujitsu mpi commands #16864""" |