From babcb606fcfb6572ea85211e9540d7dbdd380214 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Thu, 2 Mar 2017 16:22:43 +0100 Subject: [PATCH] simplify and reverse comparison for accumulates in Waitall (+1 for vectors!!) --- src/smpi/smpi_base.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/smpi/smpi_base.cpp b/src/smpi/smpi_base.cpp index 46c20ee48c..aeb6422897 100644 --- a/src/smpi/smpi_base.cpp +++ b/src/smpi/smpi_base.cpp @@ -835,10 +835,9 @@ void smpi_mpi_wait(MPI_Request * request, MPI_Status * status) *request = MPI_REQUEST_NULL; } -static int sort_accumulates(const void* pa, const void* pb) +static int sort_accumulates(MPI_Request a, MPI_Request b) { - return (*static_cast(pa))->tag> - (*static_cast(pb))->tag; + return (a->tag < b->tag); } int smpi_mpi_waitany(int count, MPI_Request requests[], MPI_Status * status) -- 2.20.1