From cd7a17c06b79294eeea485dd50367e53b5664027 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Mon, 3 Feb 2020 11:09:14 +0100 Subject: [PATCH] Avoid setting up an MPI data type for serial comm --- source/base/mpi.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/base/mpi.cc b/source/base/mpi.cc index 400a787440..334453313e 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -531,7 +531,8 @@ namespace Utilities { // If MPI was not started, we have a serial computation and cannot run // the other MPI commands - if (job_supports_mpi() == false) + if (job_supports_mpi() == false || + Utilities::MPI::n_mpi_processes(mpi_communicator) <= 1) { MinMaxAvg result; result.sum = my_value; -- 2.39.5