Conversation
…ly partially. Closes #2260
Codecov Report
@@ Coverage Diff @@
## master #2264 +/- ##
==========================================
- Coverage 90.81% 90.79% -0.03%
==========================================
Files 59 59
Lines 11531 11536 +5
==========================================
+ Hits 10472 10474 +2
- Misses 1059 1062 +3
Continue to review full report at Codecov.
|
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.
The original code iterated over
nJumps + nthto allow all threads one more iteration to have a chance to push the last buffer upstream. The problem with this approach is that there is no guarantee that OMP would distribute these extranthiterations 1 per each running thread. Although this happens most of the time, occasionally some thread would consume several of the extra iterations, which means that some other thread would not have a chance to push its last buffer.To fix this problem, we should just push the buffers explicitly after the loop ends.
Not adding any tests, because my measurements were showing the problem only with probability around 0.03%, and may take up to 10 minutes to run. This seems prohibitively expensive...
Closes #2260