We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31006fd commit ca79fa1Copy full SHA for ca79fa1
opal/mca/threads/wait_sync.h
@@ -145,9 +145,10 @@ OPAL_DECLSPEC void opal_threads_base_wait_sync_global_wakeup_mt(int status);
145
static inline void wait_sync_update(ompi_wait_sync_t *sync, int updates, int status)
146
{
147
if (OPAL_LIKELY(OPAL_SUCCESS == status)) {
148
- if (0 != (OPAL_THREAD_ADD_FETCH32(&sync->count, -updates))) {
+ if (1 != sync->count && 0 != (OPAL_THREAD_ADD_FETCH32(&sync->count, -updates))) {
149
return;
150
}
151
+ sync->count = 0;
152
} else {
153
/* this is an error path so just use the atomic */
154
sync->status = status;
0 commit comments