From: Timo Heister Date: Mon, 14 Feb 2022 13:18:09 +0000 (-0500) Subject: use new broadcast function X-Git-Tag: v9.4.0-rc1~486^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13379%2Fhead;p=dealii.git use new broadcast function --- 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;