Skip to content

Commit f7c2b2c

Browse files
authored
Merge pull request #2292 from ggouaillardet/topic/v2.x/pml_ob1_recv_request_type_reset
v2.x: pml/ob1: always reset recv request type
2 parents 85503c1 + a266d48 commit f7c2b2c

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
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

ompi/mca/pml/ob1/pml_ob1_recvreq.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,10 +1050,6 @@ int mca_pml_ob1_recv_request_schedule_once( mca_pml_ob1_recv_request_t* recvreq,
10501050
static inline void append_recv_req_to_queue(opal_list_t *queue,
10511051
mca_pml_ob1_recv_request_t *req)
10521052
{
1053-
if(OPAL_UNLIKELY(req->req_recv.req_base.req_type == MCA_PML_REQUEST_IPROBE ||
1054-
req->req_recv.req_base.req_type == MCA_PML_REQUEST_IMPROBE))
1055-
return;
1056-
10571053
opal_list_append(queue, (opal_list_item_t*)req);
10581054

10591055
/**
@@ -1204,7 +1200,7 @@ void mca_pml_ob1_recv_req_start(mca_pml_ob1_recv_request_t *req)
12041200
req->req_recv.req_base.req_proc = proc->ompi_proc;
12051201
frag = recv_req_match_specific_proc(req, proc);
12061202
queue = &proc->specific_receives;
1207-
/* wild cardrecv will be prepared on match */
1203+
/* wildcard recv will be prepared on match */
12081204
prepare_recv_req_converter(req);
12091205
}
12101206

@@ -1213,7 +1209,9 @@ void mca_pml_ob1_recv_req_start(mca_pml_ob1_recv_request_t *req)
12131209
&(req->req_recv.req_base), PERUSE_RECV);
12141210
/* We didn't find any matches. Record this irecv so we can match
12151211
it when the message comes in. */
1216-
append_recv_req_to_queue(queue, req);
1212+
if(OPAL_LIKELY(req->req_recv.req_base.req_type != MCA_PML_REQUEST_IPROBE &&
1213+
req->req_recv.req_base.req_type != MCA_PML_REQUEST_IMPROBE))
1214+
append_recv_req_to_queue(queue, req);
12171215
req->req_match_received = false;
12181216
OB1_MATCHING_UNLOCK(&ob1_comm->matching_lock);
12191217
} else {

0 commit comments

Comments
 (0)