Reference documentation for deal.II version 9.3.3
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Classes | Namespaces | Macros | Functions
mpi.h File Reference
#include <deal.II/base/config.h>
#include <deal.II/base/array_view.h>
#include <deal.II/base/index_set.h>
#include <deal.II/base/mpi_tags.h>
#include <deal.II/base/numbers.h>
#include <boost/signals2.hpp>
#include <map>
#include <numeric>
#include <set>
#include <vector>

Go to the source code of this file.

Classes

class  Utilities::MPI::DuplicatedCommunicator
 
class  Utilities::MPI::CollectiveMutex
 
class  Utilities::MPI::CollectiveMutex::ScopedLock
 
struct  Utilities::MPI::MinMaxAvg
 
class  Utilities::MPI::MPI_InitFinalize
 
struct  Utilities::MPI::MPI_InitFinalize::Signals
 

Namespaces

namespace  Utilities
 
namespace  Utilities::MPI
 

Macros

#define DEAL_II_MPI_CONST_CAST(expr)   (expr)
 

Functions

IndexSet Utilities::create_evenly_distributed_partitioning (const unsigned int my_partition_id, const unsigned int n_partitions, const IndexSet::size_type total_size)
 
unsigned int Utilities::MPI::n_mpi_processes (const MPI_Comm &mpi_communicator)
 
unsigned int Utilities::MPI::this_mpi_process (const MPI_Comm &mpi_communicator)
 
const std::vector< unsigned intUtilities::MPI::mpi_processes_within_communicator (const MPI_Comm &comm_large, const MPI_Comm &comm_small)
 
std::vector< unsigned intUtilities::MPI::compute_point_to_point_communication_pattern (const MPI_Comm &mpi_comm, const std::vector< unsigned int > &destinations)
 
unsigned int Utilities::MPI::compute_n_point_to_point_communications (const MPI_Comm &mpi_comm, const std::vector< unsigned int > &destinations)
 
MPI_Comm Utilities::MPI::duplicate_communicator (const MPI_Comm &mpi_communicator)
 
void Utilities::MPI::free_communicator (MPI_Comm &mpi_communicator)
 
int Utilities::MPI::create_group (const MPI_Comm &comm, const MPI_Group &group, const int tag, MPI_Comm *new_comm)
 
std::vector< IndexSetUtilities::MPI::create_ascending_partitioning (const MPI_Comm &comm, const IndexSet::size_type locally_owned_size)
 
IndexSet Utilities::MPI::create_evenly_distributed_partitioning (const MPI_Comm &comm, const IndexSet::size_type total_size)
 
template<class Iterator , typename Number = long double>
std::pair< Number, typename numbers::NumberTraits< Number >::real_type > Utilities::MPI::mean_and_standard_deviation (const Iterator begin, const Iterator end, const MPI_Comm &comm)
 
template<typename T >
Utilities::MPI::sum (const T &t, const MPI_Comm &mpi_communicator)
 
template<typename T , typename U >
void Utilities::MPI::sum (const T &values, const MPI_Comm &mpi_communicator, U &sums)
 
template<typename T >
void Utilities::MPI::sum (const ArrayView< const T > &values, const MPI_Comm &mpi_communicator, const ArrayView< T > &sums)
 
template<int rank, int dim, typename Number >
SymmetricTensor< rank, dim, Number > Utilities::MPI::sum (const SymmetricTensor< rank, dim, Number > &local, const MPI_Comm &mpi_communicator)
 
template<int rank, int dim, typename Number >
Tensor< rank, dim, Number > Utilities::MPI::sum (const Tensor< rank, dim, Number > &local, const MPI_Comm &mpi_communicator)
 
template<typename Number >
void Utilities::MPI::sum (const SparseMatrix< Number > &local, const MPI_Comm &mpi_communicator, SparseMatrix< Number > &global)
 
template<typename T >
Utilities::MPI::max (const T &t, const MPI_Comm &mpi_communicator)
 
template<typename T , typename U >
void Utilities::MPI::max (const T &values, const MPI_Comm &mpi_communicator, U &maxima)
 
template<typename T >
void Utilities::MPI::max (const ArrayView< const T > &values, const MPI_Comm &mpi_communicator, const ArrayView< T > &maxima)
 
template<typename T >
Utilities::MPI::min (const T &t, const MPI_Comm &mpi_communicator)
 
template<typename T , typename U >
void Utilities::MPI::min (const T &values, const MPI_Comm &mpi_communicator, U &minima)
 
template<typename T >
void Utilities::MPI::min (const ArrayView< const T > &values, const MPI_Comm &mpi_communicator, const ArrayView< T > &minima)
 
template<typename T >
Utilities::MPI::logical_or (const T &t, const MPI_Comm &mpi_communicator)
 
template<typename T , typename U >
void Utilities::MPI::logical_or (const T &values, const MPI_Comm &mpi_communicator, U &results)
 
template<typename T >
void Utilities::MPI::logical_or (const ArrayView< const T > &values, const MPI_Comm &mpi_communicator, const ArrayView< T > &results)
 
MinMaxAvg Utilities::MPI::min_max_avg (const double my_value, const MPI_Comm &mpi_communicator)
 
std::vector< MinMaxAvg > Utilities::MPI::min_max_avg (const std::vector< double > &my_value, const MPI_Comm &mpi_communicator)
 
void Utilities::MPI::min_max_avg (const ArrayView< const double > &my_values, const ArrayView< MinMaxAvg > &result, const MPI_Comm &mpi_communicator)
 
bool Utilities::MPI::job_supports_mpi ()
 
template<typename T >
std::map< unsigned int, T > Utilities::MPI::some_to_some (const MPI_Comm &comm, const std::map< unsigned int, T > &objects_to_send)
 
template<typename T >
std::vector< T > Utilities::MPI::all_gather (const MPI_Comm &comm, const T &object_to_send)
 
template<typename T >
std::vector< T > Utilities::MPI::gather (const MPI_Comm &comm, const T &object_to_send, const unsigned int root_process=0)
 
template<typename T >
Utilities::MPI::broadcast (const MPI_Comm &comm, const T &object_to_send, const unsigned int root_process=0)
 
template<typename T >
Utilities::MPI::all_reduce (const T &local_value, const MPI_Comm &comm, const std::function< T(const T &, const T &)> &combiner)
 
std::vector< unsigned intUtilities::MPI::compute_index_owner (const IndexSet &owned_indices, const IndexSet &indices_to_look_up, const MPI_Comm &comm)
 
template<typename T >
std::vector< T > Utilities::MPI::compute_set_union (const std::vector< T > &vec, const MPI_Comm &comm)
 
template<typename T >
std::set< T > Utilities::MPI::compute_set_union (const std::set< T > &set, const MPI_Comm &comm)
 

Macro Definition Documentation

◆ DEAL_II_MPI_CONST_CAST

#define DEAL_II_MPI_CONST_CAST (   expr)    (expr)

Helper macro to remove const from the pointer arguments to some MPI_* functions.

This is needed as the input arguments of functions like MPI_Allgather() are not marked as const in OpenMPI 1.6.5. If using MPI 3 or newer, this macro is a NOOP, while we do the following otherwise:

  1. remove * from type of expr
  2. remove const from resulting type
  3. add * to resulting type
  4. const_cast the given expression expr to this new type.

Definition at line 82 of file mpi.h.