From 9b39de6ff258509e48a1194145ad522d8af64d55 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 eb61d2164c..eabb5ff310 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