Skip to content

Commit

Permalink
Merge pull request #2444 from CliMA/gb/save_crash
Browse files Browse the repository at this point in the history
Save final state when simulation crashes
  • Loading branch information
Sbozzolo authored Dec 18, 2023
2 parents d034af8 + 6e60fef commit ba47df4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/solver/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ function solve_atmos!(simulation)
return AtmosSolveResults(sol, :success, walltime)
end
catch ret_code
CA.save_restart_func(integrator, simulation.output_dir)
CA.save_to_disk_func(integrator, simulation.output_dir)
@error "ClimaAtmos simulation crashed. Stacktrace for failed simulation" exception =
(ret_code, catch_backtrace())
return AtmosSolveResults(nothing, :simulation_crashed, nothing)
Expand Down

0 comments on commit ba47df4

Please sign in to comment.