[petsc-users] Restart Krylov-Schur "Manually"
Samar Khatiwala
samar.khatiwala at earth.ox.ac.uk
Mon Jun 24 10:38:19 CDT 2024
Hi Matt,
This would be for SNES and KSP. In many of my applications it would be too expensive to regenerate the Krylov space, which would also be problematic for Newton as I often do matrix-free calculations.
I know how complex the underlying data structures are for these objects and entirely understand how difficult it would be to provide a general checkpointing facility. Still, I do dream that one day I’ll be able to do Save(snes,...) and Load(snes,…) ...
Thanks,
Samar
On Jun 24, 2024, at 12:15 PM, Matthew Knepley <knepley at gmail.com> wrote:
On Mon, Jun 24, 2024 at 4:24 AM Samar Khatiwala <samar.khatiwala at earth.ox.ac.uk<mailto:samar.khatiwala at earth.ox.ac.uk>> wrote:
This Message Is From an External Sender
This message came from outside your organization.
Hi,
Sorry to hijack this thread but I just want to add that this is a more general problem that I constantly face with PETSc. Not being able to checkpoint the complete state of a solver instance and restart a computation (at least not easily) has long been the biggest missing feature in PETSc for me.
Which type of solver do you want to do this for? Some solvers, like Newton, just need the current iterate, which we do. You could imagine saving Krylov spaces, but it is very often cheaper to regenerate them than to save and load them from disk (which tends to be under-provisioned).
Thanks,
Matt
Thanks,
Samar
On Jun 24, 2024, at 9:14 AM, Jose E. Roman via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>> wrote:
This Message Is From an External Sender
This message came from outside your organization.
Unfortunately there is no support for this.
If you requested several eigenvalues and the solver has converged some of them already, then it would be possible to stop the run, save the eigenvectors and rerun with the eigenvectors passed via EPSSetDeflationSpace().
Jose
> El 24 jun 2024, a las 0:21, Marildo Kola <marildo.kola at gmail.com<mailto:marildo.kola at gmail.com>> escribió:
>
> This Message Is From an External Sender
> This message came from outside your organization.
> Hello,
> I am using SLEPc to calculate eigenvalues for fluid dynamics stability analysis (specifically studying bifurcations). We employ a MatShellOperation, which involves propagating Navier-Stokes to construct the Krylov space, and this particularly slows down our algorithm. The problem I am facing is that, after days of simulations, the simulation may die due to a time limit on the cluster, but the eigensolver (I am using the default Krylov-Schur) has not converged yet, leading to the loss of all the information computed up to that point. I wanted to inquire if it is possible to implement, with the available features, a restarting strategy, which can allow me, once the simulation stops (or after a given number of restart iterations of the solver), to save all the information necessary to restart the EPSSolver from the point it had stopped.
> Thank you in advance,
> Best regards, Marildo Kola
--
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://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!ZMeCWsu9Ah27To5Ol1-bQX3iJD0vUKjgJRbqyWvsTfTCcWaq5SCd1TrtLJBrASH0OQcLIcPjoloT_p0TASaEArdmYJjfQ_dNXgYjai8$ <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!ZMeCWsu9Ah27To5Ol1-bQX3iJD0vUKjgJRbqyWvsTfTCcWaq5SCd1TrtLJBrASH0OQcLIcPjoloT_p0TASaEArdmYJjfQ_dNcwBg3KQ$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240624/595ecab4/attachment.html>
More information about the petsc-users
mailing list