From a4619b1a1179e92cc52596a5b88303689f92f9c8 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Fri, 10 Feb 2006 21:14:08 +0000 Subject: [PATCH] Remove a compilation warning from the RDMA engine. Correct the problem introduced by the commit 8933 (thanks Tim). In order to avoid to much trafic on the bus we do not compute the bytes_delivered (require an atomic size_t add) we have to set it in the begining or otherwise we will report the wrong count in the MPI status. This commit was SVN r8968. --- ompi/mca/pml/ob1/pml_ob1_recvreq.c | 2 +- ompi/mca/pml/ob1/pml_ob1_recvreq.h | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/ompi/mca/pml/ob1/pml_ob1_recvreq.c b/ompi/mca/pml/ob1/pml_ob1_recvreq.c index 65d8fc1a4e..614d989d89 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvreq.c +++ b/ompi/mca/pml/ob1/pml_ob1_recvreq.c @@ -661,7 +661,7 @@ void mca_pml_ob1_recv_request_schedule(mca_pml_ob1_recv_request_t* recvreq) /* lookup and/or create a cached registration */ ompi_ddt_type_lb(recvreq->req_recv.req_convertor.pDesc, &lb); base = recvreq->req_recv.req_convertor.pBaseBuf + lb + recvreq->req_rdma_offset; - reg = mca_pml_ob1_rdma_register(bml_btl, base, size); + reg = mca_pml_ob1_rdma_register(bml_btl, (unsigned char*)base, size); release = true; } } diff --git a/ompi/mca/pml/ob1/pml_ob1_recvreq.h b/ompi/mca/pml/ob1/pml_ob1_recvreq.h index d62406e878..847479a86e 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvreq.h +++ b/ompi/mca/pml/ob1/pml_ob1_recvreq.h @@ -194,18 +194,20 @@ do { * */ -#define MCA_PML_OB1_RECV_REQUEST_MATCHED( request, hdr ) \ -do { \ - (request)->req_recv.req_base.req_ompi.req_status.MPI_TAG = (hdr)->hdr_tag; \ - (request)->req_recv.req_base.req_ompi.req_status.MPI_SOURCE = (hdr)->hdr_src; \ - if((request)->req_recv.req_bytes_packed != 0) { \ - ompi_convertor_copy_and_prepare_for_recv( \ - (request)->req_recv.req_base.req_proc->proc_convertor, \ - (request)->req_recv.req_base.req_datatype, \ - (request)->req_recv.req_base.req_count, \ - (request)->req_recv.req_base.req_addr, \ - &(request)->req_recv.req_convertor ); \ - } \ +#define MCA_PML_OB1_RECV_REQUEST_MATCHED( request, hdr ) \ +do { \ + (request)->req_recv.req_base.req_ompi.req_status.MPI_TAG = (hdr)->hdr_tag; \ + (request)->req_recv.req_base.req_ompi.req_status.MPI_SOURCE = (hdr)->hdr_src; \ + if((request)->req_recv.req_bytes_packed != 0) { \ + ompi_convertor_copy_and_prepare_for_recv( \ + (request)->req_recv.req_base.req_proc->proc_convertor, \ + (request)->req_recv.req_base.req_datatype, \ + (request)->req_recv.req_base.req_count, \ + (request)->req_recv.req_base.req_addr, \ + &(request)->req_recv.req_convertor ); \ + ompi_convertor_get_unpacked_size( &(request)->req_recv.req_convertor, \ + &(request)->req_bytes_delivered ); \ + } \ } while (0)