Skip to content

Commit

Permalink
Remove restart functions
Browse files Browse the repository at this point in the history
Now that the diagnostics are removed from the HDF5 file, there is no
longer any difference between `save_to_disk` and `save_restart`. The
functions are now consolidated into a single one that saves the state
without loss of information.
  • Loading branch information
Sbozzolo committed Dec 19, 2023
1 parent c53a9ac commit de9d89f
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ steps:
artifact_paths: "restart_mpi_baroclinic_wave_rhoe/*"
env:
CLIMACORE_DISTRIBUTED: "MPI"
RESTART_FILE: "mpi_make_restart/restart/day5.0.hdf5"
RESTART_FILE: "mpi_make_restart/day5.0.hdf5"
agents:
slurm_ntasks: 2
slurm_mem: 16G
Expand Down
3 changes: 0 additions & 3 deletions config/default_configs/default_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ test_dycore_consistency:
dt_save_to_disk:
help: "Time between saving to disk. Examples: [`10secs`, `1hours`, `Inf` (do not save)]"
value: "Inf"
dt_save_restart:
help: "Time between saving restart files to disk. Examples: [`10secs`, `1hours`, `Inf` (do not save)]"
value: "Inf"
dt_save_to_sol:
help: "Time between saving solution. Examples: [`10days`, `1hours`, `Inf` (do not save)]"
value: "1days"
Expand Down
3 changes: 1 addition & 2 deletions config/mpi_configs/mpi_make_restart.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
job_id: "mpi_make_restart"
dt_save_restart: "5days"
dt_save_to_disk: "5days"
initial_condition: "DryBaroclinicWave"
initial_condition: "DryBaroclinicWave"
1 change: 0 additions & 1 deletion config/perf_configs/flame_perf_target_callbacks.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
dt_save_to_disk: "1secs"
dt_save_restart: "1secs"
dt_rad: "1secs"
job_id: "flame_perf_target_callbacks"
3 changes: 0 additions & 3 deletions src/callbacks/callbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,6 @@ function save_to_disk_func(integrator, output_dir)
return nothing
end

save_restart_func(integrator, output_dir) =
save_to_disk_func(integrator, joinpath(output_dir, "restart"))

Base.@kwdef mutable struct WallTimeEstimate
"""Number of calls to the callback"""
n_calls::Int = 0
Expand Down
11 changes: 0 additions & 11 deletions src/solver/type_getters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -473,17 +473,6 @@ function get_callbacks(parsed_args, sim_info, atmos, params, comms_ctx)
)
end

dt_save_restart = time_to_seconds(parsed_args["dt_save_restart"])
if !(dt_save_restart == Inf)
callbacks = (
callbacks...,
call_every_dt(
(integrator) -> save_restart_func(integrator, output_dir),
dt_save_restart,
),
)
end

if is_distributed(comms_ctx)
callbacks = (
callbacks...,
Expand Down

0 comments on commit de9d89f

Please sign in to comment.