@@ -1718,30 +1718,31 @@ int ompi_osc_pt2pt_irecv_w_cb (void *ptr, int count, ompi_datatype_t *datatype,
17181718                              ompi_communicator_t  * comm , ompi_request_t  * * request_out ,
17191719                              ompi_request_complete_fn_t  cb , void  * ctx )
17201720{
1721-     ompi_request_t  * request ;
1721+     ompi_request_t  * dummy ;
17221722    int  ret ;
17231723
1724+     if  (NULL  ==  request_out ) {
1725+         request_out  =  & dummy ;
1726+     }
1727+ 
17241728    OPAL_OUTPUT_VERBOSE ((50 , ompi_osc_base_framework .framework_output ,
17251729                         "osc pt2pt: ompi_osc_pt2pt_irecv_w_cb receiving %d bytes from %d with tag %d" ,
17261730                         count , target , tag ));
17271731
1728-     ret  =  MCA_PML_CALL (irecv_init (ptr , count , datatype , target , tag , comm , & request ));
1732+     ret  =  MCA_PML_CALL (irecv_init (ptr , count , datatype , target , tag , comm , request_out ));
17291733    if  (OMPI_SUCCESS  !=  ret ) {
17301734        OPAL_OUTPUT_VERBOSE ((50 , ompi_osc_base_framework .framework_output ,
17311735                             "error posting receive. ret = %d" , ret ));
17321736        return  ret ;
17331737    }
17341738
1735-     request -> req_complete_cb  =  cb ;
1736-     request -> req_complete_cb_data  =  ctx ;
1739+     ( * request_out ) -> req_complete_cb  =  cb ;
1740+     ( * request_out ) -> req_complete_cb_data  =  ctx ;
17371741
1738-     ret  =  MCA_PML_CALL (start (1 , & request ));
1739-     if  (request_out  &&  MPI_REQUEST_NULL  !=  request ) {
1740-         * request_out  =  request ;
1741-     }
1742+     ret  =  MCA_PML_CALL (start (1 , request_out ));
17421743
17431744    OPAL_OUTPUT_VERBOSE ((50 , ompi_osc_base_framework .framework_output ,
1744-                          "osc pt2pt: pml start returned %d. state: %d " , ret ,  request -> req_state ));
1745+                          "osc pt2pt: pml start returned %d" , ret ));
17451746
17461747    return  ret ;
17471748}
0 commit comments