From: Luca Heltai Date: Sun, 19 Nov 2017 23:14:15 +0000 (+0100) Subject: Addressed Denis' comments. X-Git-Tag: v9.0.0-rc1~748^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01fecb51f462fcdaa06a191a31a5e664b48eff44;p=dealii.git Addressed Denis' comments. --- diff --git a/include/deal.II/base/mpi.h b/include/deal.II/base/mpi.h index f50191b62b..6f64cb050d 100644 --- a/include/deal.II/base/mpi.h +++ b/include/deal.II/base/mpi.h @@ -517,9 +517,7 @@ namespace Utilities * argument. * * @param[in] comm MPI communicator. - * @param[in] objects_to_send A map of `rank:object`, where the key `rank` - * is the rank of the processor we want to send to, and `object` is the - * object to send + * @param[in] object_to_send A object to send to all other processes * * @param[out] A vector of objects, with size equal to the number of * processes in the MPI communicator. Each entry contains the object diff --git a/include/deal.II/base/mpi.templates.h b/include/deal.II/base/mpi.templates.h index 4fab76fcb2..2ee5ce7e67 100644 --- a/include/deal.II/base/mpi.templates.h +++ b/include/deal.II/base/mpi.templates.h @@ -201,8 +201,8 @@ namespace Utilities Assert (false, ExcMessage ("The function some_to_some doesn't make" "any sense if you do not have MPI enabled. ")); #else - auto n_procs = dealii::Utilities::MPI::n_mpi_processes(comm); - auto my_proc = dealii::Utilities::MPI::this_mpi_process(comm); + const auto n_procs = dealii::Utilities::MPI::n_mpi_processes(comm); + const auto my_proc = dealii::Utilities::MPI::this_mpi_process(comm); std::vector send_to(objects_to_send.size()); { @@ -235,11 +235,9 @@ namespace Utilities // Receiving buffers std::map received_objects; { - unsigned int i = 0; std::vector buffer; - // We do this on a first come/first served basis - while (i(buffer); - ++i; } } @@ -284,7 +282,7 @@ namespace Utilities Assert (false, ExcMessage ("The function all_gather doesn't make" "any sense if you do not have MPI enabled. ")); #else - auto n_procs = dealii::Utilities::MPI::n_mpi_processes(comm); + const auto n_procs = dealii::Utilities::MPI::n_mpi_processes(comm); std::vector buffer = Utilities::pack(object);