From 05140df1e66ad3a5d6449d339244580f4b36d872 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Thu, 26 Feb 2015 13:58:06 +0900 Subject: [PATCH] coll/tuned: regression fix fix the regression introduced in open-mpi/ompi@004160f8da97be1f29aefeaaa51cf52298e0d3a4 --- ompi/mca/coll/tuned/coll_tuned_barrier.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ompi/mca/coll/tuned/coll_tuned_barrier.c b/ompi/mca/coll/tuned/coll_tuned_barrier.c index 455e7e1474..5569476dc7 100644 --- a/ompi/mca/coll/tuned/coll_tuned_barrier.c +++ b/ompi/mca/coll/tuned/coll_tuned_barrier.c @@ -78,7 +78,10 @@ ompi_coll_tuned_sendrecv_zero(int dest, int stag, err = ompi_request_wait_all( 2, reqs, statuses ); if( MPI_ERR_IN_STATUS == err ) { - /* At least we know the error was detected during the wait_all */ + /* 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 = 1; if( MPI_SUCCESS == statuses[0].MPI_ERROR ) { err_index = 0; @@ -87,7 +90,7 @@ ompi_coll_tuned_sendrecv_zero(int dest, int stag, OPAL_OUTPUT ((ompi_coll_tuned_stream, "%s:%d: Error %d occurred in the %s" " stage of ompi_coll_tuned_sendrecv_zero\n", __FILE__, line, err, (0 == err_index ? "receive" : "send"))); - return MPI_ERR_IN_STATUS; + return err; } if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }