From 0c40e2a8fa19145f67fe4473b767e51679e01896 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sat, 8 Sep 2018 00:30:54 +0200 Subject: [PATCH] Silence another warning in compute_n_point_to_point_communications --- source/base/mpi.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/base/mpi.cc b/source/base/mpi.cc index 3c152561c3..e99471202e 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -319,8 +319,9 @@ namespace Utilities # if DEAL_II_MPI_VERSION_GTE(2, 2) // Find out how many processes will send to this one // MPI_Reduce_scatter(_block) does exactly this - unsigned int n_recv_from; - const int ierr = MPI_Reduce_scatter_block( + unsigned int n_recv_from = 0; + + const int ierr = MPI_Reduce_scatter_block( &dest_vector[0], &n_recv_from, 1, MPI_UNSIGNED, MPI_SUM, mpi_comm); AssertThrowMPI(ierr); @@ -331,7 +332,7 @@ namespace Utilities // by reducing with sum and then scattering the // results over all processes std::vector buffer(dest_vector.size()); - unsigned int n_recv_from; + unsigned int n_recv_from = 0; MPI_Reduce(&dest_vector[0], &buffer[0], -- 2.39.5