]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add assert to Utilities::MPI::compute_index_owner to check the equality of the size... 8397/head
authorpeterrum <peterrmuench@gmail.com>
Sat, 20 Jul 2019 09:37:54 +0000 (11:37 +0200)
committerpeterrum <peterrmuench@gmail.com>
Sat, 20 Jul 2019 09:37:54 +0000 (11:37 +0200)
source/base/mpi.cc

index 986d4007a30b3e3bde716bc49efc8342c284901b..63c6a010e3cfaa7abe89ba9509336b3d06bd5fc1 100644 (file)
@@ -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<unsigned int> owning_ranks(indices_to_look_up.n_elements());
 
       // Step 1: setup dictionary

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.