8000 Added time measurement output by chleh · Pull Request #1322 · ufz/ogs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added time measurement output #1322

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

Merged
merged 6 commits into from
Jul 28, 2016
Merged

Added time measurement output #1322

merged 6 commits into from
Jul 28, 2016

Conversation

chleh
Copy link
Collaborator
@chleh chleh commented Jul 19, 2016

Sorry @wenqing that we did not respond to your time measurement PR #863. But I think time measurement is important, so here is my attempt on it.

This PR provides wall-time measurement of assembly, linear solvers, nonlinear iterations, dirchlet BCs timesteps, output, and overall runtime.

The time is measured for individual "events" and not accumulated over timesteps.

@ogsbot
Copy link
Member
ogsbot commented Jul 19, 2016

Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/2377/

@ogsbot
Copy link
Member
ogsbot commented Jul 19, 2016

Jenkins: OGS-6/Linux-PRs-dynamic failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs-dynamic/601/

@ogsbot
Copy link
Member
ogsbot commented Jul 19, 2016

Jenkins: OGS-6/Linux-PRs-dynamic failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs-dynamic/602/

@ogsbot
Copy link
Member
ogsbot commented Jul 19, 2016

Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/2378/

auto const start_time_sys = std::chrono::system_clock::to_time_t(
std::chrono::system_clock::now());
std::ostringstream sstr;
sstr << std::put_time(std::localtime(&start_time_sys), "%F %T %z");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

% before T and Z display in red colour, but the expression looks nothing wrong.

@wenqing
Copy link
Member
wenqing commented Jul 19, 2016

👍

@wenqing
Copy link
Member
wenqing commented Jul 19, 2016

However, I think it would be nice to print the accumulated times for assembly, linear solver. To measure the scalability of a parallel computing, we often need these times.

}
}

std::chrono::steady_clock::now();
Copy link
Member
@TomFischer TomFischer Jul 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the return value is not stored here I wonder if this line is necessary? ✅

@TomFischer
Copy link
Member

I do not know if it would be a good idea to implement a new loging macro TIME into logog for timing output. What do you think?

@TomFischer
Copy link
Member
TomFischer commented Jul 21, 2016

After extracting code to BaseLib: 👍

@chleh
Copy link
Collaborator Author
chleh commented Jul 28, 2016

@wenqing: I'd prefer not to accumulate in ogs. I think such accumulation can be easily done by grepping the measured times from the log and summing them up in a script.

@chleh
Copy link
Collaborator Author
chleh commented Jul 28, 2016

@TomFischer: Since the logog macros and logog log line prefixes are defined in macro.hpp and formatter.cpp in that third party package I don't want to introduce a custom TIME log macro now.

@chleh
Copy link
Collaborator Author
chleh commented Jul 28, 2016

In the last commit I added functionality that prints the OGS version in every run.

* Formats the given time point according to RFC 3339 (cf. man-page of the unix
* date utility).
*
* Example: 2006-08-14 02:34:56-06:00
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer not to print the year and the timezone, which are very unlikely to change in a single run...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather keep both of them. 08-14 02:34:56 doesn't look like a real timestamp, does it? 😄

@chleh chleh force-pushed the time-measurement branch from 51833b3 to 07fb9da Compare July 28, 2016 13:31
@chleh chleh merged commit 1478df6 into ufz:master Jul 28, 2016
@chleh chleh deleted the time-measurement branch July 28, 2016 13:33
@ogsbot
Copy link
Member
< 91CC strong> ogsbot commented Jul 28, 2016

Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/2435/

@ogsbot
Copy link
Member
ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

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

Successfully merging this pull request may close these issues.

5 participants
0