Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] Potential ob1 bug
From: Hjelm, Nathan T (hjelmn_at_[hidden])
Date: 2012-05-01 10:55:34


Ran across a problem in a failure path of start_prepare in ob1. If prepare_src succeed but send fails the send request convertor needs to be rolled back to the correct position. Can someone with more knowledge of ob1 check if this is indeed an error. Patch is below.

-Nathan

diff --git a/ompi/mca/pml/ob1/pml_ob1_sendreq.c b/ompi/mca/pml/ob1/pml_ob1_sendreq.c
index 2a8ac03..5505918 100644
--- a/ompi/mca/pml/ob1/pml_ob1_sendreq.c
+++ b/ompi/mca/pml/ob1/pml_ob1_sendreq.c
@@ -570,6 +570,7 @@ int mca_pml_ob1_send_request_start_prepare( mca_pml_ob1_send_request_t* sendreq,
                                             mca_bml_base_btl_t* bml_btl,
                                             size_t size )
 {
+ size_t old_position = sendreq->req_send.req_base.req_convertor.bConverted;
     mca_btl_base_descriptor_t* des;
     mca_btl_base_segment_t* segment;
     mca_pml_ob1_hdr_t* hdr;
@@ -614,6 +615,9 @@ int mca_pml_ob1_send_request_start_prepare( mca_pml_ob1_send_request_t* sendreq,
         return OMPI_SUCCESS;
     }
     mca_bml_base_free(bml_btl, des );
+
+ opal_convertor_set_position(&sendreq->req_send.req_base.req_convertor,
+ &old_position);
     return rc;
 }