<div dir="ltr">Could you also provide input files to run your code?<div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">--Junchao Zhang</div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 3, 2024 at 5:14 AM Edoardo alinovi <<a href="mailto:edoardo.alinovi@gmail.com">edoardo.alinovi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div>Hi Barry,</div><div><br></div><div>I am trying to port this preconditioner I found presented at the last PETSc conference into may code:</div><div><a href="https://urldefense.us/v3/__https://github.com/ndjinga/SOLVERLAB/blob/master/CoreFlows/examples/C/SaddlePointPreconditioner/SaddlePointLinearSolver.c__;!!G_uCfscf7eWS!a-JnrBsta75n_WDtxUNd7Xb8_m7tg1pWSxwWNTmUBSfpBwISq4IxJkbM6QgADd-x23Q_2s-d6d6bOWCKGRMxMzHyc9DDm7A$" target="_blank">https://github.com/ndjinga/SOLVERLAB/blob/master/CoreFlows/examples/C/SaddlePointPreconditioner/SaddlePointLinearSolver.c</a></div><div><br></div><div>So far so good, I am just translating C to Fortran, however when I try to solve my linear system with: </div><div><br></div></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_signature"><div><div><div>call KSPSetOperators(ksp, Ahat, Pmat, ierr)</div></div></div></div><div class="gmail_signature"><div><div><div>call KSPSolve(ksp, bhat, xhat, ierr)</div></div></div><div><br></div></div></blockquote><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div>with Ahat and Pmat being indeed two nest MatNest, created from an array of Mat as:</div><div><br></div></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_signature"><div><div><div>call MatCreateNest(PETSC_COMM_WORLD, 2, PETSC_NULL_IS, 2, PETSC_NULL_IS, Mat_array, Ahat, ierr)</div></div></div></div><div class="gmail_signature"><div><div><div>call MatCreateNest(PETSC_COMM_WORLD, 2, PETSC_NULL_IS, 2, PETSC_NULL_IS, Mat_array, Pmat, ierr)</div></div></div></div></blockquote><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div><br></div><div>However I am getting this error on getinfo:</div><div><br></div><div>from C to Fortran</div><div><br></div><div>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>[0]PETSC ERROR: No support for this operation for this object type<br>[0]PETSC ERROR: No method getinfo for Mat of type nest<br>[0]PETSC ERROR: See <a href="https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!a-JnrBsta75n_WDtxUNd7Xb8_m7tg1pWSxwWNTmUBSfpBwISq4IxJkbM6QgADd-x23Q_2s-d6d6bOWCKGRMxMzHyRUMnyvE$" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<br>[0]PETSC ERROR: Petsc Release Version 3.20.4, unknown <br></div><div><br></div><div>How can I get rid of this issue?</div><div><br></div><div>Many thanks!</div><div><br></div></div></div></div></div>
</blockquote></div>