<div dir="ltr"><div dir="ltr">On Tue, Jul 2, 2019 at 9:41 PM Xiangdong via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</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">Hello everyone,<div><br></div><div>When I run the ex19 with cuda like this:</div><div> mpiexec -np 4 ./ex19 -da_refine 5 -snes_view -snes_monitor -ksp_monitor -mat_type aijcusparse -vec_type cuda -log_view</div><div><br></div><div>it worked fine and produced correct results.</div><div><br></div><div>However, when I tried to run this example with nvprof:</div><div>nvprof --profile-child-processes mpiexec -np 4 ./extest -da_refine 5 -snes_view -snes_monitor -ksp_monitor -mat_type aijcusparse -vec_type cuda -log_view<br></div><div><br></div><div>I got errors like:</div><div>[3]PETSC ERROR: Error in external library<br>[3]PETSC ERROR: CUDA error 700<br></div></div></blockquote><div><br></div><div>Looking at Google for this error, it seems that it tends to arise with incompatible drivers. Perhaps your nvprof is</div><div>older/newer than the library PETSc is linked against?</div><div><br></div><div> Matt</div><div> </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>[3]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br>[3]PETSC ERROR: Petsc Release Version 3.11.2, unknown <br>[3]PETSC ERROR: ./ex19 on a arch-opt named new by eps Tue Jul 2 22:26:01 2019<br>[3]PETSC ERROR: Configure options PETSC_ARCH=arch-opt --with-debugging=0 --with-mpi-dir=/home/eps/MyLocal/mpi/mpich --with-blaslapack-dir=/home/eps/MyLocal/intel/mkl --with-cuda-dir=/home/eps/MyLocal/cuda --with-hypre-dir=/home/eps/MyLocal/hypre-2.15.1/hypre-install --download-hdf5=1<br>[3]PETSC ERROR: #1 VecSet_SeqCUDA() line 785 in /home/eps/MyLocal/petsc/src/vec/vec/impls/seq/seqcuda/<a href="http://veccuda2.cu" target="_blank">veccuda2.cu</a><br>[3]PETSC ERROR: #2 VecSet() line 547 in /home/eps/MyLocal/petsc/src/vec/vec/interface/rvector.c<br>[3]PETSC ERROR: #3 VecCreate_MPICUDA() line 178 in /home/eps/MyLocal/petsc/src/vec/vec/impls/mpi/mpicuda/<a href="http://mpicuda.cu" target="_blank">mpicuda.cu</a><br>[3]PETSC ERROR: #4 VecSetType() line 51 in /home/eps/MyLocal/petsc/src/vec/vec/interface/vecreg.c<br>[3]PETSC ERROR: #5 VecCreate_CUDA() line 192 in /home/eps/MyLocal/petsc/src/vec/vec/impls/mpi/mpicuda/<a href="http://mpicuda.cu" target="_blank">mpicuda.cu</a><br>[3]PETSC ERROR: #6 VecSetType() line 51 in /home/eps/MyLocal/petsc/src/vec/vec/interface/vecreg.c<br>[3]PETSC ERROR: #7 MatCreateVecs() line 8996 in /home/eps/MyLocal/petsc/src/mat/interface/matrix.c<br>[3]PETSC ERROR: #8 MatFDColoringCreate() line 482 in /home/eps/MyLocal/petsc/src/mat/matfd/fdmatrix.c<br>[3]PETSC ERROR: #9 SNESComputeJacobian_DMDA() line 175 in /home/eps/MyLocal/petsc/src/snes/utils/dmdasnes.c<br>[3]PETSC ERROR: #10 SNESComputeJacobian() line 2718 in /home/eps/MyLocal/petsc/src/snes/interface/snes.c<br>[3]PETSC ERROR: #11 SNESSolve_NEWTONLS() line 222 in /home/eps/MyLocal/petsc/src/snes/impls/ls/ls.c<br>[3]PETSC ERROR: #12 SNESSolve() line 4560 in /home/eps/MyLocal/petsc/src/snes/interface/snes.c<br>[3]PETSC ERROR: #13 main() line 161 in /home/eps/MyCodes/petsctest/extest.c<br></div><div><br></div><div>The full run log is attached. </div><div><br></div><div>I am using NVIDIA-SMI 418.56 Driver Version: 418.56 CUDA Version: 10.1.</div><div><br></div><div>I do not know why it is okay without nvprof but crashed with nvprof. Any suggestion to fix this?</div><div><br></div><div>Thank you.</div><div><br></div><div>Best,</div><div>Xiangdong</div><br></div>
</blockquote></div><br clear="all"><div><br></div>-- <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>