Skip to content

Commit

Permalink
ginkgo: add v1.8.0 (spack#45791)
Browse files Browse the repository at this point in the history
* bump[Ginkgo]: add version 1.8.0
* [Ginkgo] add patch for rocthrust
* [Ginkgo] change maintainer
* [Ginkgo] use patch from PR
* [Ginkgo] fix style issues

---------

Co-authored-by: Terry Cojean <terry.cojean@kit.edu>
  • Loading branch information
MarcelKoch and tcojean authored Aug 20, 2024
1 parent 3699a0e commit f596a8c
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions var/spack/repos/builtin/packages/ginkgo/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage):

test_requires_compiler = True

maintainers("tcojean", "hartwiganzt")
maintainers("MarcelKoch", "hartwiganzt")

tags = ["e4s"]

license("MIT")
license("BSD-3-Clause")

version("develop", branch="develop")
version("master", branch="master")
version("1.8.0", commit="586b1754058d7a32d4bd1b650f9603484c2a8927") # v1.8.0
version("1.7.0", commit="49242ff89af1e695d7794f6d50ed9933024b66fe") # v1.7.0
version("1.6.0", commit="1f1ed46e724334626f016f105213c047e16bc1ae") # v1.6.0
version("1.5.0", commit="234594c92b58e2384dfb43c2d08e7f43e2b58e7a") # v1.5.0
Expand Down Expand Up @@ -57,10 +58,11 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage):
depends_on("cmake@3.13:", type="build", when="@1.4.0:1.6.0")
depends_on("cmake@3.16:", type="build", when="@1.7.0:")
depends_on("cmake@3.18:", type="build", when="+cuda@1.7.0:")
depends_on("cmake@3.21:", type="build", when="+rocm@1.8.0:")
depends_on("cuda@9:", when="+cuda @:1.4.0")
depends_on("cuda@9.2:", when="+cuda @1.5.0:")
depends_on("cuda@10.1:", when="+cuda @1.7.0:")
depends_on("mpi", when="+mpi")
depends_on("mpi@3.1:", when="+mpi")

depends_on("rocthrust", when="+rocm")
depends_on("hipsparse", when="+rocm")
Expand Down Expand Up @@ -118,6 +120,13 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage):
# Add missing include statement
patch("thrust-count-header.patch", when="+rocm @1.5.0")

# Correctly find rocthrust through CMake
patch(
"https://github.com/ginkgo-project/ginkgo/pull/1668.patch?full_index=1",
sha256="27d6ae6c87bec15464d20a963c336e89eac92625d07e3f9548e33cd7b952a496",
when="+rocm @1.8.0",
)

def setup_build_environment(self, env):
spec = self.spec
if "+sycl" in spec:
Expand Down Expand Up @@ -150,6 +159,8 @@ def cmake_args(self):
raise InstallError("ginkgo +sycl requires %oneapi@2021.3.0:")
elif self.spec.satisfies("@1.7.0: +sycl") and not self.spec.satisfies("%oneapi@2022.1.0:"):
raise InstallError("ginkgo +sycl requires %oneapi@2022.1.0:")
elif self.spec.satisfies("@1.8.0: +sycl") and not self.spec.satisfies("%oneapi@2023.1.0:"):
raise InstallError("ginkgo +sycl requires %oneapi@2023.1.0:")

spec = self.spec
from_variant = self.define_from_variant
Expand Down

0 comments on commit f596a8c

Please sign in to comment.