-
Notifications
You must be signed in to change notification settings - Fork 352
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
PyCBC threshold code is broken on intel mac with openMP #4828
Comments
I unfortunately don't have time to really look into this, but I will record here my initial suggestion, especially as I think we now know that this only occurs with OpenMP enabled. If someone can reproduced this, I would recommend seeing if we can change these lines to instead read:
That is, enure that the |
Let me ping @duncanmmacleod on this as well, as this will affect conda builds until this is resolved. |
I've been trying to reproduce this on my ARM mac, using it's builtin x86_64 emulation. I could not reproduce the failure. One question: @duncanmmacleod in your conda patch, you only include the omp header files in the compilation. You do not add Noting that this is x86_64 bit compiled:
|
@duncanmmacleod This is possibly version dependent (OMP version, compiler version etc.). You said you had reproduced this on an old mac, is there anything I can use from that to reproduce here? (Is this a fully isolated conda env for e.g., could I have the package list ... If using compilers installed system-wide, what versions are they? ) |
@duncanmmacleod Just a poke to ask again if you have any more details on how you reproduced this? I've been unable to test Josh's proposed fix, without being able to reproduce the error! |
I have an Intel Mac, I am testing to see if I can reproduce the problem. I am having trouble compiling/linking against OpenMP however:
and I seem to have
[some minutes later] Ok, by installing a local version of clang like so:
I got PyCBC to compile and fail the test!
[some minutes later] After some extra prints I get that After some more investigation with several runs (the random seed changes each time), it seems that the discrepancies happen within ranges of
Not sure what this is telling me without going through the code. Perhaps this way of visualizing it is a bit clearer:
and apparently the odd/even alternance is not repeatable, here is another run:
So it seems that the discrepancy is confined to ranges in locs that have length 65536, and inside each range either all are consistent or all are different, but whether a given block is consistent or different is random. I am going to stop here for today, but I can do more tests if needed. |
See discussion here conda-forge/pycbc-feedstock#84. There is some issue with the openmp code used for the threshold code, which appears to manifest on old intel macs. This is covered (thankfully) by our unit tests, but it is possible that whatever is causing this will appear in other contexts in the future. We should understand and fix ... But we need to be able to reproduce it first!
The text was updated successfully, but these errors were encountered: