ProgressMeter.jl
ProgressMeter.jl copied to clipboard
Confusing format of timing results using @showprogress
I have used the macro @showprogress
for displaying the progress of a long computation, which looks like the following:
@showprogress for i_S in 1:TB.N_S
IMPACT_Ang = S_GRID_local[i_S]
for i_X0 in 1:TB.N_X0
X0_Ang = X0_GRID[i_X0]
X[1:end, i_S, i_E, i_X0] = Verlet_integration_adaptive(...)
...
end
end
where Verlet_integration_adaptive()
costs considerable amount of time, and this time may vary greatly, provided that the following confusing observation is reality. I have observed the following reports:
......
[ Info: (93, 443062.1457583881)
Progress: 100%|████████████████████████████████████████████████████████████| Time: 0:01:30
[ Info: (94, 497702.35643321055)
Progress: 100%|████████████████████████████████████████████████████████████| Time: 0:01:40
[ Info: (95, 559081.0182512231)
Progress: 100%|█████████████████████████████████████████████████████████| Time: 0:01:50:33
[ Info: (96, 628029.1441834255)
Progress: 100%|█████████████████████████████████████████████████████████| Time: 0:02:01
[ Info: (97, 705480.2310718638)
Progress: 100%|█████████████████████████████████████████████████████████| Time: 0:02:17
......
The third progress bar is an anomaly. The timing result Time: 0:01:50:33
differs greatly from other computations performed under similar settings. This abnormal timing could be true, saying that the computation costs 1 hour 50 minutes 33 seconds. Or, it could be a bug in the timing code that the actual cost is 1 minute 50 seconds plus some milliseconds.
My question is, can someone confirm to me that the @showprogress
macro won't report time as the format xx:xx:xx:xx
?
the progressbar shouldn't resize on its own like that. Is it possible you resized the terminal window in this time?