<div dir="ltr">You may need to set some env variables. This can be system specific so you might want to look at docs or ask TACC how to run with GPU-aware MPI.<div><br></div><div>Mark</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 8, 2023 at 5:17 PM Sreeram R Venkat <<a href="mailto:srvenkat@utexas.edu">srvenkat@utexas.edu</a>> wrote:<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">Actually, when I compile my program with this build of PETSc and run, I still get the error:<div><br></div><div><font face="monospace">PETSC ERROR: PETSc is configured with GPU support, but your MPI is not GPU-aware. For better performance, please use a GPU-aware MPI.</font><br></div><div><font face="monospace"><br></font></div><div>I have the mvapich2-gdr module loaded and MV2_USE_CUDA=1.</div><div><br></div><div>Is there anything else I need to do?</div><div><br></div><div>Thanks,</div><div>Sreeram</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 8, 2023 at 3:29 PM Sreeram R Venkat <<a href="mailto:srvenkat@utexas.edu" target="_blank">srvenkat@utexas.edu</a>> wrote:<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">Thank you, changing to CUDA 11.4 fixed the issue. The mvapich2-gdr module didn't require CUDA 11.4 as a dependency, so I was using 12.0</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 8, 2023 at 1:15 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Executing: mpicc -show<br>
stdout: icc -I/opt/apps/cuda/11.4/include -I/opt/apps/cuda/11.4/include -lcuda -L/opt/apps/cuda/11.4/lib64/stubs -L/opt/apps/cuda/11.4/lib64 -lcudart -lrt -Wl,-rpath,/opt/apps/cuda/11.4/lib64 -Wl,-rpath,XORIGIN/placeholder -Wl,--build-id -L/opt/apps/cuda/11.4/lib64/ -lm -I/opt/apps/intel19/mvapich2-gdr/2.3.7/include -L/opt/apps/intel19/mvapich2-gdr/2.3.7/lib64 -Wl,-rpath -Wl,/opt/apps/intel19/mvapich2-gdr/2.3.7/lib64 -Wl,--enable-new-dtags -lmpi<br>
<br>
Checking for program /opt/apps/cuda/12.0/bin/nvcc...found<br>
<br>
Looks like you are trying to mix in 2 different cuda versions in this build.<br>
<br>
Perhaps you need to use cuda-11.4 - with this install of mvapich..<br>
<br>
Satish<br>
<br>
On Fri, 8 Dec 2023, Matthew Knepley wrote:<br>
<br>
> On Fri, Dec 8, 2023 at 1:54 PM Sreeram R Venkat <<a href="mailto:srvenkat@utexas.edu" target="_blank">srvenkat@utexas.edu</a>> wrote:<br>
> <br>
> > I am trying to build PETSc with CUDA using the CUDA-Aware MVAPICH2-GDR.<br>
> ><br>
> > Here is my configure command:<br>
> ><br>
> > ./configure PETSC_ARCH=linux-c-debug-mvapich2-gdr --download-hypre<br>
> > --with-cuda=true --cuda-dir=$TACC_CUDA_DIR --with-hdf5=true<br>
> > --with-hdf5-dir=$TACC_PHDF5_DIR --download-elemental --download-metis<br>
> > --download-parmetis --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90<br>
> ><br>
> > which errors with:<br>
> ><br>
> > UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for<br>
> > details):<br>
> ><br>
> > ---------------------------------------------------------------------------------------------<br>
> > CUDA compile failed with arch flags " -ccbin mpic++ -std=c++14<br>
> > -Xcompiler -fPIC<br>
> > -Xcompiler -fvisibility=hidden -g -lineinfo -gencode<br>
> > arch=compute_80,code=sm_80"<br>
> > generated from "--with-cuda-arch=80"<br>
> ><br>
> ><br>
> ><br>
> > The same configure command works when I use the Intel MPI and I can build<br>
> > with CUDA. The full config.log file is attached. Please let me know if you<br>
> > need any other information. I appreciate your help with this.<br>
> ><br>
> <br>
> The proximate error is<br>
> <br>
> Executing: nvcc -c -o /tmp/petsc-kn3f29gl/config.packages.cuda/conftest.o<br>
> -I/tmp/petsc-kn3f29gl/config.setCompilers<br>
> -I/tmp/petsc-kn3f29gl/config.types<br>
> -I/tmp/petsc-kn3f29gl/config.packages.cuda -ccbin mpic++ -std=c++14<br>
> -Xcompiler -fPIC -Xcompiler -fvisibility=hidden -g -lineinfo -gencode<br>
> arch=compute_80,code=sm_80 /tmp/petsc-kn3f29gl/config.packages.cuda/<br>
> <a href="http://conftest.cu" rel="noreferrer" target="_blank">conftest.cu</a><br>
> stdout:<br>
> /opt/apps/cuda/11.4/include/crt/sm_80_rt.hpp(141): error: more than one<br>
> instance of overloaded function "__nv_associate_access_property_impl" has<br>
> "C" linkage<br>
> 1 error detected in the compilation of<br>
> "/tmp/petsc-kn3f29gl/config.packages.cuda/<a href="http://conftest.cu" rel="noreferrer" target="_blank">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<br>
> instance of overloaded function "__nv_associate_access_property_impl" has<br>
> "C" linkage<br>
> <br>
> 1 error detected in the compilation of<br>
> "/tmp/petsc-kn3f29gl/config.packages.cuda<br>
> <br>
> This looks like screwed up headers to me, but I will let someone that<br>
> understands CUDA compilation reply.<br>
> <br>
> Thanks,<br>
> <br>
> Matt<br>
> <br>
> Thanks,<br>
> > Sreeram<br>
> ><br>
> <br>
> <br>
> </blockquote></div>
</blockquote></div>
</blockquote></div>