If we're locking the local window, need to wait until the lock returns.
This commit was SVN r26234.
Этот коммит содержится в:
родитель
d1571b027a
Коммит
d46d55ee9b
@ -427,6 +427,16 @@ ompi_osc_pt2pt_module_lock(int lock_type,
|
||||
ompi_comm_rank(module->p2p_comm),
|
||||
lock_type);
|
||||
|
||||
if (ompi_comm_rank(module->p2p_comm) == target) {
|
||||
/* If we're trying to lock locally, have to wait to actually
|
||||
acquire the lock */
|
||||
OPAL_THREAD_LOCK(&module->p2p_lock);
|
||||
while (module->p2p_lock_received_ack == 0) {
|
||||
opal_condition_wait(&module->p2p_cond, &module->p2p_lock);
|
||||
}
|
||||
OPAL_THREAD_UNLOCK(&module->p2p_lock);
|
||||
}
|
||||
|
||||
/* return */
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -524,6 +524,16 @@ ompi_osc_rdma_module_lock(int lock_type,
|
||||
|
||||
module->m_eager_send_active = false;
|
||||
|
||||
if (ompi_comm_rank(module->m_comm) == target) {
|
||||
/* If we're trying to lock locally, have to wait to actually
|
||||
acquire the lock */
|
||||
OPAL_THREAD_LOCK(&module->m_lock);
|
||||
while (module->m_lock_received_ack == 0) {
|
||||
opal_condition_wait(&module->m_cond, &module->m_lock);
|
||||
}
|
||||
OPAL_THREAD_UNLOCK(&module->m_lock);
|
||||
}
|
||||
|
||||
/* return */
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user