From 765d2ffc29a9f022536b6998b32a0ef55d70a709 Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Wed, 22 Feb 2006 16:20:13 +0000 Subject: [PATCH] * the self btl should set the segment size field on alloc like the other btls * clean up duplicate free in long message accumulates that looks like it was a cut-n-paste error This commit was SVN r9112. --- ompi/mca/btl/self/btl_self.c | 1 + ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c | 16 ++++++---------- ompi/mca/osc/pt2pt/osc_pt2pt_sync.c | 4 ++-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/ompi/mca/btl/self/btl_self.c b/ompi/mca/btl/self/btl_self.c index ae4dd40f4b..08531ae559 100644 --- a/ompi/mca/btl/self/btl_self.c +++ b/ompi/mca/btl/self/btl_self.c @@ -156,6 +156,7 @@ extern mca_btl_base_descriptor_t* mca_btl_self_alloc( MCA_BTL_SELF_FRAG_ALLOC_SEND(frag,rc); } frag->base.des_flags = 0; + frag->segment.seg_len = size; return (mca_btl_base_descriptor_t*)frag; } diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c b/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c index ddbdbe5e09..0f2e745908 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c +++ b/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c @@ -538,6 +538,8 @@ ompi_osc_pt2pt_sendreq_recv_accum_long_cb(ompi_osc_pt2pt_longreq_t *longreq) /* lock the window for accumulates */ OPAL_THREAD_LOCK(&longreq->req_module->p2p_acc_lock); + opal_list_remove_item(&(longreq->req_module->p2p_long_msgs), &(longreq->super)); + /* copy the data from the temporary buffer into the user window */ ret = ompi_osc_pt2pt_process_op(longreq->req_module, header, @@ -548,6 +550,10 @@ ompi_osc_pt2pt_sendreq_recv_accum_long_cb(ompi_osc_pt2pt_longreq_t *longreq) /* unlock the window for accumulates */ OPAL_THREAD_UNLOCK(&longreq->req_module->p2p_acc_lock); + + opal_output(-1, "%d finished receiving long accum message from %d", + longreq->req_module->p2p_comm->c_my_rank, + header->hdr_origin); /* free the temp buffer */ free(longreq->req_comp_cbdata); @@ -558,17 +564,7 @@ ompi_osc_pt2pt_sendreq_recv_accum_long_cb(ompi_osc_pt2pt_longreq_t *longreq) OPAL_THREAD_ADD32(&(longreq->req_module->p2p_num_pending_in), -1); - opal_list_remove_item(&(longreq->req_module->p2p_long_msgs), &(longreq->super)); - - OBJ_RELEASE(longreq->req_datatype); - OBJ_RELEASE(longreq->req_op); ompi_osc_pt2pt_longreq_free(longreq); - - OPAL_THREAD_ADD32(&(longreq->req_module->p2p_num_pending_in), -1); - - opal_output(-1, "%d finished receiving long accum message from %d", - longreq->req_module->p2p_comm->c_my_rank, - header->hdr_origin); } diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt_sync.c b/ompi/mca/osc/pt2pt/osc_pt2pt_sync.c index bb3233694e..77bf840af9 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt_sync.c +++ b/ompi/mca/osc/pt2pt/osc_pt2pt_sync.c @@ -416,7 +416,7 @@ ompi_osc_pt2pt_module_lock(int lock_type, /* set our mode on the window */ ompi_win_set_mode(win, OMPI_WIN_ACCESS_EPOCH | OMPI_WIN_LOCK_ACCESS); - opal_output(0, "%d sending lock request to %d", + opal_output(-1, "%d sending lock request to %d", P2P_MODULE(win)->p2p_comm->c_my_rank, target); /* generate a lock request */ ompi_osc_pt2pt_control_send(P2P_MODULE(win), @@ -473,7 +473,7 @@ ompi_osc_pt2pt_module_unlock(int target, } /* send the unlock request */ - opal_output(0, "%d sending unlock request to %d", + opal_output(-1, "%d sending unlock request to %d", P2P_MODULE(win)->p2p_comm->c_my_rank, target); ompi_osc_pt2pt_control_send(P2P_MODULE(win), proc,