Reference documentation for deal.II version Git fb4dd4809c 2020-04-08 11:06:24 +0200
\(\newcommand{\vcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\vcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
mpi.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2011 - 2019 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_mpi_h
17 #define dealii_mpi_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/base/array_view.h>
22 #include <deal.II/base/mpi_tags.h>
23 #include <deal.II/base/numbers.h>
24 
25 #include <map>
26 #include <numeric>
27 #include <set>
28 #include <vector>
29 
30 #if !defined(DEAL_II_WITH_MPI) && !defined(DEAL_II_WITH_PETSC)
31 // without MPI, we would still like to use
32 // some constructs with MPI data
33 // types. Therefore, create some dummies
34 using MPI_Comm = int;
35 using MPI_Request = int;
36 using MPI_Datatype = int;
37 using MPI_Op = int;
38 # ifndef MPI_COMM_WORLD
39 # define MPI_COMM_WORLD 0
40 # endif
41 # ifndef MPI_COMM_SELF
42 # define MPI_COMM_SELF 0
43 # endif
44 # ifndef MPI_REQUEST_NULL
45 # define MPI_REQUEST_NULL 0
46 # endif
47 # ifndef MPI_MIN
48 # define MPI_MIN 0
49 # endif
50 # ifndef MPI_MAX
51 # define MPI_MAX 0
52 # endif
53 # ifndef MPI_SUM
54 # define MPI_SUM 0
55 # endif
56 #endif
57 
58 
59 
73 #ifdef DEAL_II_WITH_MPI
74 # if DEAL_II_MPI_VERSION_GTE(3, 0)
75 
76 # define DEAL_II_MPI_CONST_CAST(expr) (expr)
77 
78 # else
79 
80 # include <type_traits>
81 
82 # define DEAL_II_MPI_CONST_CAST(expr) \
83  const_cast<typename std::remove_const< \
84  typename std::remove_pointer<decltype(expr)>::type>::type *>(expr)
85 
86 # endif
87 #endif
88 
89 
90 
91 DEAL_II_NAMESPACE_OPEN
92 
93 
94 // Forward type declarations to allow MPI sums over tensorial types
95 #ifndef DOXYGEN
96 template <int rank, int dim, typename Number>
97 class Tensor;
98 template <int rank, int dim, typename Number>
99 class SymmetricTensor;
100 template <typename Number>
101 class SparseMatrix;
102 class IndexSet;
103 #endif
104 
105 namespace Utilities
106 {
114  namespace MPI
115  {
124  unsigned int
125  n_mpi_processes(const MPI_Comm &mpi_communicator);
126 
135  unsigned int
136  this_mpi_process(const MPI_Comm &mpi_communicator);
137 
159  std::vector<unsigned int>
161  const MPI_Comm & mpi_comm,
162  const std::vector<unsigned int> &destinations);
163 
183  unsigned int
185  const MPI_Comm & mpi_comm,
186  const std::vector<unsigned int> &destinations);
187 
204  MPI_Comm
205  duplicate_communicator(const MPI_Comm &mpi_communicator);
206 
216  void
217  free_communicator(MPI_Comm &mpi_communicator);
218 
232  {
233  public:
237  explicit DuplicatedCommunicator(const MPI_Comm &communicator)
238  : comm(duplicate_communicator(communicator))
239  {}
240 
245 
250  {
252  }
253 
257  const MPI_Comm &operator*() const
258  {
259  return comm;
260  }
261 
262 
267  operator=(const DuplicatedCommunicator &) = delete;
268 
269  private:
273  MPI_Comm comm;
274  };
275 
306  {
307  public:
314  {
315  public:
319  explicit ScopedLock(CollectiveMutex &mutex, const MPI_Comm &comm)
320  : mutex(mutex)
321  , comm(comm)
322  {
323  mutex.lock(comm);
324  }
325 
330  {
331  mutex.unlock(comm);
332  }
333 
334  private:
342  const MPI_Comm comm;
343  };
344 
348  explicit CollectiveMutex();
349 
353  ~CollectiveMutex();
354 
361  void
362  lock(MPI_Comm comm);
363 
370  void
371  unlock(MPI_Comm comm);
372 
373  private:
377  bool locked;
378 
382  MPI_Request request;
383  };
384 
385 
386 
414 #ifdef DEAL_II_WITH_MPI
415  int
416  create_group(const MPI_Comm & comm,
417  const MPI_Group &group,
418  const int tag,
419  MPI_Comm * new_comm);
420 #endif
421 
430  std::vector<IndexSet>
431  create_ascending_partitioning(const MPI_Comm & comm,
432  const IndexSet::size_type &local_size);
433 
434 #ifdef DEAL_II_WITH_MPI
435 
450  template <class Iterator, typename Number = long double>
451  std::pair<Number, typename numbers::NumberTraits<Number>::real_type>
452  mean_and_standard_deviation(const Iterator begin,
453  const Iterator end,
454  const MPI_Comm &comm);
455 #endif
456 
476  template <typename T>
477  T
478  sum(const T &t, const MPI_Comm &mpi_communicator);
479 
489  template <typename T, typename U>
490  void
491  sum(const T &values, const MPI_Comm &mpi_communicator, U &sums);
492 
502  template <typename T>
503  void
504  sum(const ArrayView<const T> &values,
505  const MPI_Comm & mpi_communicator,
506  const ArrayView<T> & sums);
507 
513  template <int rank, int dim, typename Number>
516  const MPI_Comm & mpi_communicator);
517 
523  template <int rank, int dim, typename Number>
525  sum(const Tensor<rank, dim, Number> &local,
526  const MPI_Comm & mpi_communicator);
527 
536  template <typename Number>
537  void
538  sum(const SparseMatrix<Number> &local,
539  const MPI_Comm & mpi_communicator,
540  SparseMatrix<Number> & global);
541 
561  template <typename T>
562  T
563  max(const T &t, const MPI_Comm &mpi_communicator);
564 
574  template <typename T, typename U>
575  void
576  max(const T &values, const MPI_Comm &mpi_communicator, U &maxima);
577 
587  template <typename T>
588  void
589  max(const ArrayView<const T> &values,
590  const MPI_Comm & mpi_communicator,
591  const ArrayView<T> & maxima);
592 
612  template <typename T>
613  T
614  min(const T &t, const MPI_Comm &mpi_communicator);
615 
625  template <typename T, typename U>
626  void
627  min(const T &values, const MPI_Comm &mpi_communicator, U &minima);
628 
638  template <typename T>
639  void
640  min(const ArrayView<const T> &values,
641  const MPI_Comm & mpi_communicator,
642  const ArrayView<T> & minima);
643 
658  struct MinMaxAvg
659  {
664  double sum;
665 
670  double min;
671 
676  double max;
677 
686  unsigned int min_index;
687 
696  unsigned int max_index;
697 
702  double avg;
703  };
704 
719  MinMaxAvg
720  min_max_avg(const double my_value, const MPI_Comm &mpi_communicator);
721 
732  std::vector<MinMaxAvg>
733  min_max_avg(const std::vector<double> &my_value,
734  const MPI_Comm & mpi_communicator);
735 
736 
748  void
749  min_max_avg(const ArrayView<const double> &my_values,
750  const ArrayView<MinMaxAvg> & result,
751  const MPI_Comm & mpi_communicator);
752 
753 
798  {
799  public:
846  int & argc,
847  char **& argv,
848  const unsigned int max_num_threads = numbers::invalid_unsigned_int);
849 
854  ~MPI_InitFinalize();
855 
882  static void
883  register_request(MPI_Request &request);
884 
888  static void
889  unregister_request(MPI_Request &request);
890 
891  private:
895  static std::set<MPI_Request *> requests;
896  };
897 
909  bool
911 
931  template <typename T>
932  std::map<unsigned int, T>
933  some_to_some(const MPI_Comm & comm,
934  const std::map<unsigned int, T> &objects_to_send);
935 
951  template <typename T>
952  std::vector<T>
953  all_gather(const MPI_Comm &comm, const T &object_to_send);
954 
972  template <typename T>
973  std::vector<T>
974  gather(const MPI_Comm & comm,
975  const T & object_to_send,
976  const unsigned int root_process = 0);
977 
1022  std::vector<unsigned int>
1023  compute_index_owner(const IndexSet &owned_indices,
1024  const IndexSet &indices_to_look_up,
1025  const MPI_Comm &comm);
1026 
1034  template <typename T>
1035  std::vector<T>
1036  compute_set_union(const std::vector<T> &vec, const MPI_Comm &comm);
1037 
1041  template <typename T>
1042  std::set<T>
1043  compute_set_union(const std::set<T> &set, const MPI_Comm &comm);
1044 
1045 #ifndef DOXYGEN
1046  // declaration for an internal function that lives in mpi.templates.h
1047  namespace internal
1048  {
1049  template <typename T>
1050  void
1051  all_reduce(const MPI_Op & mpi_op,
1052  const ArrayView<const T> &values,
1053  const MPI_Comm & mpi_communicator,
1054  const ArrayView<T> & output);
1055  }
1056 
1057  // Since these depend on N they must live in the header file
1058  template <typename T, unsigned int N>
1059  void
1060  sum(const T (&values)[N], const MPI_Comm &mpi_communicator, T (&sums)[N])
1061  {
1062  internal::all_reduce(MPI_SUM,
1063  ArrayView<const T>(values, N),
1064  mpi_communicator,
1065  ArrayView<T>(sums, N));
1066  }
1067 
1068  template <typename T, unsigned int N>
1069  void
1070  max(const T (&values)[N], const MPI_Comm &mpi_communicator, T (&maxima)[N])
1071  {
1072  internal::all_reduce(MPI_MAX,
1073  ArrayView<const T>(values, N),
1074  mpi_communicator,
1075  ArrayView<T>(maxima, N));
1076  }
1077 
1078  template <typename T, unsigned int N>
1079  void
1080  min(const T (&values)[N], const MPI_Comm &mpi_communicator, T (&minima)[N])
1081  {
1082  internal::all_reduce(MPI_MIN,
1083  ArrayView<const T>(values, N),
1084  mpi_communicator,
1085  ArrayView<T>(minima, N));
1086  }
1087 
1088  template <typename T>
1089  std::map<unsigned int, T>
1090  some_to_some(const MPI_Comm & comm,
1091  const std::map<unsigned int, T> &objects_to_send)
1092  {
1093 # ifndef DEAL_II_WITH_MPI
1094  (void)comm;
1095  Assert(objects_to_send.size() < 2,
1096  ExcMessage("Cannot send to more than one processor."));
1097  Assert(objects_to_send.find(0) != objects_to_send.end() ||
1098  objects_to_send.size() == 0,
1099  ExcMessage("Can only send to myself or to nobody."));
1100  return objects_to_send;
1101 # else
1102  const auto my_proc = this_mpi_process(comm);
1103 
1104  std::map<unsigned int, T> received_objects;
1105 
1106  std::vector<unsigned int> send_to;
1107  send_to.reserve(objects_to_send.size());
1108  for (const auto &m : objects_to_send)
1109  if (m.first == my_proc)
1110  received_objects[my_proc] = m.second;
1111  else
1112  send_to.emplace_back(m.first);
1113 
1114  const unsigned int n_point_point_communications =
1116 
1117  // Protect the following communication:
1118  static CollectiveMutex mutex;
1119  CollectiveMutex::ScopedLock lock(mutex, comm);
1120 
1121  // If we have something to send, or we expect something from other
1122  // processors, we need to visit one of the two scopes below. Otherwise,
1123  // no other action is required by this mpi process, and we can safely
1124  // return.
1125  if (send_to.size() == 0 && n_point_point_communications == 0)
1126  return received_objects;
1127 
1128  const int mpi_tag =
1130 
1131  // Sending buffers
1132  std::vector<std::vector<char>> buffers_to_send(send_to.size());
1133  std::vector<MPI_Request> buffer_send_requests(send_to.size());
1134  {
1135  unsigned int i = 0;
1136  for (const auto &rank_obj : objects_to_send)
1137  if (rank_obj.first != my_proc)
1138  {
1139  const auto &rank = rank_obj.first;
1140  buffers_to_send[i] = Utilities::pack(rank_obj.second);
1141  const int ierr = MPI_Isend(buffers_to_send[i].data(),
1142  buffers_to_send[i].size(),
1143  MPI_CHAR,
1144  rank,
1145  mpi_tag,
1146  comm,
1147  &buffer_send_requests[i]);
1148  AssertThrowMPI(ierr);
1149  ++i;
1150  }
1151  }
1152 
1153  // Fill the output map
1154  {
1155  std::vector<char> buffer;
1156  // We do this on a first come/first served basis
1157  for (unsigned int i = 0; i < n_point_point_communications; ++i)
1158  {
1159  // Probe what's going on. Take data from the first available sender
1160  MPI_Status status;
1161  int ierr = MPI_Probe(MPI_ANY_SOURCE, mpi_tag, comm, &status);
1162  AssertThrowMPI(ierr);
1163 
1164  // Length of the message
1165  int len;
1166  ierr = MPI_Get_count(&status, MPI_CHAR, &len);
1167  AssertThrowMPI(ierr);
1168  buffer.resize(len);
1169 
1170  // Source rank
1171  const unsigned int rank = status.MPI_SOURCE;
1172 
1173  // Actually receive the message
1174  ierr = MPI_Recv(buffer.data(),
1175  len,
1176  MPI_CHAR,
1177  status.MPI_SOURCE,
1178  status.MPI_TAG,
1179  comm,
1180  MPI_STATUS_IGNORE);
1181  AssertThrowMPI(ierr);
1182  Assert(received_objects.find(rank) == received_objects.end(),
1184  "I should not receive again from this rank"));
1185  received_objects[rank] = Utilities::unpack<T>(buffer);
1186  }
1187  }
1188 
1189  // Wait to have sent all objects.
1190  const int ierr = MPI_Waitall(send_to.size(),
1191  buffer_send_requests.data(),
1192  MPI_STATUSES_IGNORE);
1193  AssertThrowMPI(ierr);
1194 
1195  return received_objects;
1196 # endif // deal.II with MPI
1197  }
1198 
1199  template <typename T>
1200  std::vector<T>
1201  all_gather(const MPI_Comm &comm, const T &object)
1202  {
1203 # ifndef DEAL_II_WITH_MPI
1204  (void)comm;
1205  std::vector<T> v(1, object);
1206  return v;
1207 # else
1208  const auto n_procs = ::Utilities::MPI::n_mpi_processes(comm);
1209 
1210  std::vector<char> buffer = Utilities::pack(object);
1211 
1212  int n_local_data = buffer.size();
1213 
1214  // Vector to store the size of loc_data_array for every process
1215  std::vector<int> size_all_data(n_procs, 0);
1216 
1217  // Exchanging the size of each buffer
1218  MPI_Allgather(
1219  &n_local_data, 1, MPI_INT, size_all_data.data(), 1, MPI_INT, comm);
1220 
1221  // Now computing the displacement, relative to recvbuf,
1222  // at which to store the incoming buffer
1223  std::vector<int> rdispls(n_procs);
1224  rdispls[0] = 0;
1225  for (unsigned int i = 1; i < n_procs; ++i)
1226  rdispls[i] = rdispls[i - 1] + size_all_data[i - 1];
1227 
1228  // Step 3: exchange the buffer:
1229  std::vector<char> received_unrolled_buffer(rdispls.back() +
1230  size_all_data.back());
1231 
1232  MPI_Allgatherv(buffer.data(),
1233  n_local_data,
1234  MPI_CHAR,
1235  received_unrolled_buffer.data(),
1236  size_all_data.data(),
1237  rdispls.data(),
1238  MPI_CHAR,
1239  comm);
1240 
1241  std::vector<T> received_objects(n_procs);
1242  for (unsigned int i = 0; i < n_procs; ++i)
1243  {
1244  std::vector<char> local_buffer(received_unrolled_buffer.begin() +
1245  rdispls[i],
1246  received_unrolled_buffer.begin() +
1247  rdispls[i] + size_all_data[i]);
1248  received_objects[i] = Utilities::unpack<T>(local_buffer);
1249  }
1250 
1251  return received_objects;
1252 # endif
1253  }
1254 
1255  template <typename T>
1256  std::vector<T>
1257  gather(const MPI_Comm & comm,
1258  const T & object_to_send,
1259  const unsigned int root_process)
1260  {
1261 # ifndef DEAL_II_WITH_MPI
1262  (void)comm;
1263  (void)root_process;
1264  std::vector<T> v(1, object_to_send);
1265  return v;
1266 # else
1267  const auto n_procs = ::Utilities::MPI::n_mpi_processes(comm);
1268  const auto my_rank = ::Utilities::MPI::this_mpi_process(comm);
1269 
1270  AssertIndexRange(root_process, n_procs);
1271 
1272  std::vector<char> buffer = Utilities::pack(object_to_send);
1273  int n_local_data = buffer.size();
1274 
1275  // Vector to store the size of loc_data_array for every process
1276  // only the root process needs to allocate memory for that purpose
1277  std::vector<int> size_all_data;
1278  if (my_rank == root_process)
1279  size_all_data.resize(n_procs, 0);
1280 
1281  // Exchanging the size of each buffer
1282  int ierr = MPI_Gather(&n_local_data,
1283  1,
1284  MPI_INT,
1285  size_all_data.data(),
1286  1,
1287  MPI_INT,
1288  root_process,
1289  comm);
1290  AssertThrowMPI(ierr);
1291 
1292  // Now computing the displacement, relative to recvbuf,
1293  // at which to store the incoming buffer; only for root
1294  std::vector<int> rdispls;
1295  if (my_rank == root_process)
1296  {
1297  rdispls.resize(n_procs, 0);
1298  for (unsigned int i = 1; i < n_procs; ++i)
1299  rdispls[i] = rdispls[i - 1] + size_all_data[i - 1];
1300  }
1301  // exchange the buffer:
1302  std::vector<char> received_unrolled_buffer;
1303  if (my_rank == root_process)
1304  received_unrolled_buffer.resize(rdispls.back() + size_all_data.back());
1305 
1306  ierr = MPI_Gatherv(buffer.data(),
1307  n_local_data,
1308  MPI_CHAR,
1309  received_unrolled_buffer.data(),
1310  size_all_data.data(),
1311  rdispls.data(),
1312  MPI_CHAR,
1313  root_process,
1314  comm);
1315  AssertThrowMPI(ierr);
1316 
1317  std::vector<T> received_objects;
1318 
1319  if (my_rank == root_process)
1320  {
1321  received_objects.resize(n_procs);
1322 
1323  for (unsigned int i = 0; i < n_procs; ++i)
1324  {
1325  const std::vector<char> local_buffer(
1326  received_unrolled_buffer.begin() + rdispls[i],
1327  received_unrolled_buffer.begin() + rdispls[i] +
1328  size_all_data[i]);
1329  received_objects[i] = Utilities::unpack<T>(local_buffer);
1330  }
1331  }
1332  return received_objects;
1333 # endif
1334  }
1335 
1336 
1337 # ifdef DEAL_II_WITH_MPI
1338  template <class Iterator, typename Number>
1339  std::pair<Number, typename numbers::NumberTraits<Number>::real_type>
1340  mean_and_standard_deviation(const Iterator begin,
1341  const Iterator end,
1342  const MPI_Comm &comm)
1343  {
1344  // below we do simple and straight-forward implementation. More elaborate
1345  // options are:
1346  // http://dx.doi.org/10.1145/2807591.2807644 section 3.1.2
1347  // https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm
1348  // https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online
1349  using Std = typename numbers::NumberTraits<Number>::real_type;
1350  const Number sum = std::accumulate(begin, end, Number(0.));
1351 
1352  const auto size = Utilities::MPI::sum(std::distance(begin, end), comm);
1353  Assert(size > 0, ExcDivideByZero());
1354  const Number mean =
1355  Utilities::MPI::sum(sum, comm) / static_cast<Std>(size);
1356  Std sq_sum = 0.;
1357  std::for_each(begin, end, [&mean, &sq_sum](const Number &v) {
1358  sq_sum += numbers::NumberTraits<Number>::abs_square(v - mean);
1359  });
1360  sq_sum = Utilities::MPI::sum(sq_sum, comm);
1361  return std::make_pair(mean,
1362  std::sqrt(sq_sum / static_cast<Std>(size - 1)));
1363  }
1364 # endif
1365 
1366 #endif
1367  } // end of namespace MPI
1368 } // end of namespace Utilities
1369 
1370 
1371 DEAL_II_NAMESPACE_CLOSE
1372 
1373 #endif
static const unsigned int invalid_unsigned_int
Definition: types.h:190
unsigned int compute_n_point_to_point_communications(const MPI_Comm &mpi_comm, const std::vector< unsigned int > &destinations)
Definition: mpi.cc:450
static constexpr std::enable_if< std::is_same< Dummy, number >::value &&is_cuda_compatible< Dummy >::value, real_type >::type abs_square(const number &x)
Definition: numbers.h:603
#define AssertIndexRange(index, range)
Definition: exceptions.h:1649
types::global_dof_index size_type
Definition: index_set.h:85
static ::ExceptionBase & ExcDivideByZero()
std::pair< Number, typename numbers::NumberTraits< Number >::real_type > mean_and_standard_deviation(const Iterator begin, const Iterator end, const MPI_Comm &comm)
ScopedLock(CollectiveMutex &mutex, const MPI_Comm &comm)
Definition: mpi.h:319
void free_communicator(MPI_Comm &mpi_communicator)
Definition: mpi.cc:133
static ::ExceptionBase & ExcMessage(std::string arg1)
T sum(const T &t, const MPI_Comm &mpi_communicator)
#define Assert(cond, exc)
Definition: exceptions.h:1419
std::vector< T > gather(const MPI_Comm &comm, const T &object_to_send, const unsigned int root_process=0)
int create_group(const MPI_Comm &comm, const MPI_Group &group, const int tag, MPI_Comm *new_comm)
Definition: mpi.cc:143
std::vector< T > compute_set_union(const std::vector< T > &vec, const MPI_Comm &comm)
const MPI_Comm & operator*() const
Definition: mpi.h:257
std::vector< unsigned int > compute_index_owner(const IndexSet &owned_indices, const IndexSet &indices_to_look_up, const MPI_Comm &comm)
Definition: mpi.cc:1010
size_t pack(const T &object, std::vector< char > &dest_buffer, const bool allow_compression=true)
Definition: utilities.h:1252
unsigned int n_mpi_processes(const MPI_Comm &mpi_communicator)
Definition: mpi.cc:100
void lock(MPI_Comm comm)
Definition: mpi.cc:1068
Definition: cuda.h:31
#define AssertThrowMPI(error_code)
Definition: exceptions.h:1707
Utilities::MPI::compute_point_to_point_communication_pattern()
Definition: mpi_tags.h:57
MPI_Comm duplicate_communicator(const MPI_Comm &mpi_communicator)
Definition: mpi.cc:122
Definition: tensor.h:417
T min(const T &t, const MPI_Comm &mpi_communicator)
static std::set< MPI_Request * > requests
Definition: mpi.h:895
unsigned int this_mpi_process(const MPI_Comm &mpi_communicator)
Definition: mpi.cc:111
std::vector< T > all_gather(const MPI_Comm &comm, const T &object_to_send)
std::vector< IndexSet > create_ascending_partitioning(const MPI_Comm &comm, const IndexSet::size_type &local_size)
Definition: mpi.cc:225
DuplicatedCommunicator(const MPI_Comm &communicator)
Definition: mpi.h:237
MinMaxAvg min_max_avg(const double my_value, const MPI_Comm &mpi_communicator)
Definition: mpi.cc:74
std::vector< unsigned int > compute_point_to_point_communication_pattern(const MPI_Comm &mpi_comm, const std::vector< unsigned int > &destinations)
Definition: mpi.cc:309
bool job_supports_mpi()
Definition: mpi.cc:994
std::map< unsigned int, T > some_to_some(const MPI_Comm &comm, const std::map< unsigned int, T > &objects_to_send)
unsigned int min_index
Definition: mpi.h:686
T max(const T &t, const MPI_Comm &mpi_communicator)
unsigned int max_index
Definition: mpi.h:696
static ::ExceptionBase & ExcInternalError()
DuplicatedCommunicator & operator=(const DuplicatedCommunicator &)=delete