<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Nov 17, 2016 at 8:32 AM, Robert Annewandter <span dir="ltr"><<a href="mailto:robert.annewandter@opengosim.com" target="_blank">robert.annewandter@opengosim.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<font face="Trebuchet MS">Hi, <br>
<br>
Is there a way to fine tune '-ksp_view_mat binary' so it only
gives me an output at a defined time? <br>
<br>
I'm implementing a Two-Stage Preconditioner for PFLOTRAN (a
subsurface flow and transport simulator which uses PETsc).
Currently I like to compare convergence of the preconditioning in
PFLOTRAN against a prototyped version in MATLAB. In PFLOTRAN I
export the Jacobian, and residual before they get handed-over to
PETsc, which get imported in MATLAB to do the Two-Stage
Preconditioning. <br>
<br>
However, I know I can do exports closer to PETsc with the options
'-ksp_view_mat binary' and '-ksp_view_rhs binary'. Unfortunately I
get outputs for the whole simulation in one file, instead of only
at a well-defined Newton-Raphson iteration (as done in PFLOTRAN).
<br>
<br>
Is there a way to tell PETsc</font><font face="Trebuchet MS"><font face="Trebuchet MS"> </font>with above options when to export
the Jacobian and residual?<br>
<br>
Any pointers much appreciated!<br></font></div></blockquote><div><br></div><div>It sounds like you could give the particular solve you want to look at a prefix:</div><div><br></div><div> <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPSetOptionsPrefix.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPSetOptionsPrefix.html</a></div><div><br></div><div>and then give</div><div><br></div><div> -myprefix_ksp_view_mat binary</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 bgcolor="#FFFFFF"><font face="Trebuchet MS">
Thank you!<span class="gmail-HOEnZb"><font color="#888888"><br>
Robert<br>
</font></span></font>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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></div>