From 1c9e535070ddb85c0775456bc320e441f489fb95 Mon Sep 17 00:00:00 2001 From: bangerth Date: Sun, 5 May 2013 14:07:48 +0000 Subject: [PATCH] Augment documentation. git-svn-id: https://svn.dealii.org/trunk@29457 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/base/mpi.h | 32 ++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/deal.II/include/deal.II/base/mpi.h b/deal.II/include/deal.II/base/mpi.h index 821ad1e4d3..4887776510 100644 --- a/deal.II/include/deal.II/base/mpi.h +++ b/deal.II/include/deal.II/base/mpi.h @@ -151,6 +151,14 @@ namespace Utilities * MPI_Allreduce function, i.e. all processors receive * the result of this operation. * + * @note Sometimes, not all processors need a results and in that case + * one would call the MPI_Reduce function instead of the + * MPI_Allreduce function. The latter is at most twice as + * expensive, so if you are concerned about performance, it may be + * worthwhile investigating whether your algorithm indeed needs the + * result everywhere or whether you could get away with calling the + * current function and getting the result everywhere. + * * @note This function is only implemented for certain template * arguments T, namely float, double, int, * unsigned int. @@ -198,6 +206,14 @@ namespace Utilities * MPI_Allreduce function, i.e. all processors receive * the result of this operation. * + * @note Sometimes, not all processors need a results and in that case + * one would call the MPI_Reduce function instead of the + * MPI_Allreduce function. The latter is at most twice as + * expensive, so if you are concerned about performance, it may be + * worthwhile investigating whether your algorithm indeed needs the + * result everywhere or whether you could get away with calling the + * current function and getting the result everywhere. + * * @note This function is only implemented for certain template * arguments T, namely float, double, int, * unsigned int. @@ -255,12 +271,20 @@ namespace Utilities * Returns sum, average, minimum, * maximum, processor id of minimum and * maximum as a collective operation of - * on the given MPI communicator @param + * on the given MPI communicator @p * mpi_communicator . Each processor's - * value is given in @param my_value and - * the result will be returned in @p - * result . The result is available on all + * value is given in @p my_value and + * the result will be returned. + * The result is available on all * machines. + * + * @note Sometimes, not all processors need a results and in that case + * one would call the MPI_Reduce function instead of the + * MPI_Allreduce function. The latter is at most twice as + * expensive, so if you are concerned about performance, it may be + * worthwhile investigating whether your algorithm indeed needs the + * result everywhere or whether you could get away with calling the + * current function and getting the result everywhere. */ MinMaxAvg min_max_avg (const double my_value, -- 2.39.5