<div dir="ltr"><div dir="ltr">On Tue, Jul 28, 2020 at 9:00 PM Bin Liu <<a href="mailto:lbllm2018@hotmail.com">lbllm2018@hotmail.com</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 lang="EN-SG">
<div class="gmail-m_-7316459351536329567WordSection1">
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">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.</span></p></div></div></blockquote><div><br></div><div>This would mean that your setup is incorrect. We run FIELDSPLIT all the time in parallel, and it has been used on</div><div>some of the largest run ever made on supercomputers.</div><div><br></div><div>Second, the way to directly solve a saddle-point problem is to directly solve the (0,0) block and the Schur complement. This is not hard:</div><div><br></div><div> -pc_type fieldsplit</div><div> -pc_fieldsplit_detect_saddlepoint</div><div> -pc_fieldsplit_type schur</div><div> -pc_fieldsplit_schur_fact_type full</div><div> -pc_fieldsplit_schur_precondition full</div><div> -fieldsplit_0_pc_type lu</div><div> -fieldsplit_0_pc_factor_mat_solver_type superlu_dist</div><div> -fieldsplit_1_pc_type lu</div><div> -fieldsplit_1_pc_factor_mat_solver_type superlu_dist</div><div><br></div><div> Thanks,</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 lang="EN-SG"><div class="gmail-m_-7316459351536329567WordSection1"><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">
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?<u></u><u></u></span></p>
<p class="MsoNormal"><a name="m_-7316459351536329567__MailEndCompose"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></a></p>
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif"> Stefano Zampini [mailto:<a href="mailto:stefano.zampini@gmail.com" target="_blank">stefano.zampini@gmail.com</a>]
<br>
<b>Sent:</b> Tuesday, 28 July 2020 6:55 PM<br>
<b>To:</b> Bin Liu <<a href="mailto:lbllm2018@hotmail.com" target="_blank">lbllm2018@hotmail.com</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br>
<b>Subject:</b> Re: [petsc-users] solving saddle point problem in distributed memory<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">If you want advice you should post the error trace PETSc reports.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Anyway, solving Stokes is not so trivial (without direct solvers, you may need mesh dependent information), but we have examples for it<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="https://gitlab.com/petsc/petsc/-/blob/master/src/ksp/ksp/tutorials/ex42.c" target="_blank">https://gitlab.com/petsc/petsc/-/blob/master/src/ksp/ksp/tutorials/ex42.c</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="https://gitlab.com/petsc/petsc/-/blob/master/src/ksp/ksp/tutorials/ex43.c" target="_blank">https://gitlab.com/petsc/petsc/-/blob/master/src/ksp/ksp/tutorials/ex43.c</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="https://gitlab.com/petsc/petsc/-/blob/master/src/snes/tutorials/ex69.c" target="_blank">https://gitlab.com/petsc/petsc/-/blob/master/src/snes/tutorials/ex69.c</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">If you scroll to the end of those files, you see a bunch of possible options either using PCFIELDSPLIT, PCBDDC or KSPFETIDP.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><br>
<br>
<u></u><u></u></p>
<blockquote style="margin-top:5pt;margin-bottom:5pt">
<div>
<p class="MsoNormal">On Jul 28, 2020, at 12:37 PM, Bin Liu <<a href="mailto:lbllm2018@hotmail.com" target="_blank">lbllm2018@hotmail.com</a>> wrote:<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal"><span 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?<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:Calibri,sans-serif"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:Calibri,sans-serif">Thanks<u></u><u></u></span></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</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>