1
1
This commit reverted pr #6199 as it introduced deadlock in some cases.
Also removed the assert as the condition is obsoleted.

Signed-off-by: Thananon Patinyasakdikul <tpatinya@utk.edu>
Этот коммит содержится в:
Thananon Patinyasakdikul 2019-01-29 13:34:44 -05:00
родитель d1fd1f4cce
Коммит 56d3e0a43d

Просмотреть файл

@ -47,7 +47,6 @@ int ompi_sync_wait_mt(ompi_wait_sync_t *sync)
} }
/* Insert sync on the list of pending synchronization constructs */ /* Insert sync on the list of pending synchronization constructs */
if (num_thread_in_progress >= opal_max_thread_in_progress) {
OPAL_THREAD_LOCK(&wait_sync_lock); OPAL_THREAD_LOCK(&wait_sync_lock);
if( NULL == wait_sync_list ) { if( NULL == wait_sync_list ) {
sync->next = sync->prev = sync; sync->next = sync->prev = sync;
@ -59,7 +58,6 @@ int ompi_sync_wait_mt(ompi_wait_sync_t *sync)
wait_sync_list->prev = sync; wait_sync_list->prev = sync;
} }
OPAL_THREAD_UNLOCK(&wait_sync_lock); OPAL_THREAD_UNLOCK(&wait_sync_lock);
}
/** /**
* If we are not responsible for progresing, go silent until something worth noticing happen: * If we are not responsible for progresing, go silent until something worth noticing happen:
@ -91,13 +89,8 @@ int ompi_sync_wait_mt(ompi_wait_sync_t *sync)
} }
OPAL_THREAD_ADD_FETCH32(&num_thread_in_progress, -1); OPAL_THREAD_ADD_FETCH32(&num_thread_in_progress, -1);
if (NULL != wait_sync_list) {
assert(sync == wait_sync_list);
}
i_am_done: i_am_done:
/* My sync is now complete. Trim the list: remove self, wake next */ /* My sync is now complete. Trim the list: remove self, wake next */
if (num_thread_in_progress >= opal_max_thread_in_progress) {
OPAL_THREAD_LOCK(&wait_sync_lock); OPAL_THREAD_LOCK(&wait_sync_lock);
sync->prev->next = sync->next; sync->prev->next = sync->next;
sync->next->prev = sync->prev; sync->next->prev = sync->prev;
@ -108,6 +101,6 @@ int ompi_sync_wait_mt(ompi_wait_sync_t *sync)
WAIT_SYNC_PASS_OWNERSHIP(wait_sync_list); WAIT_SYNC_PASS_OWNERSHIP(wait_sync_list);
} }
OPAL_THREAD_UNLOCK(&wait_sync_lock); OPAL_THREAD_UNLOCK(&wait_sync_lock);
}
return (0 == sync->status) ? OPAL_SUCCESS : OPAL_ERROR; return (0 == sync->status) ? OPAL_SUCCESS : OPAL_ERROR;
} }