-
8000
-
Notifications
You must be signed in to change notification settings - Fork 239
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
Conversation
Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/2377/ |
Jenkins: OGS-6/Linux-PRs-dynamic failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs-dynamic/601/ |
Jenkins: OGS-6/Linux-PRs-dynamic failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs-dynamic/602/ |
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"); |
There was a problem hiding this comment.
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.
👍 |
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(); |
There was a problem hiding this comment.
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? ✅
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? |
After extracting code to BaseLib: 👍 |
@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. |
@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. |
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 |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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? 😄
Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/2435/ |
OpenGeoSys development has been moved to GitLab. |
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.