-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building with cuda gives an error in HYPRE_handle.c.o #1129
Comments
@marcosvanella This seems a compiler issue. To help debugging this problem, would you be able to share:
|
Hi Victor, apologies for the delay. I tried using make also, this is my confmake.sh script:
Again it all goes well up to the first cuda compilation:
|
Hi @marcosvanella, could you share the output of |
Hi Victor, this is what i get for mpiicx:
compiling without CUCC=nvcc gives me this interesting error:
Not clear what clang version it is referring to. Is this the icpx compiler behind mpiicpx? Thank you for taking time with this. |
Thank you! It seems you have an incompatible software stack for cuda and C++ in your machine. I can think of a few options:
I recommend the last option since it will handle all the package dependencies automatically for you. Hope this solves your issue! PS: your GPU card supports compute capability 89 |
Thank you Victor, I will try spack. I have this cuda version installed. I'll also see if I can do an upgrade for it:
I'll let you know. Thanks. |
Hi Victor, I was able to build the application with openmpi compiled with the gnu 10 compilers, given my cuda version. Any version higher than 10 was gicing the first error I posted.
Am I missing linking to the cuda libraries? How would I go about making the examples with gpu offloading? |
@marcosvanella can you try the branch https://github.com/hypre-space/hypre/tree/gpu-examples (PR linked to this issue) and let me know how it goes? |
Hi Victor, I recompiled the gpu-examples branch in the same way as done before. I tried ij cuda test and got this error.
I'm suspecting I still have some library dependency issue or a setting in my computer is not right. I'll dig more on this.
which makes sense as I did not set the unified memory in the build. I'll try that next. An aside question is, we are interfacing with HYPRE PCG+AMG to solve a Poisson equation (setup at the beginning and solution done twice per time step in a low mach LES solver). I noted that by default the residual norm is the C norm (I assume is the discretization matrix norm of r -> ||<C*r,r>|| ), and there is the optin to make this the L2 norm. We would like to have the infinity norm to test against the convergence tolerance, to have exact control cell to cell in our staggered grid solver. How would I go about this? Thanks! |
Hi @marcosvanella, that error should go away after you compile hypre with unified memory support. Let me know if you still have problems. Note the GPU usage in the examples is currently not optimal and we plan to add specific GPU examples with best practices in the future. For example, when assembling matrices on device memory, you should call Regarding C-norm, that refers to the preconditioned norm We don't have the option of using infinity norm in our Krylov solvers, but that's something I can bring up to the team and discuss about adding. Can you share more about your code? Is it open-source? What institution is it linked to? Best! |
Hi Victor, thank you for the information. I added the unified memory flag and the examples compiled. I still have the issue regarding "no kernel found". Must be related to the libraries for cuda/gcc in my laptop. I'm not well versed in the cuda stack. I'll try the spack install next. |
Thanks @marcosvanella, this is an interesting application. Please keep me updated on your efforts to use hypre in FDS. Have you configured hypre with |
Hi Victor I'll try your suggestion. We have added HYPRE PCG_AMG support for one of our Poisson Solvers (A local solver that works by mesh block and single MPI process, tied within a block Jacobi iteration), we are getting our CI workflow prepared to be able to choose between PARDISO and HYPRE as base solvers. Once we have our verification cases up and running with HYPRE and our local solver, we will add HYPRE to our global matrix solver across all MPI processes in a calculation (currently uses CLUSTER_SPARSE_SOLVER from MKL). The plan is to have these options for users in an upcoming release, which will be also of use for ARM Macs users (they can't compile with MKL so we plan to have HYPRE as their option). |
Hi Victor, we are encountering issues when running our debug target of FDS which has been linked to Hypre compiled with -O2 or -O3 flags. This is happening both with openmpi/gnu and impi/icx/ifort.
Something similar is seen in a Linux system when using impi (mpiicx) and -O2 or -O3 flags in the Hypre compilation, but -O0 -g in our code compilation (FDS is fortran BTW):
Note that we don't see any of these errors in our development (-O1) or production (-O2) targets. Do you have an idea about what could be happening? Are we missing some compilation flag in particular for HYPRE? Thanks! |
Hi Victor, I tried this make config flags in my computer to compile hypre with openmp offloading:
The code compiles and installs. Now when I try to make the tests with: I see there is something missing on the link phase for each test:
What could be going on? Thanks! |
It seems that hypre has problems in finding a proper |
I think you are right. LINK_CC points to CUCC which is undefined. Should I set it? |
Yes probably. With device-openmp, we only check these compilers |
Thank you Rui! I'll try it.
…________________________________
From: Rui Peng Li ***@***.***>
Sent: Wednesday, October 23, 2024 01:27 AM
To: hypre-space/hypre ***@***.***>
Cc: marcosvanella ***@***.***>; Mention ***@***.***>
Subject: Re: [hypre-space/hypre] Building with cuda gives an error in HYPRE_handle.c.o (Issue #1129)
I think you are right. LINK_CC points to CUCC which is undefined. Should I set it?
Yes probably. With device-openmp, we only check these compilers mpixlc-gpu mpiclang-gpu mpiicx. Apparently, you don't have any of them. I guess you set CUCC manually.
—
Reply to this email directly, view it on GitHub<#1129 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABY23VNUCH6R6FYQWAWO6W3Z44XU7AVCNFSM6AAAAABOHIMGFSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZQHEZTSMBRGE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi Marcos, is there any specific reason for using the device openmp build of hypre? In general, we recommend |
For the record, the SIGFPE issues we talked above have been solved offline. The solution is to compile hypre with |
Hi Victor, I have HYPRE running for multiple MPI calculations on the FDS Poisson solution. We are planning on modifying the code to offload the solves to GPU. I sent you an email last week on this. Please let me know if you received it. |
Closing this issue as we moved this conversation offline |
Hi, I'm trying to build Hypre with cuda in my linux laptop and get this error both with make and cmake. I'm trying to use the intel mpi libraries. Thank you for your help.
Marcos
$ cmake -DHYPRE_WITH_OPENMP=ON -DHYPRE_WITH_CUDA=ON ..
-- The C compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Enabled support for CXX.
-- Using CXX standard: c++11
-- Looking for a CUDA compiler
-- Looking for a CUDA compiler - /usr/bin/nvcc
-- The CUDA compiler identification is NVIDIA 11.5.119
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Enabled support for CUDA.
-- Using CUDA architecture: 70
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found CUDA: /usr (found version "11.5")
-- Found CUDAToolkit: /usr/include (found version "11.5.119")
-- Found MPI_C: /home/marcosvanella/intel/oneapi/mpi/2021.12/lib/libmpi.so (found version "3.1")
-- Found MPI_CXX: /home/marcosvanella/intel/oneapi/mpi/2021.12/lib/libmpicxx.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/marcosvanella/Documents/Software/hypre/src/cmbuild
(base) marcosvanella@pop-os cmbuild (master) $ make
[ 0%] Building C object CMakeFiles/HYPRE.dir/blas/dasum.c.o
[ 0%] Building C object CMakeFiles/HYPRE.dir/blas/daxpy.c.o
[ 0%] Building C object CMakeFiles/HYPRE.dir/blas/dcopy.c.o
[ 0%] Building C object CMakeFiles/HYPRE.dir/blas/ddot.c.o
[ 0%] Building C object CMakeFiles/HYPRE.dir/blas/dgemm.c.o
[ 0%] Building C object CMakeFiles/HYPRE.dir/blas/dgemv.c.o
[ 1%] Building C object CMakeFiles/HYPRE.dir/blas/dger.c.o
[ 1%] Building C object CMakeFiles/HYPRE.dir/blas/dnrm2.c.o
[ 1%] Building C object CMakeFiles/HYPRE.dir/blas/drot.c.o
[ 1%] Building C object CMakeFiles/HYPRE.dir/blas/dscal.c.o
[ 1%] Building C object CMakeFiles/HYPRE.dir/blas/dswap.c.o
[ 1%] Building C object CMakeFiles/HYPRE.dir/blas/dsymm.c.o
[ 2%] Building C object CMakeFiles/HYPRE.dir/blas/dsymv.c.o
[ 2%] Building C object CMakeFiles/HYPRE.dir/blas/dsyr2.c.o
[ 2%] Building C object CMakeFiles/HYPRE.dir/blas/dsyr2k.c.o
[ 2%] Building C object CMakeFiles/HYPRE.dir/blas/dsyrk.c.o
[ 2%] Building C object CMakeFiles/HYPRE.dir/blas/dtrmm.c.o
[ 2%] Building C object CMakeFiles/HYPRE.dir/blas/dtrmv.c.o
[ 2%] Building C object CMakeFiles/HYPRE.dir/blas/dtrsm.c.o
[ 3%] Building C object CMakeFiles/HYPRE.dir/blas/dtrsv.c.o
[ 3%] Building C object CMakeFiles/HYPRE.dir/blas/f2c.c.o
[ 3%] Building C object CMakeFiles/HYPRE.dir/blas/idamax.c.o
[ 3%] Building C object CMakeFiles/HYPRE.dir/blas/lsame.c.o
[ 3%] Building C object CMakeFiles/HYPRE.dir/blas/xerbla.c.o
[ 3%] Building C object CMakeFiles/HYPRE.dir/lapack/dbdsqr.c.o
[ 4%] Building C object CMakeFiles/HYPRE.dir/lapack/dgebd2.c.o
[ 4%] Building C object CMakeFiles/HYPRE.dir/lapack/dgebrd.c.o
[ 4%] Building C object CMakeFiles/HYPRE.dir/lapack/dgelq2.c.o
[ 4%] Building C object CMakeFiles/HYPRE.dir/lapack/dgelqf.c.o
[ 4%] Building C object CMakeFiles/HYPRE.dir/lapack/dgels.c.o
[ 4%] Building C object CMakeFiles/HYPRE.dir/lapack/dgeqr2.c.o
[ 5%] Building C object CMakeFiles/HYPRE.dir/lapack/dgeqrf.c.o
[ 5%] Building C object CMakeFiles/HYPRE.dir/lapack/dgesvd.c.o
[ 5%] Building C object CMakeFiles/HYPRE.dir/lapack/dgetrf.c.o
[ 5%] Building C object CMakeFiles/HYPRE.dir/lapack/dgetri.c.o
[ 5%] Building C object CMakeFiles/HYPRE.dir/lapack/dgetrs.c.o
[ 5%] Building C object CMakeFiles/HYPRE.dir/lapack/dgetf2.c.o
[ 5%] Building C object CMakeFiles/HYPRE.dir/lapack/dlabad.c.o
[ 6%] Building C object CMakeFiles/HYPRE.dir/lapack/dlabrd.c.o
[ 6%] Building C object CMakeFiles/HYPRE.dir/lapack/dlacpy.c.o
[ 6%] Building C object CMakeFiles/HYPRE.dir/lapack/dlae2.c.o
[ 6%] Building C object CMakeFiles/HYPRE.dir/lapack/dlaev2.c.o
[ 6%] Building C object CMakeFiles/HYPRE.dir/lapack/dlamch.c.o
[ 6%] Building C object CMakeFiles/HYPRE.dir/lapack/dlange.c.o
[ 7%] Building C object CMakeFiles/HYPRE.dir/lapack/dlanst.c.o
[ 7%] Building C object CMakeFiles/HYPRE.dir/lapack/dlansy.c.o
[ 7%] Building C object CMakeFiles/HYPRE.dir/lapack/dlapy2.c.o
[ 7%] Building C object CMakeFiles/HYPRE.dir/lapack/dlarfb.c.o
[ 7%] Building C object CMakeFiles/HYPRE.dir/lapack/dlarf.c.o
[ 7%] Building C object CMakeFiles/HYPRE.dir/lapack/dlarfg.c.o
[ 8%] Building C object CMakeFiles/HYPRE.dir/lapack/dlarft.c.o
[ 8%] Building C object CMakeFiles/HYPRE.dir/lapack/dlartg.c.o
[ 8%] Building C object CMakeFiles/HYPRE.dir/lapack/dlas2.c.o
[ 8%] Building C object CMakeFiles/HYPRE.dir/lapack/dlascl.c.o
[ 8%] Building C object CMakeFiles/HYPRE.dir/lapack/dlaset.c.o
[ 8%] Building C object CMakeFiles/HYPRE.dir/lapack/dlasq1.c.o
[ 8%] Building C object CMakeFiles/HYPRE.dir/lapack/dlasq2.c.o
[ 9%] Building C object CMakeFiles/HYPRE.dir/lapack/dlasq3.c.o
[ 9%] Building C object CMakeFiles/HYPRE.dir/lapack/dlasq4.c.o
[ 9%] Building C object CMakeFiles/HYPRE.dir/lapack/dlasq5.c.o
[ 9%] Building C object CMakeFiles/HYPRE.dir/lapack/dlasq6.c.o
[ 9%] Building C object CMakeFiles/HYPRE.dir/lapack/dlasr.c.o
[ 9%] Building C object CMakeFiles/HYPRE.dir/lapack/dlasrt.c.o
[ 10%] Building C object CMakeFiles/HYPRE.dir/lapack/dlassq.c.o
[ 10%] Building C object CMakeFiles/HYPRE.dir/lapack/dlaswp.c.o
[ 10%] Building C object CMakeFiles/HYPRE.dir/lapack/dlasv2.c.o
[ 10%] Building C object CMakeFiles/HYPRE.dir/lapack/dlatrd.c.o
[ 10%] Building C object CMakeFiles/HYPRE.dir/lapack/dorg2l.c.o
[ 10%] Building C object CMakeFiles/HYPRE.dir/lapack/dorg2r.c.o
[ 11%] Building C object CMakeFiles/HYPRE.dir/lapack/dorgbr.c.o
[ 11%] Building C object CMakeFiles/HYPRE.dir/lapack/dorgl2.c.o
[ 11%] Building C object CMakeFiles/HYPRE.dir/lapack/dorglq.c.o
[ 11%] Building C object CMakeFiles/HYPRE.dir/lapack/dorgql.c.o
[ 11%] Building C object CMakeFiles/HYPRE.dir/lapack/dorgqr.c.o
[ 11%] Building C object CMakeFiles/HYPRE.dir/lapack/dorgtr.c.o
[ 11%] Building C object CMakeFiles/HYPRE.dir/lapack/dorm2r.c.o
[ 12%] Building C object CMakeFiles/HYPRE.dir/lapack/dormbr.c.o
[ 12%] Building C object CMakeFiles/HYPRE.dir/lapack/dorml2.c.o
[ 12%] Building C object CMakeFiles/HYPRE.dir/lapack/dormlq.c.o
[ 12%] Building C object CMakeFiles/HYPRE.dir/lapack/dormqr.c.o
[ 12%] Building C object CMakeFiles/HYPRE.dir/lapack/dpotf2.c.o
[ 12%] Building C object CMakeFiles/HYPRE.dir/lapack/dpotrf.c.o
[ 13%] Building C object CMakeFiles/HYPRE.dir/lapack/dpotrs.c.o
[ 13%] Building C object CMakeFiles/HYPRE.dir/lapack/dsteqr.c.o
[ 13%] Building C object CMakeFiles/HYPRE.dir/lapack/dsterf.c.o
[ 13%] Building C object CMakeFiles/HYPRE.dir/lapack/dsyev.c.o
[ 13%] Building C object CMakeFiles/HYPRE.dir/lapack/dsygs2.c.o
[ 13%] Building C object CMakeFiles/HYPRE.dir/lapack/dsygst.c.o
[ 14%] Building C object CMakeFiles/HYPRE.dir/lapack/dsygv.c.o
[ 14%] Building C object CMakeFiles/HYPRE.dir/lapack/dsytd2.c.o
[ 14%] Building C object CMakeFiles/HYPRE.dir/lapack/dsytrd.c.o
[ 14%] Building C object CMakeFiles/HYPRE.dir/lapack/dtrti2.c.o
[ 14%] Building C object CMakeFiles/HYPRE.dir/lapack/dtrtri.c.o
[ 14%] Building C object CMakeFiles/HYPRE.dir/lapack/ieeeck.c.o
[ 14%] Building C object CMakeFiles/HYPRE.dir/lapack/ilaenv.c.o
[ 15%] Building C object CMakeFiles/HYPRE.dir/lapack/lsame.c.o
[ 15%] Building C object CMakeFiles/HYPRE.dir/lapack/xerbla.c.o
[ 15%] Building CUDA object CMakeFiles/HYPRE.dir/utilities/HYPRE_handle.c.o
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
435 | function(_Functor&& __f)
| ^
/usr/include/c++/11/bits/std_function.h:435:145: note: ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
530 | operator=(_Functor&& __f)
| ^
/usr/include/c++/11/bits/std_function.h:530:146: note: ‘_ArgTypes’
make[2]: *** [CMakeFiles/HYPRE.dir/build.make:1434: CMakeFiles/HYPRE.dir/utilities/HYPRE_handle.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:457: CMakeFiles/HYPRE.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
The text was updated successfully, but these errors were encountered: