]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Augment documentation.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 5 May 2013 14:07:48 +0000 (14:07 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 5 May 2013 14:07:48 +0000 (14:07 +0000)
git-svn-id: https://svn.dealii.org/trunk@29457 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/mpi.h

index 821ad1e4d3b8d28c743474533a62723d3977cbf8..4887776510af105cc8ffd64993f0f64632b4135a 100644 (file)
@@ -151,6 +151,14 @@ namespace Utilities
      * <code>MPI_Allreduce</code> 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 <code>MPI_Reduce</code> function instead of the
+     * <code>MPI_Allreduce</code> 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 <code>T</code>, namely <code>float, double, int,
      * unsigned int</code>.
@@ -198,6 +206,14 @@ namespace Utilities
      * <code>MPI_Allreduce</code> 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 <code>MPI_Reduce</code> function instead of the
+     * <code>MPI_Allreduce</code> 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 <code>T</code>, namely <code>float, double, int,
      * unsigned int</code>.
@@ -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 <code>MPI_Reduce</code> function instead of the
+     * <code>MPI_Allreduce</code> 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,

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.