From cc3ec1dd215b1d9cba0ab961badeae492fd8f035 Mon Sep 17 00:00:00 2001 From: Mathieu Faverge <mathieu.faverge@inria.fr> Date: Thu, 18 May 2023 00:43:32 +0200 Subject: [PATCH] testing: Fix the random generator to be fixed accross all processes --- testing/values.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testing/values.c b/testing/values.c index 5d53e80b3..5e4bdda14 100644 --- a/testing/values.c +++ b/testing/values.c @@ -729,7 +729,11 @@ testing_salea() long testing_ialea() { - return random(); + long r = random(); +#if defined(CHAMELEON_USE_MPI) + MPI_Bcast( &r, 1, MPI_LONG, 0, MPI_COMM_WORLD ); +#endif + return r; } /** -- GitLab