<div dir="ltr"><div dir="ltr"><br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 5, 2024 at 4:40 AM Edoardo Centofanti <<a href="mailto:edoardo.centofanti01@universitadipavia.it">edoardo.centofanti01@universitadipavia.it</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">Dear all,<div><br></div><div>I have a code running both on GPU and CPU. This code has both cuda kernels and calls to PETSc KSP and related PC. In particular, I am trying to perform tests with Hypre BoomerAMG both on CPU and GPU. In order to do that, on CPU I am running the code with -mat_type mpiaij and -vec_type mpi, while on GPU I am using respectively aijcusparse and cuda.</div><div><br></div><div>The configuration ran for PETSc (version is 3.20) is</div>
<div><span style="font-family:"Helvetica Neue";font-size:13px">./configure PETSC_ARCH=arch-linux-cuda --with-cuda --download-mumps --download-hypre --with-debugging=0 --download-scalapack --download-parmetis --download-metis --download-fblaslapack=1 --download-mpich --download-make --download-cmake</span></div><div><br></div><div>My problem is that when I try to run my code on GPU it works well, while on CPU with mat_type mpiaij and -vec_type mpi it works regularly until the call to Hypre, then freezes (I have to kill it myself), while with GAMG it works on CPU with the same configuration (and the same code, just PC is changed). </div></div></blockquote><div>Probably because if hypre is configured with GPU support, even petsc is running on CPU (with -mat_type mpiaij and -vec_type mpi), hypre is still trying to run on GPU, causing the hanging problem. The petsc/hypre interface is not able to support both CPU/GPU with the same build. </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>On another machine running PETSc version 3.17 everything worked smoothly with the same code and the same configuration, also on Hypre. </div></div></blockquote><div>I guess with petsc-3.17, you also used a different hypre version (downloaded by petsc). </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>Do you have any insights on what is happening?</div><div><br></div><div>Best regards,</div><div>Edoardo </div><div> <br></div></div>
</blockquote></div></div>