<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Jack,<br><div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000"><br></font>&gt; 2)<br>&gt; <a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/PC/PCFactorSetMatSolverPackage.html">http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/PC/PCFactorSetMatSolverPackage.html</a><br>Currently I am applying these steps:<br>1. set ksp context extracted from snes to pre only<br>2. set pc type to lu<br>3. set pc factor solver package to MUMPS, as you've explained above.<br>However, having no examples to compare to, I'm not 100% sure if this is the way it's supposed to be done.<br></div></blockquote><div><br></div>I just wrote&nbsp;a Fortran example</div><div>petsc-dev/src/snes/examples/tests/ex14f.F few days ago which</div><div>uses MUMPS as a linear solver within snes non-linear loop.</div><div>The example is attached, or can be obtained through petsc-dev.</div><div><br></div><div>petsc-dev/src/snes/examples/tests/ex12f.F is a simpler example</div><div>which you can run it with options&nbsp;</div><div>./ex12f -pc_type lu -pc_factor_mat_solver_package mumps&nbsp;</div><div>to&nbsp;invoke&nbsp;mumps'&nbsp;LU.&nbsp;Use&nbsp;'-snes_view'&nbsp;to&nbsp;check&nbsp;which&nbsp;solvers&nbsp;are&nbsp;used</div><div>and&nbsp;'-ksp_monitor&nbsp;-snes_monitor'&nbsp;for&nbsp;monitoring&nbsp;iterations.</div><div><br></div><div>Hong</div><div></div></body></html>