From f10afcc2ef2ab97c22cfa50bd326bc5b6fdcfaaa Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 5 May 2018 19:15:10 -0400 Subject: [PATCH] Fix compute_local_to_global_vertex_index_map. The MPI_Allgather call should have the same value inputs for the second and fifth arguments. --- source/grid/grid_tools.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)); -- 2.39.5