From: David Wells <drwells@email.unc.edu>
Date: Mon, 23 May 2022 16:57:38 +0000 (-0400)
Subject: Add some missing MPI boolean instantiations.
X-Git-Tag: v9.4.0-rc1~169^2
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7e662a954bead9ff6edec4a83a0599a44edd769;p=dealii.git

Add some missing MPI boolean instantiations.
---

diff --git a/source/base/mpi.cc b/source/base/mpi.cc
index aa582c6bf9..12e2f1ff4e 100644
--- a/source/base/mpi.cc
+++ b/source/base/mpi.cc
@@ -1197,6 +1197,42 @@ namespace Utilities
 
 #ifndef DOXYGEN
     // explicit instantiations
+
+    // booleans aren't in MPI_SCALARS
+    template bool
+    reduce(const bool &,
+           const MPI_Comm &,
+           const std::function<bool(const bool &, const bool &)> &,
+           const unsigned int);
+
+    template std::vector<bool>
+    reduce(const std::vector<bool> &,
+           const MPI_Comm &,
+           const std::function<std::vector<bool>(const std::vector<bool> &,
+                                                 const std::vector<bool> &)> &,
+           const unsigned int);
+
+    template bool
+    all_reduce(const bool &,
+               const MPI_Comm &,
+               const std::function<bool(const bool &, const bool &)> &);
+
+    template std::vector<bool>
+    all_reduce(
+      const std::vector<bool> &,
+      const MPI_Comm &,
+      const std::function<std::vector<bool>(const std::vector<bool> &,
+                                            const std::vector<bool> &)> &);
+
+    // We need an explicit instantiation of this for the same reason as the
+    // other types described in mpi.inst.in
+    template void
+    internal::all_reduce<bool>(const MPI_Op &,
+                               const ArrayView<const bool> &,
+                               const MPI_Comm &,
+                               const ArrayView<bool> &);
+
+
     template bool
     logical_or<bool>(const bool &, const MPI_Comm &);