<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#000000">When you have two matrices, I think you should create two separate communicators, i.e., two superlu grids, </div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#000000">Sherry Li</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 21, 2021 at 6:08 AM Deij-van Rijswijk, Menno <<a href="mailto:M.Deij@marin.nl">M.Deij@marin.nl</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 lang="EN-GB">
<p></p>
<div class="gmail-m_7570426752607845448WordSection1">
<p class="MsoNormal"><span lang="EN-US">Good afternoon,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">In our code we're using two matrices that are preconditioned using SUPERLU_dist. Upon freeing the second matrix with MatDestroy, the program segfaults with the following stacktrace (see below). This happens with PETSc
versions 3.14.5 and 3.15.0, whereas version 3.11.2 does not have this problem. In the code src\mat\impls\aij\mpi\superlu_dist\superlu_dist.c I see that Petsc_Superlu_dist_keyval_Delete_Fn has been added between 3.11.2 and 3.14.5, and the comment reads that
it allows reusing the communicator when only a single matrix is used at the time. I'm wondering if using multiple matrices with SUPERLU_dist is problematic here?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Note: this is happening on single process and on multiple MPI processes.
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Best regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Menno Deij - van Rijswijk<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">#0 0x000015554ffc7db4 in ompi_comm_free () from /home/mdeij/install-gnu/extLibs/lib/libmpi.so.40<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">#1 0x0000155550021536 in PMPI_Comm_free () from /home/mdeij/install-gnu/extLibs/lib/libmpi.so.40<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">#2 0x00001555534262ba in superlu_gridexit (grid=0x3689da0)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas"> at /home/mdeij/install-gnu/extLibs/Linux-x86_64-Intel/superlu_dist-6.3.0/SRC/superlu_grid.c:174<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">#3 0x0000155553df094b in Petsc_Superlu_dist_keyval_Delete_Fn (comm=0x26a4e50, keyval=16, attr_val=0x3689d90,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas"> extra_state=0x0)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas"> at /home/mdeij/build-libs-gnu/superbuild/petsc/src/src/mat/impls/aij/mpi/superlu_dist/superlu_dist.c:97<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">#4 0x000015554ffc145c in ompi_attr_delete_impl () from /home/mdeij/install-gnu/extLibs/lib/libmpi.so.40<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">#5 0x000015554ffc3fdf in ompi_attr_delete_all () from /home/mdeij/install-gnu/extLibs/lib/libmpi.so.40<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">#6 0x000015554ffc7ca7 in ompi_comm_free () from /home/mdeij/install-gnu/extLibs/lib/libmpi.so.40<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">#7 0x0000155550021536 in PMPI_Comm_free () from /home/mdeij/install-gnu/extLibs/lib/libmpi.so.40<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">#8 0x00001555538f31c5 in PetscCommDestroy (comm=0x29712e0)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas"> at /home/mdeij/build-libs-gnu/superbuild/petsc/src/src/sys/objects/tagm.c:217<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">#9 0x00001555538f55ab in PetscHeaderDestroy_Private (h=0x29712a0)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas"> at /home/mdeij/build-libs-gnu/superbuild/petsc/src/src/sys/objects/inherit.c:121<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">#10 0x0000155553b44626 in MatDestroy (A=0x26e1c98)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas"> at /home/mdeij/build-libs-gnu/superbuild/petsc/src/src/mat/interface/matrix.c:1310<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">#11 0x0000155553b87a86 in matdestroy_ (x=0x26e1c98, ierr=0x7fffffffc9cc)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas"><u></u> <u></u></span></p>
</div>
<br>
<font style="font-family:Verdana;font-size:8pt;color:rgb(125,125,125);font-weight:bold">dr. ir.</font><font style="font-family:Verdana;font-size:8pt;color:rgb(125,125,125);font-weight:bold">
</font><font style="font-family:Verdana;font-size:8pt;color:rgb(125,125,125);font-weight:bold">Menno A.</font><font style="font-family:Verdana;font-size:8pt;color:rgb(125,125,125);font-weight:bold">
</font><font style="font-family:Verdana;font-size:8pt;color:rgb(125,125,125);font-weight:bold">Deij-van Rijswijk</font><font size="3" face="Segoe UI"></font><font style="font-family:Verdana;font-size:8pt;color:rgb(125,125,125);font-weight:bold"> |
</font><font style="font-family:Verdana;font-size:8pt;color:rgb(125,125,125);font-weight:bold">Researcher</font><font style="font-family:Verdana;font-size:8pt;color:rgb(125,125,125);font-weight:bold"> |
</font><font style="font-family:Verdana;font-size:8pt;color:rgb(125,125,125);font-weight:bold">Research & Development</font><br>
<font style="font-family:Verdana;font-size:9pt;color:rgb(125,125,125);font-weight:bold">MARIN</font><font style="font-family:Verdana;font-size:8pt;color:rgb(125,125,125)"> | T
</font><font style="font-family:Verdana;font-size:8pt;color:rgb(125,125,125)">+31 317 49 35 06</font><font color="#7d7d7d" size="2" face="Segoe UI"></font><font style="font-family:Verdana;font-size:8pt"> |
</font><span style="font-family:Verdana;font-size:8pt"><a href="mailto:M.Deij@marin.nl" title="" style="font-family:Verdana;font-size:8pt" target="_blank"><span style="font-family:Verdana;font-size:8pt">M.Deij@marin.nl</span></a></span><font color="#7d7d7d" size="2" face="Segoe UI"></font><font style="font-family:Verdana;font-size:8pt"> |
</font><span style="font-family:Verdana;font-size:8pt"><a href="http://www.marin.nl" title="" style="font-family:Verdana;font-size:8pt" target="_blank"><span style="font-family:Verdana;font-size:8pt">www.marin.nl</span></a></span><br>
<br>
<a href="https://www.linkedin.com/company/marin" target="_blank"><img width="16" height="16" style="border: 0px solid;" src="cid:178f4f17e8938c963f1" alt="LinkedIn"></a> <a href="http://www.youtube.com/marinmultimedia" target="_blank"><img width="16" height="16" style="border: 0px solid;" src="cid:178f4f17e8922d5eb352" alt="YouTube"></a> <a href="https://twitter.com/MARIN_nieuws" target="_blank"><img width="16" height="16" style="border: 0px solid;" src="cid:178f4f17e8aaa1e45c73" alt="Twitter"></a> <a href="https://www.facebook.com/marin.wageningen" target="_blank"><img width="16" height="16" style="border: 0px solid;" src="cid:178f4f17e8ab5f5c884" alt="Facebook"></a><br>
<font style="font-family:Verdana;font-size:8pt" color="#7d7d7d" size="2" face="Verdana">MARIN news:
<a href="https://www.marin.nl/news/iwsa-open-letter-release-for-shipping-decarbonisation" title="" target="_blank">
IWSA Open letter release for shipping decarbonisation</a></font>
<p></p>
<p id="gmail-m_7570426752607845448undefined"></p>
<p><u></u></p>
<u></u><u></u><u></u>
</div>
</blockquote></div>