Skip to content

Commit 62faf12

Browse files
committed
start from nothing
1 parent 094909c commit 62faf12

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

src/callbacks/callbacks.jl

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,36 @@ Returns a callback to display simulation information.
2323
Adapted from ClimaTimeSteppers.jl #89.
2424
"""
2525
function display_status_callback!(::Type{tType}) where {tType}
26-
start_time = UInt64(0.0)
27-
prev_time = UInt64(0.0)
28-
prev_t = tType(0.0)
29-
eta = tType(0.0)
30-
speed = tType(0.0)
31-
is_first_step = true
26+
# start_time = UInt64(0.0)
27+
# prev_time = UInt64(0.0)
28+
# prev_t = tType(0.0)
29+
# eta = tType(0.0)
30+
# speed = tType(0.0)
31+
# is_first_step = true
3232

3333
function affect!(integrator)
34-
t_end = maximum(integrator.tstops.valtree)
35-
nsteps = ceil(Int64, t_end / integrator.dt)
36-
t = integrator.t
37-
step = ceil(Int64, t / integrator.dt)
38-
time = time_ns() / 1e9
39-
speed = (time - prev_time) / (t - prev_t)
40-
eta = speed * (t_end - t)
41-
eta_string = eta == Inf ? "..." : string(round(Int64, eta)) * "seconds"
42-
43-
if is_first_step
44-
is_first_step = false
45-
start_time = time
46-
end
47-
@info "$(Dates.format(Dates.now(), "HH:MM:SS:ss u d")) \n\
48-
Timestep: $(step) / $(nsteps); Simulation Time: $(t) seconds \n\
49-
Walltime: $(round(time - start_time, digits=2)) seconds; \
50-
Time/Step: $(round(speed * integrator.dt, digits=2)) seconds \n\
51-
Time Remaining: $eta_string"
34+
# t_end = maximum(integrator.tstops.valtree)
35+
# nsteps = ceil(Int64, t_end / integrator.dt)
36+
# t = integrator.t
37+
# step = ceil(Int64, t / integrator.dt)
38+
# time = time_ns() / 1e9
39+
# speed = (time - prev_time) / (t - prev_t)
40+
# eta = speed * (t_end - t)
41+
# eta_string = eta == Inf ? "..." : string(round(Int64, eta)) * " seconds"
42+
43+
# if is_first_step
44+
# is_first_step = false
45+
# start_time = time
46+
# end
47+
# @info "$(Dates.format(Dates.now(), "HH:MM:SS:ss u d")) \n\
48+
# Timestep: $(step) / $(nsteps); Simulation Time: $(t) seconds \n\
49+
# Walltime: $(round(time - start_time, digits=2)) seconds; \
50+
# Time/Step: $(round(speed * integrator.dt, digits=2)) seconds \n\
51+
# Time Remaining: $eta_string"
5252

53-
prev_t = t
54-
prev_time = time
53+
# prev_t = t
54+
# prev_time = time
55+
return nothing
5556
end
5657
return affect!
5758
end

0 commit comments

Comments
 (0)