From c98e97a46e3d4d4ea55653922667cd805f5dc00c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bouteiller?= Date: Wed, 9 Mar 2016 16:07:10 -0500 Subject: [PATCH] Do not return MPI_ERR_PENDING from collectives. --- ompi/mca/coll/base/coll_base_barrier.c | 7 ++++--- ompi/mca/coll/base/coll_base_util.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ompi/mca/coll/base/coll_base_barrier.c b/ompi/mca/coll/base/coll_base_barrier.c index 3ce5102c09..09cd90fc9d 100644 --- a/ompi/mca/coll/base/coll_base_barrier.c +++ b/ompi/mca/coll/base/coll_base_barrier.c @@ -3,7 +3,7 @@ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2015 The University of Tennessee and The University + * Copyright (c) 2004-2016 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -61,13 +61,14 @@ ompi_coll_base_sendrecv_zero(int dest, int stag, if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; } err = ompi_request_wait_all( 2, reqs, statuses ); - if( MPI_ERR_IN_STATUS == err ) { + if( MPI_ERR_IN_STATUS == err ) { line = __LINE__; /* As we use wait_all we will get MPI_ERR_IN_STATUS which is not an error * code that we can propagate up the stack. Instead, look for the real * error code from the MPI_ERROR in the status. */ int err_index = 0; - if( MPI_SUCCESS == statuses[0].MPI_ERROR ) { + if( MPI_SUCCESS == statuses[0].MPI_ERROR + || MPI_ERR_PENDING == statuses[0].MPI_ERROR ) { err_index = 1; } err = statuses[err_index].MPI_ERROR; diff --git a/ompi/mca/coll/base/coll_base_util.c b/ompi/mca/coll/base/coll_base_util.c index a4e8c57cb8..711790db28 100644 --- a/ompi/mca/coll/base/coll_base_util.c +++ b/ompi/mca/coll/base/coll_base_util.c @@ -2,7 +2,7 @@ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2015 The University of Tennessee and The University + * Copyright (c) 2004-2016 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * 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, if (0 != nreqs) { err = ompi_request_wait_all( nreqs, reqs, statuses ); - if( MPI_ERR_IN_STATUS == err ) { + if( MPI_ERR_IN_STATUS == err ) { line == __LINE__; /* As we use wait_all we will get MPI_ERR_IN_STATUS which is not an error * code that we can propagate up the stack. Instead, look for the real * error code from the MPI_ERROR in the status. */ int err_index = 0; - if( MPI_SUCCESS == statuses[0].MPI_ERROR ) { + if( MPI_SUCCESS == statuses[0].MPI_ERROR + || MPI_ERR_PENDING == statuses[0].MPI_ERROR ) { err_index = 1; } if (MPI_STATUS_IGNORE != status) {