From: Daniel Arndt Date: Fri, 7 Sep 2018 22:30:54 +0000 (+0200) Subject: Silence another warning in compute_n_point_to_point_communications X-Git-Tag: v9.1.0-rc1~737^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7164%2Fhead;p=dealii.git Silence another warning in compute_n_point_to_point_communications --- 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],