From: Martin Kronbichler Date: Mon, 12 Feb 2024 12:13:23 +0000 (+0100) Subject: MG transfer global coarsening: Avoid sending empty messages X-Git-Tag: relicensing~33^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f95e16348eb9d1fcba3262301cf5aa7b2d5c971;p=dealii.git MG transfer global coarsening: Avoid sending empty messages --- diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h index bb3e24d4b2..d3c154e0a1 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h @@ -866,7 +866,11 @@ namespace internal for (const auto &i : targets_with_indexset) { - if (i.first == my_rank) + // Skip communication in case we would send to ourselves or when + // there are no indices to send (this can still happen in the run + // of the consensus algorithms above if the index spaces are + // sparse). + if (i.first == my_rank || i.second.begin() == i.second.end()) continue; indices_to_be_sent[i.first] = {};