diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt_component.c b/ompi/mca/osc/pt2pt/osc_pt2pt_component.c index 6a83d3b57a..57203c9def 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt_component.c +++ b/ompi/mca/osc/pt2pt/osc_pt2pt_component.c @@ -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(); } diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c b/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c index 7474f3ae4e..ca3c79a04d 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c +++ b/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c @@ -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);