]> https://gitweb.dealii.org/ - dealii.git/commitdiff
early out compute_point_to_point_communication_pattern()
authorTimo Heister <timo.heister@gmail.com>
Tue, 28 Jul 2015 17:28:23 +0000 (13:28 -0400)
committerTimo Heister <timo.heister@gmail.com>
Tue, 28 Jul 2015 17:28:23 +0000 (13:28 -0400)
Fixes another stl invalid access

source/base/mpi.cc

index cd69c9c358fb1793b484d041cd2e260357486bd8..28a575330fd29e8af8b295871f1c9534e1911dde 100644 (file)
@@ -141,6 +141,10 @@ namespace Utilities
       const unsigned int max_n_destinations
         = Utilities::MPI::max (destinations.size(), mpi_comm);
 
+      if (max_n_destinations==0)
+        // all processes have nothing to send/receive:
+        return std::vector<unsigned int>();
+
       // now that we know the number
       // of data packets every
       // processor wants to send, set

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.