]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Adjust minimum grain size of dictionary for consensus algorithm 11758/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Mon, 15 Feb 2021 17:11:04 +0000 (18:11 +0100)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 16 Feb 2021 06:22:39 +0000 (07:22 +0100)
include/deal.II/base/mpi_compute_index_owner_internal.h

index 91092aa273f713b0b0ceddf6b5bb3e389162ab2b..cd01457abc777203230daa8ce239b02a5fa801a2 100644 (file)
@@ -157,9 +157,27 @@ namespace Utilities
         struct Dictionary
         {
           /**
-           * The minimum grain size for the ranges.
-           */
-          static const unsigned int range_minimum_grain_size = 4096;
+           * The minimum grain size for the intervals.
+           *
+           * We choose to limit the smallest size an interval for the
+           * two-stage lookup can have with the following two conflicting
+           * goals in mind: On the one hand, we do not want intervals in the
+           * dictionary to become too short. For uneven distributions of
+           * unknowns (some ranks with several thousands of unknowns, others
+           * with none), the lookup DoFs -> dictionary then involves sending
+           * from one MPI rank to many other MPI ranks holding dictionary
+           * intervals, leading to an exceedingly high number of messages some
+           * ranks have to send. Also, fewer longer intervals are generally
+           * more efficient to look up. On the other hand, a range size too
+           * large leads to opposite effect of many messages that come into a
+           * particular dictionary owner in the lookup DoFs ->
+           * dictionary. With the current setting, we get at most 64 messages
+           * coming to a single MPI rank in case there is 1 dof per MPI rank,
+           * which is reasonably low. At the same time, uneven distributions
+           * up to factors of 4096 can be handled with at most 64 messages as
+           * well.
+           */
+          static const unsigned int range_minimum_grain_size = 64;
 
           /**
            * A vector with as many entries as there are dofs in the dictionary

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.