<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>> 2)<br>> <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 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 </div><div>./ex12f -pc_type lu -pc_factor_mat_solver_package mumps </div><div>to invoke mumps' LU. Use '-snes_view' to check which solvers are used</div><div>and '-ksp_monitor -snes_monitor' for monitoring iterations.</div><div><br></div><div>Hong</div><div></div></body></html>