<div dir="auto">You don't need unified memory for boomeramg to work. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 14, 2022, 18:55 Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br></div>  So the PETSc test all run, including the test that uses a GPU.<div><br></div><div>  The hypre test is failing. It is impossible to tell from the output why. </div><div><br></div><div>  You can run it manually, cd src/snes/tutorials</div><div><br></div><div>make ex19</div><div>mpiexec -n 1 ./ex19 -dm_vec_type cuda -dm_mat_type aijcusparse -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre -info > somefile</div><div><br></div><div>then take a look at the output in somefile and send it to us. </div><div><br></div><div>  Barry</div><div><br></div><div><br><div><br><blockquote type="cite"><div>On Jul 14, 2022, at 12:32 PM, Juan Pablo de Lima Costa Salazar via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank" rel="noreferrer">petsc-users@mcs.anl.gov</a>> wrote:</div><br><div><div style="word-wrap:break-word;line-break:after-white-space">Hello,<div><br></div><div>I was hoping to get help regarding a runtime error I am encountering <span>on a cluster node with 4 Tesla K40m GPUs</span> after configuring PETSc with the following command:</div><div><br></div><div>$./configure --force \</div><div>                  --with-precision=double  \</div><div>                  --with-debugging=0 \</div><div>                  --COPTFLAGS=-O3 \</div><div>                  --CXXOPTFLAGS=-O3 \</div><div>                  --FOPTFLAGS=-O3 \</div><div>                  PETSC_ARCH=linux64GccDPInt32-spack \</div><div>                  --download-fblaslapack \</div><div>                  --download-openblas \</div><div>                  --download-hypre \</div><div>                  --download-hypre-configure-arguments=--enable-unified-memory \</div><div>                  --with-mpi-dir=/opt/ohpc/pub/mpi/openmpi4-gnu9/4.0.4 \</div><div>                  --with-cuda=1 \</div><div>                  --download-suitesparse \</div><div>                  --download-dir=downloads \</div><div>                  --with-cudac=/opt/ohpc/admin/spack/0.15.0/opt/spack/linux-centos8-ivybridge/gcc-9.3.0/cuda-11.7.0-hel25vgwc7fixnvfl5ipvnh34fnskw3m/bin/nvcc \</div><div>                  --with-packages-download-dir=downloads \</div><div>                  --download-sowing=downloads/v1.1.26-p4.tar.gz \</div><div>                  --with-cuda-arch=35</div><br><div>When I run</div><div><br></div><div>$ make PETSC_DIR=/home/juan/OpenFOAM/juan-v2206/petsc-cuda PETSC_ARCH=linux64GccDPInt32-spack check</div><div>Running check examples to verify correct installation<br>Using PETSC_DIR=/home/juan/OpenFOAM/juan-v2206/petsc-cuda and PETSC_ARCH=linux64GccDPInt32-spack<br>C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process<br>C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes<br>3,5c3,15<br><   1 SNES Function norm 4.12227e-06 <br><   2 SNES Function norm 6.098e-11 <br>< Number of SNES iterations = 2<br>---<br>> CUDA ERROR (code = 101, invalid device ordinal) at memory.c:139<br>> CUDA ERROR (code = 101, invalid device ordinal) at memory.c:139<br>> --------------------------------------------------------------------------<br>> Primary job  terminated normally, but 1 process returned<br>> a non-zero exit code. Per user-direction, the job has been aborted.<br>> --------------------------------------------------------------------------<br>> --------------------------------------------------------------------------<br>> mpiexec detected that one or more processes exited with non-zero status, thus causing<br>> the job to be terminated. The first process to do so was:<br>> <br>>   Process name: [[52712,1],0]<br>>   Exit code:    1<br>> --------------------------------------------------------------------------<br>/home/juan/OpenFOAM/juan-v2206/petsc-cuda/src/snes/tutorials<br>Possible problem with ex19 running with hypre, diffs above<br>=========================================<br>C/C++ example src/snes/tutorials/ex19 run successfully with cuda<br>C/C++ example src/snes/tutorials/ex19 run successfully with suitesparse<br>Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process<br>Completed test examples<br><br></div><div>I have compiled the code on the head node (without GPUs) and on the compute node where there are 4 GPUs. </div><div><br></div><div><font><span>$nvidia-debugdump -l<br>Found 4 NVIDIA devices<br><span style="white-space:pre-wrap">   </span>Device ID:              0<br><span style="white-space:pre-wrap">     </span>Device name:            Tesla K40m<br><span style="white-space:pre-wrap">     </span>GPU internal ID:        0320717032250<br><br><span style="white-space:pre-wrap">  </span>Device ID:              1<br><span style="white-space:pre-wrap">     </span>Device name:            Tesla K40m<br><span style="white-space:pre-wrap">     </span>GPU internal ID:        0320717031968<br><br><span style="white-space:pre-wrap">  </span>Device ID:              2<br><span style="white-space:pre-wrap">     </span>Device name:            Tesla K40m<br><span style="white-space:pre-wrap">     </span>GPU internal ID:        0320717032246<br><br><span style="white-space:pre-wrap">  </span>Device ID:              3<br><span style="white-space:pre-wrap">     </span>Device name:            Tesla K40m<br><span style="white-space:pre-wrap">     </span>GPU internal ID:        0320717032235</span></font></div><div><font><span><br></span></font></div><div><font><span>Attached are the log files form configure and make.</span></font></div><div><font><span><br></span></font></div><div><font>Any pointers are highly appreciated. My intention is to use PETSc as a linear solver for OpenFOAM, leveraging the availability of GPUs at the same time. Currently I can run PETSc without GPU support. </font></div><div><font><br></font></div><div><font>Cheers,</font></div><div><font>Juan S.</font></div><div><font><br></font></div><div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div></div><div><font><br></font></div><div><br></div><div><br></div><div><br></div></div><span id="m_-5781595029270269969cid:8DC2CCDC-0FE5-4765-B588-199A913130BF"><configure.log.tar.gz></span><span id="m_-5781595029270269969cid:C86A7C79-FFAD-45ED-A9DE-4F61EEC7B01F"><make.log.tar.gz></span></div></blockquote></div><br></div></div></blockquote></div>