<div dir="ltr">Based on KSP ex52, I use PCFactorSetUpMatSolverPackage in the process of setting various MUMPS ictnl options. This works fine for me when I'm solving linear problems.<div><br></div><div>I then wanted to use PCFactorSetUpMatSolverPackage with the PC from a SNES object. I tried to do this with the following code (after calling SNESCreate, SNESSetFunction, and SNESSetJacobian):</div><div><br></div><div><div>KSP snes_ksp;</div><div>SNESGetKSP(snes, &snes_ksp);</div><div>PC snes_pc;</div><div>KSPGetPC(snes_ksp, &snes_pc);</div></div><div>PCFactorSetMatSolverPackage(snes_pc, MATSOLVERMUMPS);<br></div><div>PCFactorSetUpMatSolverPackage(snes_pc);<br></div><div><br></div><div>However, I get a segfault on the call to PCFactorSetUpMatSolverPackage in this case. I was wondering what I need to do to make this work?</div><div><br></div><div>Note that I want to set the MUMPS ictnl parameters via code rather than via the commandline since sometimes MUMPS fails (e.g. with error -9 due to a workspace size that is too small) and I need to automatically re-run the solve with different ictnl values when this happens.</div><div><br></div><div>Thanks,<br>David</div><div><br></div><div><br></div></div>