[petsc-users] How to stop a TS early

Thibault Bridel-Bertomeu thibault.bridelbertomeu at gmail.com
Fri Jul 19 02:01:25 CDT 2019


Dear Petsc users,

I am facing the following situation.
I run a code that uses a Petsc TimeStepper on a supercomputer that has a
given walltime. In real time, I am able to get the remaining time, and when
I have only a few minutes left I want to stop the code in a clean fashion,
rather than an abrupt out-of-time. I set-up all the machinery to check the
remaining time already in the TSPostStep so the code checks after each
iteration, and sets a flag to 1 when it got to stop.

Now what I would like to know, is how to tell TSSolve to stop iterating
when that flag is set to 1 in the TSPostStep ?

Any clues would be much appreciated !

Best regards,

Thibault Bridel-Bertomeu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190719/1fec61e4/attachment.html>


More information about the petsc-users mailing list