From: Wolfgang Bangerth Date: Mon, 14 Feb 2022 05:08:45 +0000 (-0700) Subject: Use the correct data type for a buffer size variable. X-Git-Tag: v9.4.0-rc1~486^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db76c7f2f0869183c9b7d8e4d99bbaa679643f43;p=dealii.git Use the correct data type for a buffer size variable. --- diff --git a/include/deal.II/base/mpi.h b/include/deal.II/base/mpi.h index 77ea392a58..c3459641a2 100644 --- a/include/deal.II/base/mpi.h +++ b/include/deal.II/base/mpi.h @@ -1851,7 +1851,7 @@ namespace Utilities (void)n_procs; std::vector buffer; - unsigned int buffer_size = numbers::invalid_unsigned_int; + std::size_t buffer_size = numbers::invalid_size_type; // On the root process, pack the data and determine what the // buffer size needs to be. @@ -1862,7 +1862,11 @@ namespace Utilities } // Exchange the size of buffer - int ierr = MPI_Bcast(&buffer_size, 1, MPI_UNSIGNED, root_process, comm); + int ierr = MPI_Bcast(&buffer_size, + 1, + internal::mpi_type_id(&buffer_size), + root_process, + comm); AssertThrowMPI(ierr); // If not on the root process, correctly size the buffer to