From 8b708586a4828fb6967bde29829afbbf502dfa1b Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Mon, 14 Feb 2022 08:18:09 -0500 Subject: [PATCH] use new broadcast function --- include/deal.II/base/mpi.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/include/deal.II/base/mpi.h b/include/deal.II/base/mpi.h index c3459641a2..763c5147f2 100644 --- a/include/deal.II/base/mpi.h +++ b/include/deal.II/base/mpi.h @@ -1862,11 +1862,8 @@ namespace Utilities } // Exchange the size of buffer - int ierr = MPI_Bcast(&buffer_size, - 1, - internal::mpi_type_id(&buffer_size), - root_process, - comm); + int ierr = MPI_Bcast( + &buffer_size, 1, mpi_type_id(&buffer_size), root_process, comm); AssertThrowMPI(ierr); // If not on the root process, correctly size the buffer to @@ -1874,9 +1871,7 @@ namespace Utilities if (this_mpi_process(comm) != root_process) buffer.resize(buffer_size); - ierr = - MPI_Bcast(buffer.data(), buffer_size, MPI_CHAR, root_process, comm); - AssertThrowMPI(ierr); + broadcast(buffer.data(), buffer_size, root_process, comm); if (Utilities::MPI::this_mpi_process(comm) == root_process) return object_to_send; -- 2.39.5