@@ -1717,30 +1717,31 @@ int ompi_osc_pt2pt_irecv_w_cb (void *ptr, int count, ompi_datatype_t *datatype,
17171717 ompi_communicator_t * comm , ompi_request_t * * request_out ,
17181718 ompi_request_complete_fn_t cb , void * ctx )
17191719{
1720- ompi_request_t * request ;
1720+ ompi_request_t * dummy ;
17211721 int ret ;
17221722
1723+ if (NULL == request_out ) {
1724+ request_out = & dummy ;
1725+ }
1726+
17231727 OPAL_OUTPUT_VERBOSE ((50 , ompi_osc_base_framework .framework_output ,
17241728 "osc pt2pt: ompi_osc_pt2pt_irecv_w_cb receiving %d bytes from %d with tag %d" ,
17251729 count , target , tag ));
17261730
1727- ret = MCA_PML_CALL (irecv_init (ptr , count , datatype , target , tag , comm , & request ));
1731+ ret = MCA_PML_CALL (irecv_init (ptr , count , datatype , target , tag , comm , request_out ));
17281732 if (OMPI_SUCCESS != ret ) {
17291733 OPAL_OUTPUT_VERBOSE ((50 , ompi_osc_base_framework .framework_output ,
17301734 "error posting receive. ret = %d" , ret ));
17311735 return ret ;
17321736 }
17331737
1734- request -> req_complete_cb = cb ;
1735- request -> req_complete_cb_data = ctx ;
1738+ ( * request_out ) -> req_complete_cb = cb ;
1739+ ( * request_out ) -> req_complete_cb_data = ctx ;
17361740
1737- ret = MCA_PML_CALL (start (1 , & request ));
1738- if (request_out && MPI_REQUEST_NULL != request ) {
1739- * request_out = request ;
1740- }
1741+ ret = MCA_PML_CALL (start (1 , request_out ));
17411742
17421743 OPAL_OUTPUT_VERBOSE ((50 , ompi_osc_base_framework .framework_output ,
1743- "osc pt2pt: pml start returned %d. state: %d " , ret , request -> req_state ));
1744+ "osc pt2pt: pml start returned %d" , ret ));
17441745
17451746 return ret ;
17461747}
0 commit comments