From: Peter Munch Date: Mon, 2 Oct 2023 18:51:18 +0000 (+0200) Subject: Fix NoncontiguousPartitioner::import_from_ghosted_array() X-Git-Tag: relicensing~444^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7f30cd1665e280f442be36e2ee12791b579ab0d;p=dealii.git Fix NoncontiguousPartitioner::import_from_ghosted_array() --- diff --git a/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h b/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h index 48f934a80b..56f256b3fc 100644 --- a/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h +++ b/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h @@ -279,7 +279,7 @@ namespace Utilities send_ranks[i], tag, communicator, - &requests[i + send_ranks.size()]); + &requests[i]); AssertThrowMPI(ierr); } @@ -304,7 +304,7 @@ namespace Utilities recv_ranks[i], tag, communicator, - &requests[i]); + &requests[i + send_ranks.size()]); AssertThrowMPI(ierr); } #endif @@ -343,10 +343,8 @@ namespace Utilities { int i; MPI_Status status; - const auto ierr = MPI_Waitany(recv_ranks.size(), - requests.data() + send_ranks.size(), - &i, - &status); + const auto ierr = + MPI_Waitany(send_ranks.size(), requests.data(), &i, &status); AssertThrowMPI(ierr); } @@ -364,8 +362,9 @@ namespace Utilities } // wait that all data packages have been sent - const int ierr = - MPI_Waitall(send_ranks.size(), requests.data(), MPI_STATUSES_IGNORE); + const int ierr = MPI_Waitall(recv_ranks.size(), + requests.data() + send_ranks.size(), + MPI_STATUSES_IGNORE); AssertThrowMPI(ierr); #endif }