From: Martin Kronbichler Date: Mon, 23 Oct 2017 13:39:15 +0000 (+0200) Subject: Make sure to actually zero the ghost entries in partitioner import call. X-Git-Tag: v9.0.0-rc1~895^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7ca2085406481fff495f5b135a4dc3c254540f1;p=dealii.git Make sure to actually zero the ghost entries in partitioner import call. --- 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