Skip to content

Commit 152ca59

Browse files
committed
mpi_assert_allow_overtake should only apply to application-level messages
The ob1 PML supports the allow-overtake info key, which disables message ordering. Internal communication (e.g., collective operations) may rely on ordering so we have to make sure they are always ordered even if the user set the allow-overtaking info. Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
1 parent 9c12f2a commit 152ca59

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

ompi/mca/pml/ob1/pml_ob1_isend.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
44
* University Research and Technology
55
* Corporation. All rights reserved.
6-
* Copyright (c) 2004-2018 The University of Tennessee and The University
6+
* Copyright (c) 2004-2022 The University of Tennessee and The University
77
* of Tennessee Research Foundation. All rights
88
* reserved.
99
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@@ -170,7 +170,7 @@ int mca_pml_ob1_isend(const void *buf,
170170
return OMPI_ERR_UNREACH;
171171
}
172172

173-
if (!OMPI_COMM_CHECK_ASSERT_ALLOW_OVERTAKE(comm)) {
173+
if (!OMPI_COMM_CHECK_ASSERT_ALLOW_OVERTAKE(comm) || 0 > tag) {
174174
seqn = (uint16_t) OPAL_THREAD_ADD_FETCH32(&ob1_proc->send_sequence, 1);
175175
}
176176

@@ -274,7 +274,7 @@ int mca_pml_ob1_send(const void *buf,
274274
return OMPI_SUCCESS;
275275
}
276276

277-
if (!OMPI_COMM_CHECK_ASSERT_ALLOW_OVERTAKE(comm)) {
277+
if (!OMPI_COMM_CHECK_ASSERT_ALLOW_OVERTAKE(comm) || 0 > tag) {
278278
seqn = (uint16_t) OPAL_THREAD_ADD_FETCH32(&ob1_proc->send_sequence, 1);
279279
}
280280

ompi/mca/pml/ob1/pml_ob1_recvfrag.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
44
* University Research and Technology
55
* Corporation. All rights reserved.
6-
* Copyright (c) 2004-2019 The University of Tennessee and The University
6+
* Copyright (c) 2004-2022 The University of Tennessee and The University
77
* of Tennessee Research Foundation. All rights
88
* reserved.
99
* Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
@@ -370,7 +370,7 @@ int mca_pml_ob1_revoke_comm( struct ompi_communicator_t* ompi_comm, bool coll_on
370370
/* note this is not an ompi_proc, but a ob1_comm_proc, thus we don't
371371
* use ompi_proc_is_sentinel to verify if initialized. */
372372
if( NULL == proc ) continue;
373-
/* remove the frag from the unexpected list, add to the nack list
373+
/* remove the frag from the unexpected list, add to the nack list
374374
* so that we can send the nack as needed to remote cancel the send
375375
* from outside the match lock.
376376
*/
@@ -385,7 +385,7 @@ int mca_pml_ob1_revoke_comm( struct ompi_communicator_t* ompi_comm, bool coll_on
385385
}
386386
}
387387
/* same for the cantmatch queue/heap; this list is more complicated
388-
* Keep it simple: we pop all of the complex list, put the bad items
388+
* Keep it simple: we pop all of the complex list, put the bad items
389389
* in the nack_list, and keep the good items in the keep_list;
390390
* then we reinsert the good items in the cantmatch heaplist */
391391
mca_pml_ob1_recv_frag_t* frag;
@@ -519,7 +519,7 @@ void mca_pml_ob1_recv_frag_callback_match (mca_btl_base_module_t *btl,
519519
}
520520
#endif
521521

522-
if (!OMPI_COMM_CHECK_ASSERT_ALLOW_OVERTAKE(comm_ptr)) {
522+
if (!OMPI_COMM_CHECK_ASSERT_ALLOW_OVERTAKE(comm_ptr) || 0 > hdr->hdr_tag) {
523523
/* get sequence number of next message that can be processed.
524524
* If this frag is out of sequence, queue it up in the list
525525
* now as we still have the lock.
@@ -1092,7 +1092,7 @@ static int mca_pml_ob1_recv_frag_match (mca_btl_base_module_t *btl,
10921092
frag_msg_seq = hdr->hdr_seq;
10931093
next_msg_seq_expected = (uint16_t)proc->expected_sequence;
10941094

1095-
if (!OMPI_COMM_CHECK_ASSERT_ALLOW_OVERTAKE(comm_ptr)) {
1095+
if (!OMPI_COMM_CHECK_ASSERT_ALLOW_OVERTAKE(comm_ptr) || 0 > hdr->hdr_tag) {
10961096
/* If the sequence number is wrong, queue it up for later. */
10971097
if(OPAL_UNLIKELY(frag_msg_seq != next_msg_seq_expected)) {
10981098
mca_pml_ob1_recv_frag_t* frag;

0 commit comments

Comments
 (0)