From b4bd104c717270185c3e204ca01d8929f9ff977b Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Sun, 4 Nov 2018 15:21:51 +0100 Subject: [PATCH] Make mpicollectgroup1_reduce() loop over all the elements as described by the MPI standard. --- src/collectgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/collectgroup.c b/src/collectgroup.c index 70ebab4c25..0b7b419b56 100644 --- a/src/collectgroup.c +++ b/src/collectgroup.c @@ -230,7 +230,7 @@ static void mpicollectgroup1_reduce(void *in, void *inout, int *len, MPI_Datatype *datatype) { for (int i = 0; i < *len; ++i) - doreduce1(&((struct mpicollectgroup1 *)inout)[0], + doreduce1(&((struct mpicollectgroup1 *)inout)[i], &((const struct mpicollectgroup1 *)in)[i]); } -- GitLab