<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dear Barry,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks for your suggestions. I just tested it. I still get the same error. I attached it below:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
[1]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
<div>[1]PETSC ERROR: Object is in wrong state</div>
<div>[1]PETSC ERROR: Matrix is missing diagonal entry in the zeroed row 24214</div>
<div>[1]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.</div>
<div>[1]PETSC ERROR: Petsc Release Version 3.9.1, Apr, 29, 2018 </div>
<div>[1]PETSC ERROR: ./re100 on a named kdp-MS-7850 by kdp Wed Jul 29 11:26:57 2020</div>
<div>[1]PETSC ERROR: Configure options --prefix=/home/kdp/petsc --debugging=0 --with-mpi-dir=/home/kdp/mpich --download-fblaslapack --download-metis --download-parmetis --download-hypre=/home/kdp/hypre-2.14.0.tar.gz --download-superlu_dist</div>
<div>[1]PETSC ERROR: #1 MatZeroRows_SeqAIJ() line 1819 in /home/kdp/petsc-3.9.1/src/mat/impls/aij/seq/aij.c</div>
<div>[1]PETSC ERROR: #2 MatZeroRows() line 5710 in /home/kdp/petsc-3.9.1/src/mat/interface/matrix.c</div>
<div>[1]PETSC ERROR: #3 MatZeroRows_MPIAIJ() line 797 in /home/kdp/petsc-3.9.1/src/mat/impls/aij/mpi/mpiaij.c</div>
<div>[1]PETSC ERROR: #4 MatZeroRows() line 5710 in /home/kdp/petsc-3.9.1/src/mat/interface/matrix.c</div>
<br>
It still report missing diagonal entry. However I have epxlicitly assign 0.0 to the diagonal element of the system matrix and solve it in sequential mode without error. Where could possibly my wrong set up be?
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Best<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Barry Smith <bsmith@petsc.dev><br>
<b>Sent:</b> Wednesday, July 29, 2020 10:49 AM<br>
<b>To:</b> Bin Liu <lbllm2018@hotmail.com><br>
<b>Cc:</b> petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov><br>
<b>Subject:</b> Re: [petsc-users] solving saddle point problem in distributed memory</font>
<div> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<div class=""><br class="">
</div>
No, PETSc direct solvers do not work in parallel. Only SuperLU_DIST, MUMPS, and PasTix.
<div class=""><br class="">
</div>
<div class=""> -pc_type lu (or cholesky depending on the package) -pc_factor_mat_solver_type superlu_dist or mumps or pastix </div>
<div class=""><br class="">
</div>
<div class=""> to run the direct solver in parallel. </div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Jul 28, 2020, at 9:01 PM, Bin Liu <<a href="mailto:lbllm2018@hotmail.com" class="">lbllm2018@hotmail.com</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)" class="">
<div class="" lang="EN-SG">
<div class="x_WordSection1">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span class="" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">Dear Barry,</span></p>
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span class="" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span class="" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">Thanks for your explanation. Does it mean the default director solver LU in PETSc can also run in the distributed memory mode? I only used iterative solvers with preconditioners
in distributed memory before. My experience in using director solver in parallel is indeed limited, especially the saddle point problem in parallel. I have done some search online, but I did not find a working set up at this moment. Could you give a sample
setup of the direct solver for parallel run? It is really appreciated. </span></p>
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<a name="x__MailEndCompose" class=""><span class="" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></a></p>
<div class="">
<div class="" style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<b class=""><span class="" style="font-size:11.0pt; font-family:"Calibri",sans-serif" lang="EN-US">From:</span></b><span class="" style="font-size:11.0pt; font-family:"Calibri",sans-serif" lang="EN-US"> Barry Smith [<a href="mailto:bsmith@petsc.dev" class="">mailto:bsmith@petsc.dev</a>]
<br class="">
<b class="">Sent:</b> Wednesday, 29 July 2020 9:48 AM<br class="">
<b class="">To:</b> Bin Liu <<a href="mailto:lbllm2018@hotmail.com" class="">lbllm2018@hotmail.com</a>><br class="">
<b class="">Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" class="">petsc-users@mcs.anl.gov</a><br class="">
<b class="">Subject:</b> Re: [petsc-users] solving saddle point problem in distributed memory</span></p>
</div>
</div>
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
</p>
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
</p>
</div>
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
SuperLU_DIST won't "magically" run on saddle point problems. It only does limited pivoting, realistically a parallel LU cannot always do complete pivoting or it becomes a sequential algorithm. For parallel you need to use PCFIELDSPLIT, for sequential you
can use SuperLU (not SuperLU_DIST) since it can do more pivoting, being a sequential algorithm.</p>
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
</p>
</div>
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
Barry</p>
</div>
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
</p>
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<br class="">
<br class="">
</p>
<blockquote class="" style="margin-top:5.0pt; margin-bottom:5.0pt">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
On Jul 28, 2020, at 7:59 PM, Bin Liu <<a href="mailto:lbllm2018@hotmail.com" class="">lbllm2018@hotmail.com</a>> wrote:</p>
</div>
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
</p>
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span class="" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">Thanks for your tutorials. Yes. I tried PCFIELDSPLIT. However, it only works for sequential runs. When I run the code in distributed memory, it reports errors. In fact,
the essence of my wonder is (a) how to set up superlu_dist in petsc for solving saddle point problem in distributed memory? (b) does the direct solvers in petsc can run in distributed memory for solving saddle point problem?</span></p>
</div>
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span class="" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
</div>
<div class="">
<div class="" style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<b class=""><span class="" style="font-size:11.0pt; font-family:"Calibri",sans-serif" lang="EN-US">From:</span></b><span class="x_apple-converted-space"><span class="" style="font-size:11.0pt; font-family:"Calibri",sans-serif" lang="EN-US"> </span></span><span class="" style="font-size:11.0pt; font-family:"Calibri",sans-serif" lang="EN-US">Stefano
Zampini [<a href="mailto:stefano.zampini@gmail.com" class=""><span class="" style="color:purple">mailto:stefano.zampini@gmail.com</span></a>]<span class="x_apple-converted-space"> </span><br class="">
<b class="">Sent:</b><span class="x_apple-converted-space"> </span>Tuesday, 28 July 2020 6:55 PM<br class="">
<b class="">To:</b><span class="x_apple-converted-space"> </span>Bin Liu <<a href="mailto:lbllm2018@hotmail.com" class=""><span class="" style="color:purple">lbllm2018@hotmail.com</span></a>><br class="">
<b class="">Cc:</b><span class="x_apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" class=""><span class="" style="color:purple">petsc-users@mcs.anl.gov</span></a><br class="">
<b class="">Subject:</b><span class="x_apple-converted-space"> </span>Re: [petsc-users] solving saddle point problem in distributed memory</span></p>
</div>
</div>
</div>
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
</p>
</div>
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
If you want advice you should post the error trace PETSc reports.</p>
</div>
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
</p>
</div>
</div>
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
Anyway, solving Stokes is not so trivial (without direct solvers, you may need mesh dependent information), but we have examples for it</p>
</div>
</div>
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
</p>
</div>
</div>
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<a href="https://gitlab.com/petsc/petsc/-/blob/master/src/ksp/ksp/tutorials/ex42.c" class=""><span class="" style="color:purple">https://gitlab.com/petsc/petsc/-/blob/master/src/ksp/ksp/tutorials/ex42.c</span></a></p>
</div>
</div>
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<a href="https://gitlab.com/petsc/petsc/-/blob/master/src/ksp/ksp/tutorials/ex43.c" class=""><span class="" style="color:purple">https://gitlab.com/petsc/petsc/-/blob/master/src/ksp/ksp/tutorials/ex43.c</span></a></p>
</div>
</div>
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<a href="https://gitlab.com/petsc/petsc/-/blob/master/src/snes/tutorials/ex69.c" class=""><span class="" style="color:purple">https://gitlab.com/petsc/petsc/-/blob/master/src/snes/tutorials/ex69.c</span></a></p>
</div>
</div>
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
</p>
</div>
</div>
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
If you scroll to the end of those files, you see a bunch of possible options either using PCFIELDSPLIT, PCBDDC or KSPFETIDP.</p>
</div>
</div>
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
</p>
</div>
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<br class="">
<br class="">
<br class="">
</p>
</div>
<blockquote class="" style="margin-top:5.0pt; margin-bottom:5.0pt">
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
On Jul 28, 2020, at 12:37 PM, Bin Liu <<a href="mailto:lbllm2018@hotmail.com" class=""><span class="" style="color:purple">lbllm2018@hotmail.com</span></a>> wrote:</p>
</div>
</div>
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
</p>
</div>
<div class="">
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span class="" style="font-family:"Calibri",sans-serif">I would like to solve a saddle point problem arising from the stokes equation. I got successful to use the direct solvers in sequential runs. However, I would like to extend it for distributed memory computation.
I tried to use superlu_dist, but the program returns errors. Is it possible to solve a saddle point problem in distributed memory using superlu_dist? Could anyone give a simple sample code to set up the parameters of the solver?</span></p>
</div>
</div>
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span class="" style="font-family:"Calibri",sans-serif"> </span></p>
</div>
</div>
<div class="">
<div class="">
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span class="" style="font-family:"Calibri",sans-serif">Thanks</span></p>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
</p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</body>
</html>