Print block and warmup timings - #5058
Merged
Merged
Conversation
ye-luo
reviewed
Jun 24, 2024
| break; | ||
| } | ||
| // Progress messages if not aborting | ||
| if (!myComm->rank()) |
Contributor
There was a problem hiding this comment.
I would prefer to see this printout even the run aborts.
| block + 1 == num_blocks) | ||
| { | ||
| log << "Completed block " << std::setw(4) << block + 1 << " of " << num_blocks << " average " | ||
| << std::setprecision(4) << m_loop_time << " secs/block after " << m_elapsed << " secs" << std::endl; |
Contributor
There was a problem hiding this comment.
You will need another std::setprecision(4) before m_elapsed since the previous got cleared by a string printout.
| int num_blocks) const | ||
| { | ||
| std::stringstream log; | ||
| if (block == 0 || block == num_blocks / 4 || block == num_blocks / 2 || block == (num_blocks * 3) / 4 || |
Contributor
There was a problem hiding this comment.
I feel better to see the 25th, 50th, 75th and 100th step.
Could you do
if (block == 0 || block + 1 == num_blocks / 4 || block + 1 == num_blocks / 2 || block + 1 == (num_blocks * 3) / 4 ||
With the 50th step, I can just double the time by 2. With the 51th step, I need additional math.
Contributor
Author
There was a problem hiding this comment.
Good suggestion - makes for simple math in many common cases.
Contributor
|
Test this please |
ye-luo
approved these changes
Jun 24, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Improve progress monitoring by printing timings for warmup and blocks. Block timing and elapsed time given for first, last, and every ~25% progress. Max 5 timing lines printed.
Also changed output "End of a QMC block" to "End of a QMC section" for clarity.
Sample output:
What type(s) of changes does this code introduce?
Does this introduce a breaking change?
What systems has this change been tested on?
Laptop ubuntu 22 clang 15
Checklist