From d7ca2085406481fff495f5b135a4dc3c254540f1 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Mon, 23 Oct 2017 15:39:15 +0200 Subject: [PATCH] Make sure to actually zero the ghost entries in partitioner import call. --- include/deal.II/base/partitioner.templates.h | 4 +--- tests/mpi/parallel_partitioner_07.cc | 11 +++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/deal.II/base/partitioner.templates.h b/include/deal.II/base/partitioner.templates.h index 0b0a45e567..4ffc40f468 100644 --- a/include/deal.II/base/partitioner.templates.h +++ b/include/deal.II/base/partitioner.templates.h @@ -402,9 +402,7 @@ namespace Utilities // clear the ghost array in case we did not yet do that in the _start // function - if (n_ghost_indices_in_larger_set == n_ghost_indices() || - ghost_array.size() != n_ghost_indices_in_larger_set) - std::memset(ghost_array.begin(), 0, sizeof(Number)*n_ghost_indices()); + std::memset(ghost_array.begin(), 0, sizeof(Number)*n_ghost_indices()); // clear the compress requests requests.resize(0); diff --git a/tests/mpi/parallel_partitioner_07.cc b/tests/mpi/parallel_partitioner_07.cc index f669b8663c..a78aaa6533 100644 --- a/tests/mpi/parallel_partitioner_07.cc +++ b/tests/mpi/parallel_partitioner_07.cc @@ -97,6 +97,9 @@ void test () temp_array.size()), make_array_view(locally_owned_array), make_array_view(ghosts), requests); + // check that the ghost entries are zeroed out in these calls + for (unsigned int i=0; i