From: Martin Kronbichler Date: Mon, 15 Feb 2021 17:11:04 +0000 (+0100) Subject: Adjust minimum grain size of dictionary for consensus algorithm X-Git-Tag: v9.3.0-rc1~447^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11758%2Fhead;p=dealii.git Adjust minimum grain size of dictionary for consensus algorithm --- diff --git a/include/deal.II/base/mpi_compute_index_owner_internal.h b/include/deal.II/base/mpi_compute_index_owner_internal.h index 91092aa273..cd01457abc 100644 --- a/include/deal.II/base/mpi_compute_index_owner_internal.h +++ b/include/deal.II/base/mpi_compute_index_owner_internal.h @@ -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