On Fri, Dec 8, 2023 at 1:54 PM Sreeram R Venkat <srvenkat@utexas.edu> wrote:
I am trying to build PETSc with CUDA using the CUDA-Aware MVAPICH2-GDR. 

Here is my configure command:

./configure PETSC_ARCH=linux-c-debug-mvapich2-gdr --download-hypre  --with-cuda=true --cuda-dir=$TACC_CUDA_DIR --with-hdf5=true --with-hdf5-dir=$TACC_PHDF5_DIR --download-elemental --download-metis --download-parmetis --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90

which errors with:

          UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
---------------------------------------------------------------------------------------------
  CUDA compile failed with arch flags " -ccbin mpic++ -std=c++14 -Xcompiler -fPIC
  -Xcompiler -fvisibility=hidden -g -lineinfo -gencode arch=compute_80,code=sm_80"
  generated from "--with-cuda-arch=80"




The same configure command works when I use the Intel MPI and I can build with CUDA. The full config.log file is attached. Please let me know if you need any other information. I appreciate your help with this.

The proximate error is

Executing: nvcc -c -o /tmp/petsc-kn3f29gl/config.packages.cuda/conftest.o -I/tmp/petsc-kn3f29gl/config.setCompilers -I/tmp/petsc-kn3f29gl/config.types -I/tmp/petsc-kn3f29gl/config.packages.cuda  -ccbin mpic++ -std=c++14 -Xcompiler -fPIC -Xcompiler -fvisibility=hidden -g -lineinfo -gencode arch=compute_80,code=sm_80  /tmp/petsc-kn3f29gl/config.packages.cuda/conftest.cu
stdout:
/opt/apps/cuda/11.4/include/crt/sm_80_rt.hpp(141): error: more than one instance of overloaded function "__nv_associate_access_property_impl" has "C" linkage
1 error detected in the compilation of "/tmp/petsc-kn3f29gl/config.packages.cuda/conftest.cu".
Possible ERROR while running compiler: exit code 1
stderr:
/opt/apps/cuda/11.4/include/crt/sm_80_rt.hpp(141): error: more than one instance of overloaded function "__nv_associate_access_property_impl" has "C" linkage

1 error detected in the compilation of "/tmp/petsc-kn3f29gl/config.packages.cuda
 
This looks like screwed up headers to me, but I will let someone that understands CUDA compilation reply.

  Thanks,

     Matt

Thanks,
Sreeram


--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener