From ae2f2e636895ec1e801c004efd525da7f1546fdb Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Thu, 25 Feb 2016 12:21:49 -0500 Subject: [PATCH] fix incorrect MPI_Allgather MPI_Allgather in compute_local_to_global_vertex_index_map() was using the wrong data type, which probably lead to wrong results or at least illegal memory access. --- source/grid/grid_tools.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index acfd7f1d54..e18cf24bfc 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -1714,8 +1714,8 @@ next_cell: // processors and shifting the indices accordingly const unsigned int n_cpu = Utilities::MPI::n_mpi_processes(triangulation.get_communicator()); std::vector indices(n_cpu); - MPI_Allgather(&next_index, 1, MPI_UNSIGNED_LONG_LONG, &indices[0], - indices.size(), MPI_UNSIGNED_LONG_LONG, triangulation.get_communicator()); + MPI_Allgather(&next_index, 1, DEAL_II_DOF_INDEX_MPI_TYPE, &indices[0], + indices.size(), DEAL_II_DOF_INDEX_MPI_TYPE, triangulation.get_communicator()); const types::global_vertex_index shift = std::accumulate(&indices[0], &indices[0]+triangulation.locally_owned_subdomain(),0); -- 2.39.5