-
Notifications
You must be signed in to change notification settings - Fork 31
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
Nested reducer causes Cilksan crash at runtime and compiler crash when building for Cilkscale #306
Comments
I have reproduced both bugs on other OSes as well, MacOS/x86-64 and FreeBSD/arm64. |
This bug was apparently introduced by 59ca238 ("Properly enclose the body of a Tapir loop within a taskframe..."). |
I think I have fixes for these bugs, as well as another bug I found in the course of debugging. We'll work on a PR with a fix and incorporating the fix into the next release. |
Thanks for the quick fixes! Are the PRs still a work in progress? After building from the PR branch (both the compiler and cilktools), I am still getting the following error:
|
We are in the process of rebasing the OpenCilk compiler onto LLVM 19. I believe the PR for the compiler fix is based on that rebased compiler. Are you using that LLVM-19-based compiler? In other words, what version do you see when you run If you're using the LLVM-19-based version of OpenCilk, make sure you update your copy of cheetah as well. I just merged a fix to to cheetah that is necessary for the new version of the compiler. Without that update, you're likely to see segfaults. Let me know if updating cheetah resolves the issue on your end. |
Thank you for the suggestion. Updating cheetah and rebuilding indeed fixes the problem above. The MWE above now compiles and runs without issue. However, I am still getting a compiler crash when building my original codebase with Cilkscale:
Should I open a separate issue for this? |
Thanks for the new report. We can just use this issue thread while we investigate. |
Describe the bug
Code using multiple reducers in nested cilk_for loops compilers fine without instrumentation. However when compiled with Cilksan the executable crashes at runtime and the compiler crashes when compiled with Cilkscale.
Expected behavior
Neither the compiler nor the compiled executable should crash.
OpenCilk version
Built from source:
opencilk-project
: ef3cdc8cheetah
: b71934ce4dbb5db3e4369d2cbc54d1e7fb9a1c3fproductivity-tools
: 393e6849624ad4c9f30954309405afbf931f60e5infrastructure
: ee22572e020e96b0ae1d05c046c201281ee713e3System information
Steps to reproduce (include relevant output)
Copy the working example code below to
nested_reducer_mwe.cpp
Build with following:
nested_reducer_mwe_cilksan
fails withnested_reducer_mwe_cilkscale
compilation fails withWorking example code
The following code was isolated from a larger codebase:
Additional comments
In the 2.1 release version, the compiled code (without Cilksan / Cilkscale) also produced non-deterministic output, but it seems to have been fixed since then.
The text was updated successfully, but these errors were encountered: