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

petsc+hip failure with superlu_dist #236

Closed balay closed 11 months ago

balay commented 11 months ago
stderr:
In file included from /scratch/balay/spack/opt/spack/linux-ubuntu22.04-zen4/gcc-11.4.0/superlu-dist-8.2.0-r3bbhy5cr5g4b2xqq3slhqf7cy63ei4u/include/gpu_wrapper.h:108,
                 from /scratch/balay/spack/opt/spack/linux-ubuntu22.04-zen4/gcc-11.4.0/superlu-dist-8.2.0-r3bbhy5cr5g4b2xqq3slhqf7cy63ei4u/include/gpu_api_utils.h:26,
                 from /scratch/balay/spack/opt/spack/linux-ubuntu22.04-zen4/gcc-11.4.0/superlu-dist-8.2.0-r3bbhy5cr5g4b2xqq3slhqf7cy63ei4u/include/superlu_defs.h:104,
                 from /scratch/balay/spack/opt/spack/linux-ubuntu22.04-zen4/gcc-11.4.0/superlu-dist-8.2.0-r3bbhy5cr5g4b2xqq3slhqf7cy63ei4u/include/superlu_ddefs.h:37,
                 from /tmp/petsc-xuiyjmih/config.headers/conftest.cc:3:
/scratch/balay/spack/opt/spack/linux-ubuntu22.04-zen4/gcc-11.4.0/hipblas-5.5.1-inaizutkrwbopn5i5pvghmqlmuhj2ahw/include/hipblas.h:16:2: warning: #warning "This file is deprecated. Use the header file from /scratch/balay/spack/opt/spack/linux-ubuntu22.04-zen4/gcc-11.4.0/hipblas-5.5.1-inaizutkr\
wbopn5i5pvghmqlmuhj2ahw/include/hipblas/hipblas.h by using #include <hipblas/hipblas.h>" [-Wcpp]
   16 | #warning "This file is deprecated. Use the header file from /scratch/balay/spack/opt/spack/linux-ubuntu22.04-zen4/gcc-11.4.0/hipblas-5.5.1-inaizutkrwbopn5i5pvghmqlmuhj2ahw/include/hipblas/hipblas.h by using #include <hipblas/hipblas.h>"
      |  ^~~~~~~
Source:
#include "confdefs.h"
#include "conffix.h"
#include <superlu_ddefs.h>

So gpu_wrapper.h needs to use #include <hipblas/hipblas.h> as the warning suggests.

Or better yet - it would be great if the hip includes can be excluded from the superlu-dist public includes

ref: https://github.com/xsdk-project/xsdk-issues/issues/227#issuecomment-1762177418

liuyangzhuan commented 11 months ago

Hi, @balay I've changed it to #include <hipblas/hipblas.h> in the latest commit https://github.com/xiaoyeli/superlu_dist/commit/ed54da1c316e27880085ef4c7093609b5154df92

Can you give it a try again?

xiaoyeli commented 11 months ago

@balay Can you please confirm that this issue is resolved? Thanks.

balay commented 11 months ago

Trying this build with the following change:

diff --git a/var/spack/repos/builtin/packages/xsdk/package.py b/var/spack/repos/builtin/packages/xsdk/package.py
index 102b1fb3b3..98c8efbbc0 100644
--- a/var/spack/repos/builtin/packages/xsdk/package.py
+++ b/var/spack/repos/builtin/packages/xsdk/package.py
@@ -146,7 +146,7 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage):
     )

     xsdk_depends_on("superlu-dist@develop", when="@develop")
-    xsdk_depends_on("superlu-dist@8.2.0", when="@1.0.0")
+    xsdk_depends_on("superlu-dist@8.2.0", when="@1.0.0", cuda_var="cuda", rocm_var="rocm")
     xsdk_depends_on("superlu-dist@8.1.2", when="@0.8.0")
     xsdk_depends_on("superlu-dist@7.1.1", when="@0.7.0")
     xsdk_depends_on(

ref:

balay@petsc-gpu-02:/scratch/balay/spack$ ./bin/spack install -j64 xsdk@1.0.0+rocm amdgpu_target=gfx90a 

PETSc build does go through now - with this change. Thanks!