From: Timo Heister Date: Thu, 25 Feb 2016 17:21:49 +0000 (-0500) Subject: fix incorrect MPI_Allgather X-Git-Tag: v8.4.0-rc3~6^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b39de6ff258509e48a1194145ad522d8af64d55;p=dealii.git 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. --- 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);