From: peterrum Date: Sat, 20 Jul 2019 09:37:54 +0000 (+0200) Subject: Add assert to Utilities::MPI::compute_index_owner to check the equality of the size... X-Git-Tag: v9.2.0-rc1~1370^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c406409a93704650850019a6371fced6717c3a7f;p=dealii.git Add assert to Utilities::MPI::compute_index_owner to check the equality of the size of the index sets on all processes --- diff --git a/source/base/mpi.cc b/source/base/mpi.cc index 986d4007a3..63c6a010e3 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -1724,6 +1724,10 @@ namespace Utilities Assert(owned_indices.size() == indices_to_look_up.size(), ExcMessage("IndexSets have to have the same sizes.")); + Assert( + owned_indices.size() == Utilities::MPI::max(owned_indices.size(), comm), + ExcMessage("IndexSets have to have the same size on all processes.")); + std::vector owning_ranks(indices_to_look_up.n_elements()); // Step 1: setup dictionary