From db76c7f2f0869183c9b7d8e4d99bbaa679643f43 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 13 Feb 2022 22:08:45 -0700 Subject: [PATCH] Use the correct data type for a buffer size variable. --- include/deal.II/base/mpi.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 -- 2.39.5