-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
11ba127
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.
It seems this fix does not address the flushing issue in parallel code (MPI and UPC++ specifically). Maybe we should add a comment in docs to remind users to invoke stream flush explicitly?
11ba127
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.
@b0ae989c what issue are you referring to?
11ba127
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.
Starting at commit 6b68dff, the behavior of
fmt::print
changes when it's used in a parallel context that involves multiple computing nodes. Even with this commit fix, the following program does not output anything until the very end of the simulationThe old behavior is that "test begins" is written to the output logs before the time consuming work starts. Right now, this line is not written to logs until the entire program finishes (after several days).
We manage to fix this by adding
std::cout << std::flush;
after everyfmt::print
calls. Note that this issue does not appear in sequential code.11ba127
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.
@b0ae989c, should be fixed in 6435b16 which adds line buffering support.