Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit 5a17341

Browse files
abouteillerggouaillardet
authored andcommitted
Do not return MPI_ERR_PENDING from collectives.
(cherry picked from commit open-mpi/ompi@c98e97a)
1 parent 010b663 commit 5a17341

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

ompi/mca/coll/base/coll_base_barrier.c

Lines changed: 4 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-2015 The University of Tennessee and The University
6+
* Copyright (c) 2004-2016 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,
@@ -61,13 +61,14 @@ ompi_coll_base_sendrecv_zero(int dest, int stag,
6161
if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }
6262

6363
err = ompi_request_wait_all( 2, reqs, statuses );
64-
if( MPI_ERR_IN_STATUS == err ) {
64+
if( MPI_ERR_IN_STATUS == err ) { line = __LINE__;
6565
/* As we use wait_all we will get MPI_ERR_IN_STATUS which is not an error
6666
* code that we can propagate up the stack. Instead, look for the real
6767
* error code from the MPI_ERROR in the status.
6868
*/
6969
int err_index = 0;
70-
if( MPI_SUCCESS == statuses[0].MPI_ERROR ) {
70+
if( MPI_SUCCESS == statuses[0].MPI_ERROR
71+
|| MPI_ERR_PENDING == statuses[0].MPI_ERROR ) {
7172
err_index = 1;
7273
}
7374
err = statuses[err_index].MPI_ERROR;

ompi/mca/coll/base/coll_base_util.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
33
* University Research and Technology
44
* Corporation. All rights reserved.
5-
* Copyright (c) 2004-2015 The University of Tennessee and The University
5+
* Copyright (c) 2004-2016 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
88
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@@ -64,13 +64,14 @@ int ompi_coll_base_sendrecv_nonzero_actual( void* sendbuf, size_t scount,
6464

6565
if (0 != nreqs) {
6666
err = ompi_request_wait_all( nreqs, reqs, statuses );
67-
if( MPI_ERR_IN_STATUS == err ) {
67+
if( MPI_ERR_IN_STATUS == err ) { line == __LINE__;
6868
/* As we use wait_all we will get MPI_ERR_IN_STATUS which is not an error
6969
* code that we can propagate up the stack. Instead, look for the real
7070
* error code from the MPI_ERROR in the status.
7171
*/
7272
int err_index = 0;
73-
if( MPI_SUCCESS == statuses[0].MPI_ERROR ) {
73+
if( MPI_SUCCESS == statuses[0].MPI_ERROR
74+
|| MPI_ERR_PENDING == statuses[0].MPI_ERROR ) {
7475
err_index = 1;
7576
}
7677
if (MPI_STATUS_IGNORE != status) {

0 commit comments

Comments
 (0)