Skip to content
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

Confusing format of timing results using @showprogress #270

Open
algorithmx opened this issue Jun 20, 2023 · 1 comment
Open

Confusing format of timing results using @showprogress #270

algorithmx opened this issue Jun 20, 2023 · 1 comment

Comments

@algorithmx
Copy link

algorithmx commented Jun 20, 2023

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 ?

@MarcMush
Copy link
Collaborator

the progressbar shouldn't resize on its own like that. Is it possible you resized the terminal window in this time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants