@@ -681,14 +681,12 @@ int mca_pml_yalla_mrecv(void *buf, size_t count, ompi_datatype_t *datatype,
681681int mca_pml_yalla_start (size_t count , ompi_request_t * * requests )
682682{
683683 mca_pml_yalla_base_request_t * req ;
684- mca_pml_yalla_send_request_t * sreq ;
685684 mxm_error_t error ;
686685 size_t i ;
687686 int rc ;
688687
689688 for (i = 0 ; i < count ; ++ i ) {
690689 req = (mca_pml_yalla_base_request_t * )requests [i ];
691- sreq = (mca_pml_yalla_send_request_t * )req ;
692690
693691 if ((req == NULL ) || (OMPI_REQUEST_PML != req -> ompi .req_type )) {
694692 /* Skip irrelevant requests */
@@ -697,9 +695,12 @@ int mca_pml_yalla_start(size_t count, ompi_request_t** requests)
697695
698696 PML_YALLA_ASSERT (req -> ompi .req_state != OMPI_REQUEST_INVALID );
699697 PML_YALLA_RESET_OMPI_REQ (& req -> ompi , OMPI_REQUEST_ACTIVE );
700- PML_YALLA_RESET_PML_REQ (req , PML_YALLA_MXM_REQBASE (sreq ));
701698
702699 if (req -> flags & MCA_PML_YALLA_REQUEST_FLAG_SEND ) {
700+ mca_pml_yalla_send_request_t * sreq ;
701+ sreq = (mca_pml_yalla_send_request_t * )req ;
702+ PML_YALLA_RESET_PML_REQ (req , PML_YALLA_MXM_REQBASE (sreq ));
703+
703704 if (req -> flags & MCA_PML_YALLA_REQUEST_FLAG_BSEND ) {
704705 PML_YALLA_VERBOSE (8 , "start bsend request %p" , (void * )sreq );
705706 rc = mca_pml_yalla_bsend (& sreq -> mxm );
@@ -716,8 +717,12 @@ int mca_pml_yalla_start(size_t count, ompi_request_t** requests)
716717 }
717718 }
718719 } else {
720+ mca_pml_yalla_recv_request_t * rreq ;
721+ rreq = (mca_pml_yalla_recv_request_t * )req ;
722+ PML_YALLA_RESET_PML_REQ (req , PML_YALLA_MXM_REQBASE (rreq ));
723+
719724 PML_YALLA_VERBOSE (8 , "start recv request %p" , (void * )req );
720- error = mxm_req_recv (& (( mca_pml_yalla_recv_request_t * ) req ) -> mxm );
725+ error = mxm_req_recv (& rreq -> mxm );
721726 if (MXM_OK != error ) {
722727 return OMPI_ERROR ;
723728 }
0 commit comments