[petsc-users] saving results
Jed Brown
jed at jedbrown.org
Mon Feb 18 10:26:17 CST 2019
What kind of problems are you solving? Running for a Krylov method for
tens of thousands of iterations is very rarely recommended.
Regarding storage, it's significantly more expensive to store the Krylov
basis (even when it's a recurrence) than the current approximation.
Some methods require some work to compute the current approximation.
Anyway, you can use a KSPMonitor to write checkpoints at whatever
interval you like. In case of a crash, use VecLoad() to read in the
checkpoint file and use KSPSetInitialGuessNonzero() to make it be used
as an initial guess.
Sal Am <tempohoper at gmail.com> writes:
> This is how I run it:
>
> -ksp_type bcgs -pc_type gamg -mattransposematmult_via scalable
> -build_twosided allreduce -ksp_monitor_true_residual
> -ksp_monitor_if_not_converged -log_view -ksp_max_it 100000 -ksp_rtol 1.0e-7
>
> so BCGS with GAMG as preconditioner. I am guessing writing at every
> timestep would be expensive, maybe every hour? I am not sure what would be
> a good number here if the simulations lasts more than a day.
>
>
>
> On Mon, Feb 18, 2019 at 4:10 PM Jed Brown <jed at jedbrown.org> wrote:
>
>> What kind of solver are you using and how often do you want to write?
>>
>> Sal Am via petsc-users <petsc-users at mcs.anl.gov> writes:
>>
>> > 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.
>>
More information about the petsc-users
mailing list