-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add restart_file
configuration variable, remove ENV variable, enable restarted progress logging
#2777
Conversation
restart_file
configuration variable, remove ENV variablerestart_file
configuration variable, remove ENV variable, enable restarted progress logging
b60c304
to
4c2d616
Compare
Since you are looking at this, maybe it's a good time to tackle the following. The accumulated diagnostics cannot go across restart files. E.g., if you ask for a 30days mean, you cannot have a checkpoint in between (and restart from the checkpoint). Could you please add a check to enforce this? (Maybe in another PR) |
@Sbozzolo I am happy to take that on in a separate PR! |
@@ -259,10 +260,10 @@ function print_walltime_estimate(integrator) | |||
if wte.n_calls == wte.n_next && ready_to_report | |||
t = integrator.t | |||
n_steps_total = ceil(Int, t_end / dt) | |||
n_steps = ceil(Int, t / dt) | |||
n_steps = ceil(Int, (t - t_start) / dt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think above we need n_steps_total = ceil(Int, (t_end - t_start) / dt)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I think that might be all we need
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good once this comment is resolved
5b74027
to
635c5b8
Compare
After testing locally, this seems to work well. The walltime estimate, SYPD, and wall_time_per_timestep are roughly the same for an initial simulation and a restarted simulation starting from midway to t_end. Local test: import ClimaAtmos as CA
config_dict = Dict("t_end" => "20days", "dt_save_state_to_disk" => "10days", "job_id" => "test_restart")
config = CA.AtmosConfig(config_dict)
include("examples/hybrid/driver.jl")
config_dict = Dict("t_end" => "20days", "restart_file" => "output/test_restart/hdf5_files/day10.0.hdf5")
config = CA.AtmosConfig(config_dict)
include("examples/hybrid/driver.jl") Initial simulation log:
Restarted simulation log:
|
635c5b8
to
3b135c1
Compare
This PR improves restarted simulations:
Content
ENV["RESTART_FILE"]
toparsed_args["restart_file"]
. This will make it simpler to set the restart file for calibration experiments.