Skip to content

Commit 0404acd

Browse files
committed
pml/ob1: correctly reset receive request type before init
recvreq->req_recv.req_base.req_type should always be set before invoking MCA_PML_OB1_RECV_REQUEST_INIT(recvreq, ...) otherwise, the previous type might be set, and you could end up with MPC_PML_REQUEST_IMPROBE when MCA_PML_REQUEST_RECV is expected. Thanks Chris Pattison for the report and test case. Fixes #2275 (cherry picked from commit 4a886ac) Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent 43937a5 commit 0404acd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ompi/mca/pml/ob1/pml_ob1_irecv.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
* reserved.
1515
* Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
1616
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
17-
* Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
17+
* Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
18+
* Copyright (c) 2016 Research Organization for Information Science
19+
* and Technology (RIST). All rights reserved.
1820
* $COPYRIGHT$
1921
*
2022
* Additional copyrights may follow
@@ -51,6 +53,7 @@ int mca_pml_ob1_irecv_init(void *addr,
5153
if (NULL == recvreq)
5254
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
5355

56+
recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_RECV;
5457
MCA_PML_OB1_RECV_REQUEST_INIT(recvreq,
5558
addr,
5659
count, datatype, src, tag, comm, true);
@@ -76,6 +79,7 @@ int mca_pml_ob1_irecv(void *addr,
7679
if (NULL == recvreq)
7780
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
7881

82+
recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_RECV;
7983
MCA_PML_OB1_RECV_REQUEST_INIT(recvreq,
8084
addr,
8185
count, datatype, src, tag, comm, false);
@@ -112,6 +116,7 @@ int mca_pml_ob1_recv(void *addr,
112116
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
113117
}
114118

119+
recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_RECV;
115120
MCA_PML_OB1_RECV_REQUEST_INIT(recvreq, addr, count, datatype,
116121
src, tag, comm, false);
117122

0 commit comments

Comments
 (0)