Skip to content

Commit 1f291c8

Browse files
committed
Add the fragment to the unexpected frags only after extracting the
pml_proc.
1 parent 68ac950 commit 1f291c8

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

ompi/mca/pml/ob1/pml_ob1.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,6 @@ int mca_pml_ob1_add_comm(ompi_communicator_t* comm)
225225
* non_existing_communicator_pending list. */
226226
opal_list_remove_item (&mca_pml_ob1.non_existing_communicator_pending,
227227
(opal_list_item_t *) frag);
228-
if (OMPI_COMM_CHECK_ASSERT_ALLOW_OVERTAKE(comm)) {
229-
opal_list_append( &pml_proc->unexpected_frags, (opal_list_item_t*)frag );
230-
PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_MSG_INSERT_IN_UNEX_Q, comm,
231-
hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV);
232-
continue;
233-
}
234-
235-
add_fragment_to_unexpected:
236228

237229
/* We generate the MSG_ARRIVED event as soon as the PML is aware
238230
* of a matching fragment arrival. Independing if it is received
@@ -251,6 +243,15 @@ int mca_pml_ob1_add_comm(ompi_communicator_t* comm)
251243
*/
252244
pml_proc = mca_pml_ob1_peer_lookup(comm, hdr->hdr_src);
253245

246+
if (OMPI_COMM_CHECK_ASSERT_ALLOW_OVERTAKE(comm)) {
247+
opal_list_append( &pml_proc->unexpected_frags, (opal_list_item_t*)frag );
248+
PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_MSG_INSERT_IN_UNEX_Q, comm,
249+
hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV);
250+
continue;
251+
}
252+
253+
add_fragment_to_unexpected:
254+
254255
if (((uint16_t)hdr->hdr_seq) == ((uint16_t)pml_proc->expected_sequence) ) {
255256
/* We're now expecting the next sequence number. */
256257
pml_proc->expected_sequence++;

0 commit comments

Comments
 (0)