<div dir="ltr">
<div>It is a finite-element problem of an RF antenna dielectric
interaction where all the non-zero elements are on the diagonal of the
sparse matrix (if that is relevant).</div><div>More about the matrix: 25Mx25M, 2B non-zeros. I checked the KSPMonitor, it seems that I have to write my own routine? <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>
Running for a Krylov method for tens of thousands of iterations is very rarely recommended.<br></div></blockquote><div>GAMG and BCGS is the only ones that have actually worked for me so far, I increased the max_it because it was not enough with the default one. With the default tolerance I got ||r(i)||/||b|| in the order of 10^-3, but I need more accuracy so I increased the tol to 10^-7 and that is when it crashed after ~51000 iterations.</div><div><br></div><div>@Barry</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
I'm guessing you mange your own time stepping (and nonlinear solver if there is one)?
</div></blockquote><div><br></div><div>It is the default from the solver (attached the short code).</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
As Jed says it doesn't make sense to save "partial" solutions within the linear solver. Just save it every several time-steps.
</div></blockquote><div> </div><div>Yes maybe I worded it wrong. I did mean to save checkpoints basically such that the next time it is running it can pick up from where it crashed.</div><div><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>
Also the code should not be "crashing" at seemingly long times (after
hours) with a Segmentation fault. Send us the full error message and
we'll see if there is some way we can help you fix this problem.
</div></blockquote><div>I have added this before, but seemingly they conclusion was that it is memory error...although I am not sure how, but I have added the entire error. <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 18, 2019 at 8:21 PM Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</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"><br>
I'm guessing you mange your own time stepping (and nonlinear solver if there is one)? <br>
<br>
You can save the solution with a call to VecView() and then reload the solution with a VecLoad() but you need to manage any other restart data that you may need, like the value of the current time etc. <br>
<br>
As Jed says it doesn't make sense to save "partial" solutions within the linear solver. Just save it every several time-steps.<br>
<br>
Barry<br>
<br>
Also the code should not be "crashing" at seemingly long times (after hours) with a Segmentation fault. Send us the full error message and we'll see if there is some way we can help you fix this problem.<br>
<br>
<br>
> On Feb 18, 2019, at 9:47 AM, Sal Am via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br>
> <br>
> Is there a function/command line option to save the solution as it is solving (and read in the file from where it crashed and keep iterating from there perhaps)?<br>
> Had a seg fault and all the results until that point seems to have been lost. <br>
> <br>
> <br>
> <br>
> <br>
<br>
</blockquote></div>