From 632076a68189f620ffbca4350064593e2be11fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raffaele=20Solc=C3=A0?= Date: Fri, 31 May 2024 14:55:15 +0200 Subject: [PATCH 1/4] Update spack package post v0.5.0 --- spack/packages/dla-future/package.py | 36 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/spack/packages/dla-future/package.py b/spack/packages/dla-future/package.py index 0a41fa4596..909c683382 100644 --- a/spack/packages/dla-future/package.py +++ b/spack/packages/dla-future/package.py @@ -17,6 +17,7 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage): license("BSD-3-Clause") + version("0.5.0", sha256="f964ee2a96bb58b3f0ee4563ae65fcd136e409a7c0e66beda33f926fc9515a8e") version("0.4.1", sha256="ba95f26475ad68da1f3a24d091dc1b925525e269e4c83c1eaf1d37d29b526666") version("0.4.0", sha256="34fd0da0d1a72b6981bed0bba029ba0947e0d0d99beb3e0aad0a478095c9527d") version("0.3.1", sha256="350a7fd216790182aa52639a3d574990a9d57843e02b92d87b854912f4812bfe") @@ -46,22 +47,13 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage): description="Build C API compatible with ScaLAPACK", ) - variant( - "mpi-gpu-aware", - default=False, - when="@master", - description="Use GPU-aware MPI.", - ) - conflicts( - "+mpi-gpu-aware", - when="~cuda ~rocm", - msg="GPU-aware MPI requires +cuda or +rocm", - ) + variant("mpi-gpu-aware", default=False, when="@0.5.0:", description="Use GPU-aware MPI.") + conflicts("+mpi-gpu-aware", when="~cuda ~rocm", msg="GPU-aware MPI requires +cuda or +rocm") variant( "mpi-gpu-force-contiguous", default=True, - when="@master +mpi-gpu-aware", + when="@0.5.0: +mpi-gpu-aware", description="Force communication buffers to be contiguous before communicating.", ) @@ -148,10 +140,12 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage): depends_on(f"umpire cuda_arch={arch}", when=f"cuda_arch={arch}") patch( - "https://github.com/eth-cscs/DLA-Future/pull/1063/commits/efc9c176a7a8c512b3f37d079dec8c25ac1b7389.patch?full_index=1", - sha256="7f382c872d89f22da1ad499e85ffe9881cc7404c8465e42877a210a09382e2ea", + "https://github.com/eth-cscs/DLA-Future/commit/efc9c176a7a8c512b3f37d079dec8c25ac1b7389.patch?full_index=1", + sha256="f40e4a734650f56c39379717a682d00d6400a7a102d90821542652824a8f64cd", when="@:0.3 %gcc@13:", ) + # https://github.com/spack/spack/issues/41511 + patch("hip_complex_operator_overloads.patch", when="+rocm") ### Variants available only in the DLAF repo spack package cxxstds = ("17", "20") @@ -217,9 +211,11 @@ def cmake_args(self): ] elif mkl_provider == "intel-mkl": args += [ - self.define("DLAF_WITH_MKL", True) - if spec.version <= Version("0.3") - else self.define("DLAF_WITH_MKL_LEGACY", True), + ( + self.define("DLAF_WITH_MKL", True) + if spec.version <= Version("0.3") + else self.define("DLAF_WITH_MKL_LEGACY", True) + ), self.define("MKL_LAPACK_TARGET", f"mkl::mkl_intel_32bit_{mkl_threads}_dyn"), ] @@ -259,7 +255,11 @@ def cmake_args(self): args.append(self.define_from_variant("DLAF_WITH_SCALAPACK", "scalapack")) args.append(self.define_from_variant("DLAF_WITH_MPI_GPU_AWARE", "mpi-gpu-aware")) - args.append(self.define_from_variant("DLAF_WITH_MPI_GPU_FORCE_CONTIGUOUS", "mpi-gpu-force-contiguous")) + args.append( + self.define_from_variant( + "DLAF_WITH_MPI_GPU_FORCE_CONTIGUOUS", "mpi-gpu-force-contiguous" + ) + ) # CUDA/HIP args.append(self.define_from_variant("DLAF_WITH_CUDA", "cuda")) From 2f27cf9c1ecd64ec9cf6426536e80451baf70ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raffaele=20Solc=C3=A0?= Date: Fri, 31 May 2024 16:13:03 +0200 Subject: [PATCH 2/4] suggestions from spack --- spack/packages/dla-future/package.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spack/packages/dla-future/package.py b/spack/packages/dla-future/package.py index 909c683382..98fbba5b24 100644 --- a/spack/packages/dla-future/package.py +++ b/spack/packages/dla-future/package.py @@ -47,14 +47,14 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage): description="Build C API compatible with ScaLAPACK", ) - variant("mpi-gpu-aware", default=False, when="@0.5.0:", description="Use GPU-aware MPI.") - conflicts("+mpi-gpu-aware", when="~cuda ~rocm", msg="GPU-aware MPI requires +cuda or +rocm") + variant("mpi_gpu_aware", default=False, when="@0.5.0:", description="Use GPU-aware MPI.") + conflicts("+mpi_gpu_aware", when="~cuda ~rocm", msg="GPU-aware MPI requires +cuda or +rocm") variant( - "mpi-gpu-force-contiguous", + "mpi_gpu_force_contiguous", default=True, - when="@0.5.0: +mpi-gpu-aware", - description="Force communication buffers to be contiguous before communicating.", + when="@0.5.0: +mpi_gpu_aware", + description="Force GPU communication buffers to be contiguous before communicating.", ) generator("ninja") @@ -254,10 +254,10 @@ def cmake_args(self): args.append(self.define_from_variant("DLAF_WITH_SCALAPACK", "scalapack")) - args.append(self.define_from_variant("DLAF_WITH_MPI_GPU_AWARE", "mpi-gpu-aware")) + args.append(self.define_from_variant("DLAF_WITH_MPI_GPU_AWARE", "mpi_gpu_aware")) args.append( self.define_from_variant( - "DLAF_WITH_MPI_GPU_FORCE_CONTIGUOUS", "mpi-gpu-force-contiguous" + "DLAF_WITH_MPI_GPU_FORCE_CONTIGUOUS", "mpi_gpu_force_contiguous" ) ) From 12ad8acf8be25674b5b77cd39dfadfa8a47e53c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raffaele=20Solc=C3=A0?= Date: Fri, 31 May 2024 16:32:01 +0200 Subject: [PATCH 3/4] remove non existing patch on local repo --- spack/packages/dla-future/package.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/spack/packages/dla-future/package.py b/spack/packages/dla-future/package.py index 98fbba5b24..7c384bf4da 100644 --- a/spack/packages/dla-future/package.py +++ b/spack/packages/dla-future/package.py @@ -144,8 +144,6 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage): sha256="f40e4a734650f56c39379717a682d00d6400a7a102d90821542652824a8f64cd", when="@:0.3 %gcc@13:", ) - # https://github.com/spack/spack/issues/41511 - patch("hip_complex_operator_overloads.patch", when="+rocm") ### Variants available only in the DLAF repo spack package cxxstds = ("17", "20") From 2ccc6cbda329397699d8ba2e09828f1261ac731b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raffaele=20Solc=C3=A0?= Date: Mon, 3 Jun 2024 10:26:28 +0200 Subject: [PATCH 4/4] fix rocm usage of mpi_gpu_aware variant --- ci/docker/release-rocm533.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/docker/release-rocm533.yaml b/ci/docker/release-rocm533.yaml index 36fa1b50e9..01ad5f49ae 100644 --- a/ci/docker/release-rocm533.yaml +++ b/ci/docker/release-rocm533.yaml @@ -18,7 +18,7 @@ spack: true specs: - - dla-future@master +rocm amdgpu_target=gfx90a:xnack- +mpi-gpu-aware +miniapps +ci-test + - dla-future@master +rocm amdgpu_target=gfx90a:xnack- +mpi_gpu_aware +miniapps +ci-test packages: all: