commit fe1a72621ad22f8bdc9e2d1036a70e0fc39c6aa5
parent 99b224bd0ad1e31ed2fa173cf96c40f530517d40
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 8 Dec 2023 15:45:44 +0100
Fix accumulator list gathering without MPI
The function failed when the solver was compiled with MPI support but
with MPI disabled at runtime.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/sdis.c b/src/sdis.c
@@ -19,7 +19,6 @@
#include "sdis_c.h"
#include "sdis_device_c.h"
#include "sdis_estimator_c.h"
-#include "sdis_estimator_buffer_c.h"
#include "sdis_green.h"
#include "sdis_log.h"
#include "sdis_misc.h"
@@ -621,6 +620,10 @@ gather_accumulators_list
ASSERT(dev);
ASSERT(process_nprobes == 0 || (process_probes && per_probe_acc));
+ /* Without MPI, do nothing since per_probe_acc already has all the
+ * accumulators */
+ if(!dev->use_mpi) goto exit;
+
/* Defines the maximum number of probes managed by a process. In fact, it's
* the number of probes divided by the number of processes, plus one to manage
* the remainder of the entire division: the remaining probes are distributed