Skip to content

Commit bc973ca

Browse files
committed
fix
1 parent 7d96f12 commit bc973ca

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

ompi/mca/pml/yalla/pml_yalla.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -681,14 +681,12 @@ int mca_pml_yalla_mrecv(void *buf, size_t count, ompi_datatype_t *datatype,
681681
int 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
}

ompi/mca/pml/yalla/pml_yalla_request.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static inline void mca_pml_yalla_request_release(mca_pml_yalla_base_request_t *r
3434
static inline int
3535
mca_pml_yalla_check_request_state(mca_pml_yalla_base_request_t *req, mxm_req_base_t *mxm_base)
3636
{
37-
if ( mxm_base->state != MXM_REQ_COMPLETED) {
37+
if (mxm_base->state != MXM_REQ_COMPLETED) {
3838
PML_YALLA_VERBOSE(8, "request %p free called before completed", (void*)req);
3939
req->flags |= MCA_PML_YALLA_REQUEST_FLAG_FREE_CALLED;
4040
return 0;

0 commit comments

Comments
 (0)