-
Notifications
You must be signed in to change notification settings - Fork 48
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
abs
undefined within device block
#435
Comments
test case aomp/test/smoke-fails/issue-435 |
This needs to be resolved in 16.0-2 |
This example compiles fine with latest clang++ but not with clang. Will investigate. |
The fix is waiting to be merged, the updated test is here: #438 |
First, your example has a simple serious bug which will cause a memory fault once we fix the problem with missing integer abs. Since array does not have negative indices, Change this line. array[i] += array[(int)abs(i)]; to array[abs(i)] += array[(int)abs(i)]; Ok, now regarding this missing abs() in c.Sorry, that this is taking so long to fix. It turns out to be a problem with our header library which needs to work for c and c++. I don't know why they only defined abs, labs, and llabs only for cpluplus in the header. I also don't understand why the c++ header definitions are so complicated. This patch will fix your problem and will be in 16.0-3. Just apply this to the installation of AOMP or ROCm compiler
Also, your example has a simple serious bug. You need to add abs(i) |
@doru1004 I will fix our smoke-fails test and submit gerrit review for 16.0-3 |
My apologies for that, I merely made that example to trigger the compilation error and did not check whether it was valid to run it or not. Thank you for fixing it. Will give it a try with 16.0-3, thanks. |
@gregrodgers @mloubout the fix for the test itself is here: #438 |
Hi
I am one of the Devito developers and we ran into an issue when
abs
is used within a device block. Is it something with the code generated?MFE:
Error:
The text was updated successfully, but these errors were encountered: