- let the pt2pt component compile with threads enabled
This commit was SVN r14725.
Этот коммит содержится в:
родитель
b2219710d4
Коммит
88f0845c44
@ -733,9 +733,9 @@ component_thread_fn(opal_object_t *obj)
|
||||
/* wake up whenever a request completes, to make sure it's not
|
||||
for us */
|
||||
waittime.tv_sec = 1;
|
||||
waittime.tv_usec = 0;
|
||||
waittime.tv_nsec = 0;
|
||||
OPAL_THREAD_LOCK(&ompi_request_lock);
|
||||
opal_condition_timedwait(&ompi_request_cond, &ompi_request_lock);
|
||||
opal_condition_timedwait(&ompi_request_cond, &ompi_request_lock, &waittime);
|
||||
OPAL_THREAD_UNLOCK(&ompi_request_lock);
|
||||
ompi_osc_pt2pt_component_progress();
|
||||
}
|
||||
|
@ -93,9 +93,9 @@ ompi_osc_pt2pt_sendreq_send_long_cb(ompi_osc_pt2pt_mpireq_t *mpireq)
|
||||
sendreq->req_module->p2p_comm->c_my_rank,
|
||||
sendreq->req_target_rank));
|
||||
|
||||
OPAL_THREAD_LOCK(&module->p2p_lock);
|
||||
OPAL_THREAD_LOCK(&sendreq->req_module->p2p_lock);
|
||||
count = (sendreq->req_module->p2p_num_pending_out -= 1);
|
||||
OPAL_THREAD_UNLOCK(&module->p2p_lock);
|
||||
OPAL_THREAD_UNLOCK(&sendreq->req_module->p2p_lock);
|
||||
|
||||
ompi_osc_pt2pt_longreq_free(longreq);
|
||||
ompi_osc_pt2pt_sendreq_free(sendreq);
|
||||
@ -131,9 +131,9 @@ ompi_osc_pt2pt_sendreq_send_cb(ompi_osc_pt2pt_mpireq_t *mpireq)
|
||||
/* do we need to post a send? */
|
||||
if (header->hdr_msg_length != 0) {
|
||||
/* sendreq is done. Mark it as so and get out of here */
|
||||
OPAL_THREAD_LOCK(&module->p2p_lock);
|
||||
OPAL_THREAD_LOCK(&sendreq->req_module->p2p_lock);
|
||||
count = (sendreq->req_module->p2p_num_pending_out -= 1);
|
||||
OPAL_THREAD_UNLOCK(&module->p2p_lock);
|
||||
OPAL_THREAD_UNLOCK(&sendreq->req_module->p2p_lock);
|
||||
ompi_osc_pt2pt_sendreq_free(sendreq);
|
||||
if (0 == count) opal_condition_broadcast(&sendreq->req_module->p2p_cond);
|
||||
}
|
||||
@ -728,9 +728,9 @@ ompi_osc_pt2pt_replyreq_recv_long_cb(ompi_osc_pt2pt_mpireq_t *mpireq)
|
||||
(ompi_osc_pt2pt_sendreq_t*) longreq->mpireq.cbdata;
|
||||
int32_t count;
|
||||
|
||||
OPAL_THREAD_LOCK(&module->p2p_lock);
|
||||
OPAL_THREAD_LOCK(&sendreq->req_module->p2p_lock);
|
||||
count = (sendreq->req_module->p2p_num_pending_out -= 1);
|
||||
OPAL_THREAD_UNLOCK(&module->p2p_lock);
|
||||
OPAL_THREAD_UNLOCK(&sendreq->req_module->p2p_lock);
|
||||
|
||||
ompi_osc_pt2pt_longreq_free(longreq);
|
||||
ompi_osc_pt2pt_sendreq_free(sendreq);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user