From d46ed19e24986ccbc211656f8650afe403c9431b Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Tue, 28 Jul 2015 13:28:23 -0400 Subject: [PATCH] early out compute_point_to_point_communication_pattern() Fixes another stl invalid access --- source/base/mpi.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/base/mpi.cc b/source/base/mpi.cc index cd69c9c358..28a575330f 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -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(); + // now that we know the number // of data packets every // processor wants to send, set -- 2.39.5