Is there any way to do a proper restart?

35 views
Skip to first unread message

Joshua Fontana

unread,
Mar 4, 2024, 10:48:11 AM3/4/24
to SNOPT
Hi All,

If my program crashes during an optimization, can I restart it from some checkpoint so that it will continue in the same way, as if the crash did not happen at all?

I have tried saving a "New Basis File", and then using is as an "Old Basis File" when I restart it, but the only thing this seems to do is set the value of the design variables to what they were when the "New Basis File" was written. I tested this with a simple analytical function in two variables. I ran one optimization continuously for 65 function evaluations. Then I ran an identical optimization, but stopped it at function evaluation 12, outputting a basis file. Then I used that basis file to start another optimization, and ran it out to 65 function evaluations total. Please see the attached objective history plot, and plot of the paths through the design space.

As you can see, the restarted optimization does not reproduce the objective history from the continuous run, since it does not take the same path through the design space as it would have if it had run continuously. How can I correct this? Is there some other information from the "Stopped_at_12" optimization that needs to be retained in the "Restarted_from_12" one?

Thanks,
Josh


Design_var_Paths.jpg
Objective_History.jpg

Michael Saunders

unread,
Mar 4, 2024, 11:55:10 AM3/4/24
to Joshua Fontana, SNOPT
Hi Josh,

Basis files are intended to preserve the active set every so often,
to allow restarting if a run is interrupted.  They also preserve the
numerical values of nonlinear variables, but they don't save the
current quasi-Newton approximation to the Hessian, for example.
It means that restarting from a basis file will have a different QP Hessian
in the first QP subproblem.

In short, basis files should shorten a restart, but they don't act as checkpoints
in the way that you have in mind.  Even Save frequency 1 won't help.
The main thing to be happy about is that your restarted run seems to reach
the same optimal objective value.

Glad you are using SNOPT anyway,
Michael

Michael Saunders
Professor (Research) Emeritus
MS&E and ICME
Stanford University



--
You received this message because you are subscribed to the Google Groups "SNOPT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to snopt+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/snopt/fd77d6d5-fc4d-47db-bf5f-d6a220c7d4c5n%40googlegroups.com.

Joshua Fontana

unread,
Mar 4, 2024, 12:01:13 PM3/4/24
to SNOPT
Hi Michael,

Ok, understood. Thanks for the information.

Josh
Reply all
Reply to author
Forward
0 new messages