-
Notifications
You must be signed in to change notification settings - Fork 226
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
Lot's of non-deterministic failures in univariate_statistics_test.cpp #585
Comments
I remember seeing similar egregious failures with GCC9 which used TBB instead of it's own implementation of the parallelism TS. TBB fails tsan horribly, so I wonder if something similar is going on with MSVC? |
Can you please give PR #586 a try? |
Looking at:
I have 2 comments:
|
OK, looking at this some more I think we have several issues:
I fear the only correct way to implement this as a parallel algorithm, is to divide the input range into N segments and create a future for each one, each of which returns a pair of partial sums, which can then be accumulated at the end. Any other thoughts? We should probably review the other parallel algorithms for similar issues too. |
A quick eyeball over the code found nothing else obvious. @mborland , has everything (regression tests and performance tests) been run through clang's thread sanitizer just to be on the safe side? |
Do we have a threadsanitizer build in CI? |
No, I know I added some sanitizer to the multiprecision CI tests, but we have nothing here yet I think? In general they're quite hard to run as CI jobs: either the VM rejects them or there are false positives. But yes we should try and set something up. |
The bulk of the other algorithms use exactly what you are describing. They would serve as an effective starting point.
In the original PR I ran everything through GCC's asan and tsan. Have not tried the Clang equivalent.
There is currently nothing in the CI to run asan/tsan/ubsan. Perhaps we could add a CircleCI config to only run these? The runs for GHA already take many times longer now that most of Boost has moved to it so I would recommend against adding more to GHA. GCC11 and Clang12 should be mainstream pretty soon here too... |
Tentative CircleCI run added here: #592 This also adds doc building and inspection report run. |
Haha, well CircleCI might not have been the best choice, apparently I have -24K free credits left! |
@jzmaddock This issue can be closed. |
These seem to be related to gini calculation, I changed all the BOOST_TEST's to BOOST_TEST_LT so we could see how close the failures were, here's a typical run with msvc-14.2:
However, the output is different every time! Also note how large some of the errors are, something grievous is going on here, but I don't see it at present.
The text was updated successfully, but these errors were encountered: