From: David Wells Date: Sat, 5 May 2018 23:15:10 +0000 (-0400) Subject: Fix compute_local_to_global_vertex_index_map. X-Git-Tag: v9.1.0-rc1~1210^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f10afcc2ef2ab97c22cfa50bd326bc5b6fdcfaaa;p=dealii.git Fix compute_local_to_global_vertex_index_map. The MPI_Allgather call should have the same value inputs for the second and fifth arguments. --- diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 1bdc4a4401..a38f743fda 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -2140,8 +2140,10 @@ next_cell: const unsigned int n_cpu = Utilities::MPI::n_mpi_processes(triangulation.get_communicator()); std::vector 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));