Skip to content

Argobots: Missing _Atomic qualifier in threads_argobots_mutex.c #7697

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

Closed
devreal opened this issue May 5, 2020 · 1 comment · Fixed by #7712
Closed

Argobots: Missing _Atomic qualifier in threads_argobots_mutex.c #7697

devreal opened this issue May 5, 2020 · 1 comment · Fixed by #7712
Assignees
Milestone

Comments

@devreal
Copy link
Contributor

devreal commented May 5, 2020

I tried building the Argobots integration with the current Clang trunk while testing #7675. Clang seems to be more strict about the _Atomic qualifier than GCC so the build fails:

../../../../../opal/mca/threads/argobots/threads_argobots_mutex.c:107:13: error: address argument to atomic operation must be a pointer to _Atomic type ('intptr_t *' (aka 'long *') invalid)
        if (opal_atomic_compare_exchange_strong_ptr(
            ^
../../../../../opal/include/opal/sys/atomic_stdc.h:91:71: note: expanded from macro 'opal_atomic_compare_exchange_strong_ptr'
#define opal_atomic_compare_exchange_strong_ptr(addr, compare, value) atomic_compare_exchange_strong_explicit (addr, compare, value, memory_order_relaxed, memory_order_relaxed)
                                                                      ^                                        ~~~~
/home/h4/jschuch/opt/clang-trunk/lib/clang/11.0.0/include/stdatomic.h:127:49: note: expanded from macro 'atomic_compare_exchange_strong_explicit'
#define atomic_compare_exchange_strong_explicit __c11_atomic_compare_exchange_strong
                                                ^
../../../../../opal/mca/threads/argobots/threads_argobots_mutex.c:124:13: error: address argument to atomic operation must be a pointer to _Atomic type ('intptr_t *' (aka 'long *') invalid)
        if (opal_atomic_compare_exchange_strong_ptr((intptr_t *)cond,
            ^                                       ~~~~~~~~~~~~~~~~
../../../../../opal/include/opal/sys/atomic_stdc.h:91:71: note: expanded from macro 'opal_atomic_compare_exchange_strong_ptr'
#define opal_atomic_compare_exchange_strong_ptr(addr, compare, value) atomic_compare_exchange_strong_explicit (addr, compare, value, memory_order_relaxed, memory_order_relaxed)
                                                                      ^                                        ~~~~
/home/h4/jschuch/opt/clang-trunk/lib/clang/11.0.0/include/stdatomic.h:127:49: note: expanded from macro 'atomic_compare_exchange_strong_explicit'
#define atomic_compare_exchange_strong_explicit __c11_atomic_compare_exchange_strong
                                                ^
2 errors generated.
@shintaro-iwasaki
Copy link
Contributor

shintaro-iwasaki commented May 6, 2020

Thanks for your report. I will create a PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants