From a514cdc068ff4e352806f233a3b30e75272c46d3 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Mon, 26 Jun 2006 19:00:07 +0000 Subject: [PATCH] Always limit the size of the RDMA transfer to the maximum amount supported by the BTL (btl_max_rdma_size). Now the PUT protocol is pipelined even if there is just one network between the 2 peers. Unfortunately, this problem is present the 1.1 (no pipeline for the PUT protocol). This commit was SVN r10499. --- ompi/mca/pml/ob1/pml_ob1_recvreq.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/ompi/mca/pml/ob1/pml_ob1_recvreq.c b/ompi/mca/pml/ob1/pml_ob1_recvreq.c index 29d0a400e7..46405a3dac 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvreq.c +++ b/ompi/mca/pml/ob1/pml_ob1_recvreq.c @@ -220,9 +220,8 @@ static void mca_pml_ob1_recv_request_ack( if(recvreq->req_rdma_offset > hdr->hdr_msg_length) { recvreq->req_rdma_offset = hdr->hdr_msg_length; } else { - ompi_convertor_set_position( - &recvreq->req_recv.req_convertor, - &recvreq->req_rdma_offset); + ompi_convertor_set_position( &recvreq->req_recv.req_convertor, + &recvreq->req_rdma_offset ); } @@ -236,9 +235,8 @@ static void mca_pml_ob1_recv_request_ack( if(recvreq->req_rdma_offset < recvreq->req_bytes_received) { recvreq->req_rdma_offset = recvreq->req_bytes_received; } - ompi_convertor_set_position( - &recvreq->req_recv.req_convertor, - &recvreq->req_rdma_offset); + ompi_convertor_set_position( &recvreq->req_recv.req_convertor, + &recvreq->req_rdma_offset ); } } } @@ -442,6 +440,9 @@ static void mca_pml_ob1_recv_request_rget( descriptor->des_cbdata = frag; descriptor->des_cbfunc = mca_pml_ob1_rget_completion; + PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_XFER_CONTINUE, + &(recvreq->req_recv.req_base), PERUSE_RECV ); + /* queue up get request */ rc = mca_bml_base_get(bml_btl,descriptor); if(rc != OMPI_SUCCESS) { @@ -635,6 +636,10 @@ void mca_pml_ob1_recv_request_schedule(mca_pml_ob1_recv_request_t* recvreq) } else { size = (size_t)(bml_btl->btl_weight * bytes_remaining); } + /* makes sure that we don't exceed BTL max rdma size */ + if( size > bml_btl->btl_max_rdma_size ) { + size = bml_btl->btl_max_rdma_size; + } /* This is the first time we're trying to complete an RDMA pipeline message. If this is the first put request (ei, we're the only BTL or the @@ -645,7 +650,6 @@ void mca_pml_ob1_recv_request_schedule(mca_pml_ob1_recv_request_t* recvreq) } else { ack = false; } - } else { char* base; long lb; @@ -753,6 +757,9 @@ void mca_pml_ob1_recv_request_schedule(mca_pml_ob1_recv_request_t* recvreq) recvreq->req_rdma_offset += size; OPAL_THREAD_ADD_SIZE_T(&recvreq->req_pipeline_depth,1); + PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_XFER_CONTINUE, + &(recvreq->req_recv.req_base), PERUSE_RECV ); + /* send rdma request to peer */ rc = mca_bml_base_send(bml_btl, ctl, MCA_BTL_TAG_PML); if(rc == OMPI_SUCCESS) {