[petsc-users] saving results

Sal Am tempohoper at gmail.com
Tue Feb 19 07:21:43 CST 2019


Matthew maybe indeed I was not clear and wrong in the wording. What I meant
is the matrix is undefined, but since it is a finite element method (using
second order elements). The pattern is like this:
[image: image.png]
We are indeed solving Maxwell's equations. I have added the paper.

On Tue, Feb 19, 2019 at 12:15 PM Matthew Knepley <knepley at gmail.com> wrote:

> On Tue, Feb 19, 2019 at 4:12 AM Sal Am via petsc-users <
> petsc-users at mcs.anl.gov> wrote:
>
>> 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).
>>
>
> I am unsure whether this is what you mean. If you matrix is diagonal, you
> can invert it exactly in a single step so you
> do not need a Krylov solver. What equations are you solving? Maxwell?
> Electrostatic? What finite element are you using?
>   Thanks,
>
>     Matt
>
>
>> More about the matrix: 25Mx25M, 2B non-zeros. I checked the KSPMonitor,
>> it seems that I have to write my own routine?
>>
>>> Running for a Krylov method for tens of thousands of iterations is very
>>> rarely recommended.
>>>
>> 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.
>>
>> @Barry
>>
>>> I'm guessing you mange your own time stepping (and nonlinear solver if
>>> there is one)?
>>>
>>
>> It is the default from the solver (attached the short code).
>>
>>> As Jed says it doesn't make sense to save "partial" solutions within the
>>> linear solver.  Just save it every several time-steps.
>>>
>>
>> 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.
>>
>>    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.
>>>
>> 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.
>>
>> On Mon, Feb 18, 2019 at 8:21 PM Smith, Barry F. <bsmith at mcs.anl.gov>
>> wrote:
>>
>>>
>>>    I'm guessing you mange your own time stepping (and nonlinear solver
>>> if there is one)?
>>>
>>>    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.
>>>
>>>    As Jed says it doesn't make sense to save "partial" solutions within
>>> the linear solver.  Just save it every several time-steps.
>>>
>>>    Barry
>>>
>>>    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.
>>>
>>>
>>> > On Feb 18, 2019, at 9:47 AM, Sal Am via petsc-users <
>>> petsc-users at mcs.anl.gov> wrote:
>>> >
>>> > 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)?
>>> > Had a seg fault and all the results until that point seems to have
>>> been lost.
>>> >
>>> >
>>> >
>>> >
>>>
>>>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
> https://www.cse.buffalo.edu/~knepley/
> <http://www.cse.buffalo.edu/~knepley/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190219/b3a44572/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 14363 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190219/b3a44572/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1-s2.0-S001046551300204X-main.pdf
Type: application/pdf
Size: 1766835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190219/b3a44572/attachment-0001.pdf>


More information about the petsc-users mailing list