]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix compute_local_to_global_vertex_index_map.
authorDavid Wells <wellsd2@rpi.edu>
Sat, 5 May 2018 23:15:10 +0000 (19:15 -0400)
committerMatthias Maier <tamiko@43-1.org>
Sun, 6 May 2018 23:32:43 +0000 (18:32 -0500)
The MPI_Allgather call should have the same value inputs for the second
and fifth arguments.

source/grid/grid_tools.cc

index 1bdc4a4401c071454494b39a238d4e31e1cf0f6c..a38f743fda84c8b8b35b0da67732d71183bce063 100644 (file)
@@ -2140,8 +2140,10 @@ next_cell:
     const unsigned int n_cpu = Utilities::MPI::n_mpi_processes(triangulation.get_communicator());
     std::vector<types::global_vertex_index> indices(n_cpu);
     int ierr = MPI_Allgather(&next_index, 1, DEAL_II_DOF_INDEX_MPI_TYPE, indices.data(),
-                             indices.size(), DEAL_II_DOF_INDEX_MPI_TYPE, triangulation.get_communicator());
+                             1, DEAL_II_DOF_INDEX_MPI_TYPE, triangulation.get_communicator());
     AssertThrowMPI(ierr);
+    Assert(indices.begin() + triangulation.locally_owned_subdomain() < indices.end(),
+           ExcInternalError());
     const types::global_vertex_index shift = std::accumulate(indices.begin(),
                                                              indices.begin()+triangulation.locally_owned_subdomain(),
                                                              types::global_vertex_index(0));

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.