<div dir="ltr"><div dir="ltr">On Fri, Dec 8, 2023 at 1:54 PM Sreeram R Venkat <<a href="mailto:srvenkat@utexas.edu">srvenkat@utexas.edu</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr" class="gmail_signature"><div dir="ltr"><div style="color:rgb(34,34,34)">I am trying to build PETSc with CUDA using the CUDA-Aware MVAPICH2-GDR. </div><div style="color:rgb(34,34,34)"><br></div><div style="color:rgb(34,34,34)">Here is my configure command:</div><div style="color:rgb(34,34,34)"><br></div><div style="color:rgb(34,34,34)"><font face="monospace">./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</font><br></div><div style="color:rgb(34,34,34)"><br></div><div style="color:rgb(34,34,34)">which errors with:</div><div style="color:rgb(34,34,34)"><br></div><div style="color:rgb(34,34,34)"><font face="monospace"> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):<br>---------------------------------------------------------------------------------------------<br> CUDA compile failed with arch flags " -ccbin mpic++ -std=c++14 -Xcompiler -fPIC <br> -Xcompiler -fvisibility=hidden -g -lineinfo -gencode arch=compute_80,code=sm_80"<br> generated from "--with-cuda-arch=80"</font><br></div><div style="color:rgb(34,34,34)"><font face="monospace"><br></font></div><div style="color:rgb(34,34,34)"><br></div><div style="color:rgb(34,34,34)"><span style="font-family:arial,sans-serif"><br></span></div><div style="color:rgb(34,34,34)"><span style="font-family:arial,sans-serif">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.</span></div></div></div></div></blockquote><div><br></div><div>The proximate error is</div><div><br></div><div>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/<a href="http://conftest.cu">conftest.cu</a><br>stdout:<br>/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<br>1 error detected in the compilation of "/tmp/petsc-kn3f29gl/config.packages.cuda/<a href="http://conftest.cu">conftest.cu</a>".<br>Possible ERROR while running compiler: exit code 1<br>stderr:<br>/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<br><br>1 error detected in the compilation of "/tmp/petsc-kn3f29gl/config.packages.cuda<br></div><div> </div><div>This looks like screwed up headers to me, but I will let someone that understands CUDA compilation reply.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr" class="gmail_signature"><div dir="ltr"><div style="color:rgb(34,34,34)"><span style="font-family:arial,sans-serif">Thanks,</span></div><div style="color:rgb(34,34,34)"><span style="font-family:arial,sans-serif">Sreeram</span></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>