From c6cb5a5160dfee6fbc85503a97eb59408853e494 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 18 Feb 2013 21:39:29 +0100 Subject: [PATCH] Check status also with MC. --- src/smpi/smpi_base.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/smpi/smpi_base.c b/src/smpi/smpi_base.c index 150cdfb0e5..8cb1cc8420 100644 --- a/src/smpi/smpi_base.c +++ b/src/smpi/smpi_base.c @@ -780,19 +780,18 @@ int smpi_mpi_waitall(int count, MPI_Request requests[], } } for(c = 0; c < count; c++) { - if(MC_is_active()) { - smpi_mpi_wait(&requests[c], pstat); - index = c; - } else { - index = smpi_mpi_waitany(count, requests, pstat); - if(index == MPI_UNDEFINED) { - break; - } - if (status != MPI_STATUSES_IGNORE) { - status[index] = *pstat; - if (status[index].MPI_ERROR == MPI_ERR_TRUNCATE) - retvalue = MPI_ERR_IN_STATUS; - } + if (MC_is_active()) { + smpi_mpi_wait(&requests[c], pstat); + index = c; + } else { + index = smpi_mpi_waitany(count, requests, pstat); + if (index == MPI_UNDEFINED) + break; + } + if (status != MPI_STATUSES_IGNORE) { + status[index] = *pstat; + if (status[index].MPI_ERROR == MPI_ERR_TRUNCATE) + retvalue = MPI_ERR_IN_STATUS; } } -- 2.20.1