xsdk-project / xsdk-issues

A repository under which GitHub issues not related to a specific xSDK repo can be filed.
7 stars 0 forks source link

sundials build failure with +hip (related to ginkgo) #266

Open balay opened 4 days ago

balay commented 4 days ago

This is using the following for sundials, and with ginkgo@1.8.0 (and hip@6.2.0):

    version("7.2.0", branch="develop")
/scratch/svcpetsc/spack.x/spack-stage/spack-stage-sundials-7.2.0-zly6cpqxy5td4t4kwvkfwgvewhb37evq/spack-src/examples/sunmatrix/ginkgo/test_sunmatrix_ginkgo.cpp:107:76: error: expected ';' at end of declaration
  107 |   auto gko_exec { gko::HipExecutor::create(0, gko::OmpExecutor::create()) }
      |                                                                            ^
      |                                                                            ;

spack-build-out.txt

ref: ./bin/spack install -j64 xsdk@1.1.0+rocm~heffte+phist amdgpu_target=gfx90a

balay commented 4 days ago

BTW: I get similar failure with hip@5.7.1

spack-build-out.txt

ref: /bin/spack install -j64 xsdk@1.1.0+rocm~heffte+phist amdgpu_target=gfx90a ^hip@5.7.1 ^hipfft@5.7.1

also cc: @MarcelKoch

balay commented 4 days ago

For now, using:

diff --git a/var/spack/repos/builtin/packages/xsdk/package.py b/var/spack/repos/builtin/packages/xsdk/package.py
index ee9fd7e90e..ba981ef7d4 100644
--- a/var/spack/repos/builtin/packages/xsdk/package.py
+++ b/var/spack/repos/builtin/packages/xsdk/package.py
@@ -218,7 +218,7 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage):
     xsdk_depends_on("alquimia@1.0.10", when="@0.8.0 +alquimia")

     xsdk_depends_on("sundials +trilinos", when="+trilinos")
-    xsdk_depends_on("sundials +ginkgo", when="+ginkgo @0.8.0:")
+    xsdk_depends_on("sundials +ginkgo", when="+ginkgo @0.8.0: ~rocm")
     xsdk_depends_on("sundials +sycl cxxstd=17", when="@1.0.0: +sycl")
     xsdk_depends_on(
         "sundials@7.2.0~int64+hypre+petsc+superlu-dist",
MarcelKoch commented 1 day ago

@balay this seems to be an error on the sundials side. The following line is missing a ; at the end: https://github.com/LLNL/sundials/blob/4e60ad61ec6492764fb92d2cbd55b35c60fd7760/examples/sunmatrix/ginkgo/test_sunmatrix_ginkgo.cpp#L107.

balay commented 1 day ago

@MarcelKoch thanks for finding the issue! My build goes through with this fix.

Perhaps you might consider creating a PR directly to sundials with this fix. [or @balos1 can hopefully add this in]

MarcelKoch commented 1 day ago

Since this is a 1-line fix, it might be faster if @balos1 just adds this.

balos1 commented 1 day ago

Fix is here: https://github.com/LLNL/sundials/pull/573.