]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid setting up an MPI data type for serial comm
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Mon, 3 Feb 2020 10:09:14 +0000 (11:09 +0100)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Mon, 3 Feb 2020 12:58:24 +0000 (13:58 +0100)
source/base/mpi.cc

index 400a7874401e047bbfa6459c807433c1cf4fdf57..334453313efa9e2c5f00ff7c3671cb243cdc8a0d 100644 (file)
@@ -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;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.