Skip to content

Commit b1aedf4

Browse files
Merge pull request #2283 from ggouaillardet/topic/pml_ob1_recv_request_type_reset
pml/ob1: correctly reset receive request type before init
2 parents 3e430ca + 8e788b5 commit b1aedf4

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);
@@ -82,6 +85,7 @@ int mca_pml_ob1_irecv(void *addr,
8285
if (NULL == recvreq)
8386
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
8487

88+
recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_RECV;
8589
MCA_PML_OB1_RECV_REQUEST_INIT(recvreq,
8690
addr,
8791
count, datatype, src, tag, comm, false);
@@ -118,6 +122,7 @@ int mca_pml_ob1_recv(void *addr,
118122
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
119123
}
120124

125+
recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_RECV;
121126
MCA_PML_OB1_RECV_REQUEST_INIT(recvreq, addr, count, datatype,
122127
src, tag, comm, false);
123128

ompi/mca/pml/ob1/pml_ob1_recvreq.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,10 +1048,6 @@ int mca_pml_ob1_recv_request_schedule_once( mca_pml_ob1_recv_request_t* recvreq,
10481048
static inline void append_recv_req_to_queue(opal_list_t *queue,
10491049
mca_pml_ob1_recv_request_t *req)
10501050
{
1051-
if(OPAL_UNLIKELY(req->req_recv.req_base.req_type == MCA_PML_REQUEST_IPROBE ||
1052-
req->req_recv.req_base.req_type == MCA_PML_REQUEST_IMPROBE))
1053-
return;
1054-
10551051
opal_list_append(queue, (opal_list_item_t*)req);
10561052

10571053
#if OMPI_WANT_PERUSE
@@ -1202,7 +1198,7 @@ void mca_pml_ob1_recv_req_start(mca_pml_ob1_recv_request_t *req)
12021198
req->req_recv.req_base.req_proc = proc->ompi_proc;
12031199
frag = recv_req_match_specific_proc(req, proc);
12041200
queue = &proc->specific_receives;
1205-
/* wild cardrecv will be prepared on match */
1201+
/* wildcard recv will be prepared on match */
12061202
prepare_recv_req_converter(req);
12071203
}
12081204

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

0 commit comments

Comments
 (0)