FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Dist Namespace Reference

Distributed Communication namespace. More...

Classes

class  Comm
 Communicator class. More...
 
struct  Datatype
 Communication Datatype class. More...
 
struct  Operation
 Communication Operation class. More...
 
class  Request
 Communication Request class. More...
 
class  RequestVector
 Communication Request vector class. More...
 
class  Status
 Communication Status class. More...
 
struct  TypeDescription
 Mapping from types to Typemaps. More...
 
class  Typemap
 MPI typemap description. More...
 
class  TypeRegistry
 Singleton for managing derived Datatypes. More...
 

Functions

template<typename T_ >
const Datatype & autotype ()
 Automatic Datatype deduction function template. More...
 
void finalize ()
 Finalizes the distributed communication system. More...
 
bool initialize (int &argc, char **&argv)
 Initializes the distributed communication system. More...
 

Variables

const Datatype dt__float128
 custom Datatype for __float128
 
const Datatype dt__half
 custom Datatype for __half
 
const Datatype dt_byte (MPI_BYTE, sizeof(char))
 Datatype wrapper for MPI_BYTE. More...
 
const Datatype dt_char (MPI_CHAR, sizeof(char))
 Datatype wrapper for MPI_CHAR. More...
 
const Datatype dt_double (MPI_DOUBLE, sizeof(double))
 Datatype wrapper for MPI_DOUBLE. More...
 
const Datatype dt_float (MPI_FLOAT, sizeof(float))
 Datatype wrapper for MPI_FLOAT. More...
 
const Datatype dt_long_double (MPI_LONG_DOUBLE, sizeof(long double))
 Datatype wrapper for MPI_LONG_DOUBLE. More...
 
const Datatype dt_packed (MPI_PACKED, sizeof(char))
 Datatype wrapper for MPI_PACKED. More...
 
const Datatype dt_signed_char (MPI_SIGNED_CHAR, sizeof(signed char))
 Datatype wrapper for MPI_SIGNED_CHAR. More...
 
const Datatype dt_signed_int (MPI_INT, sizeof(int))
 Datatype wrapper for MPI_INT. More...
 
const Datatype dt_signed_int16 (MPI_INT16_T, sizeof(std::int16_t))
 Datatype wrapper for MPI_INT16_T. More...
 
const Datatype dt_signed_int32 (MPI_INT32_T, sizeof(std::int32_t))
 Datatype wrapper for MPI_INT32_T. More...
 
const Datatype dt_signed_int64 (MPI_INT64_T, sizeof(std::int64_t))
 Datatype wrapper for MPI_INT64_T. More...
 
const Datatype dt_signed_int8 (MPI_INT8_T, sizeof(std::int8_t))
 Datatype wrapper for MPI_INT8_T. More...
 
const Datatype dt_signed_long (MPI_LONG, sizeof(long))
 Datatype wrapper for MPI_LONG. More...
 
const Datatype dt_signed_long_long (MPI_LONG_LONG, sizeof(long long))
 Datatype wrapper for MPI_LONG_LONG. More...
 
const Datatype dt_signed_short (MPI_SHORT, sizeof(short))
 Datatype wrapper for MPI_SHORT. More...
 
const Datatype dt_unsigned_char (MPI_UNSIGNED_CHAR, sizeof(unsigned char))
 Datatype wrapper for MPI_UNSIGNED_CHAR. More...
 
const Datatype dt_unsigned_int (MPI_UNSIGNED, sizeof(unsigned int))
 Datatype wrapper for MPI_UNSIGNED. More...
 
const Datatype dt_unsigned_int16 (MPI_UINT16_T, sizeof(std::uint16_t))
 Datatype wrapper for MPI_UINT16_T. More...
 
const Datatype dt_unsigned_int32 (MPI_UINT32_T, sizeof(std::uint32_t))
 Datatype wrapper for MPI_UINT32_T. More...
 
const Datatype dt_unsigned_int64 (MPI_UINT64_T, sizeof(std::uint64_t))
 Datatype wrapper for MPI_UINT64_T. More...
 
const Datatype dt_unsigned_int8 (MPI_UINT8_T, sizeof(std::uint8_t))
 Datatype wrapper for MPI_UINT8_T. More...
 
const Datatype dt_unsigned_long (MPI_UNSIGNED_LONG, sizeof(unsigned long))
 Datatype wrapper for MPI_UNSIGNED_LONG. More...
 
const Datatype dt_unsigned_long_long (MPI_UNSIGNED_LONG_LONG, sizeof(unsigned long long))
 Datatype wrapper for MPI_UNSIGNED_LONG_LONG. More...
 
const Datatype dt_unsigned_short (MPI_UNSIGNED_SHORT, sizeof(unsigned short))
 Datatype wrapper for MPI_UNSIGNED_SHORT. More...
 
const Datatype dt_wchar (MPI_WCHAR, sizeof(wchar_t))
 Datatype wrapper for MPI_WCHAR. More...
 
const Operation op_max (MPI_MAX)
 Operation wrapper for MPI_MAX. More...
 
const Operation op_min (MPI_MIN)
 Operation wrapper for MPI_MIN. More...
 
const Operation op_sum (MPI_SUM)
 Operation wrapper for MPI_SUM. More...
 

Detailed Description

Distributed Communication namespace.

This namespaces encapsulates the classes required for distributed communication via the Message Passing Interface (MPI).

Function Documentation

◆ autotype()

template<typename T_ >
const Datatype & FEAT::Dist::autotype ( )

Automatic Datatype deduction function template.

This function returns the Datatype object for any of the fundamental C/C++ datatypes.

Template Parameters
T_The fundamental C/C++ datatype whose corresponding Datatype object is to be returned.
Returns
A reference to the dt_* Datatype object representing the type T_.

Definition at line 490 of file dist.hpp.

References FEAT::Dist::TypeRegistry::get_type(), and FEAT::Dist::TypeRegistry::instance().

◆ finalize()

void FEAT::Dist::finalize ( )

Finalizes the distributed communication system.

This function is effectively a wrapper around the MPI_Init function.

In addition, this function may perform further cleanup to release additionally defined datatype, operations, etc.

See also
[MPI31] Section 8.7, page 357

Definition at line 148 of file dist.cpp.

References FEAT::Dist::Datatype::dt, dt__float128, dt__half, FEAT::Dist::TypeRegistry::free(), FEAT::Dist::TypeRegistry::instance(), FEAT::Dist::Operation::op, and op_sum.

Referenced by FEAT::Runtime::finalize().

◆ initialize()

bool FEAT::Dist::initialize ( int &  argc,
char **&  argv 
)

Initializes the distributed communication system.

This function is effectively a wrapper around the MPI_Init function.

In addition, this function may perform further setup to initialize additional datatypes, operations, etc.:

  • If FEAT_HAVE_QUADMATH is defined, this function will initialize the dt__float128 datatype.
  • If FEAT_HAVE_HALFMATH is defined, this function will initialize the dt__half datatype.
  • If FEAT_OVERRIDE_MPI_OPS is defined, this function will override the standard op_sum, op_max and op_min operations by custom implementations.
See also
[MPI31] Section 8.7, page 355

Definition at line 105 of file dist.cpp.

References FEAT::Dist::Datatype::dt, dt__float128, dt__half, op_max, op_min, op_sum, and XASSERTM.

Referenced by FEAT::Runtime::initialize().

Variable Documentation

◆ dt_byte

const Datatype FEAT::Dist::dt_byte ( MPI_BYTE  ,
sizeof(char)   
)

Datatype wrapper for MPI_BYTE.

Definition at line 129 of file dist.hpp.

◆ dt_char

const Datatype FEAT::Dist::dt_char ( MPI_CHAR  ,
sizeof(char)   
)

Datatype wrapper for MPI_CHAR.

Definition at line 131 of file dist.hpp.

◆ dt_double

const Datatype FEAT::Dist::dt_double ( MPI_DOUBLE  ,
sizeof(double)   
)

Datatype wrapper for MPI_DOUBLE.

Definition at line 157 of file dist.hpp.

◆ dt_float

const Datatype FEAT::Dist::dt_float ( MPI_FLOAT  ,
sizeof(float)   
)

Datatype wrapper for MPI_FLOAT.

Definition at line 155 of file dist.hpp.

◆ dt_long_double

const Datatype FEAT::Dist::dt_long_double ( MPI_LONG_DOUBLE  ,
sizeof(long double)   
)

Datatype wrapper for MPI_LONG_DOUBLE.

Definition at line 159 of file dist.hpp.

◆ dt_packed

const Datatype FEAT::Dist::dt_packed ( MPI_PACKED  ,
sizeof(char)   
)

Datatype wrapper for MPI_PACKED.

Definition at line 177 of file dist.hpp.

◆ dt_signed_char

const Datatype FEAT::Dist::dt_signed_char ( MPI_SIGNED_CHAR  ,
sizeof(signed char)   
)

Datatype wrapper for MPI_SIGNED_CHAR.

Definition at line 135 of file dist.hpp.

◆ dt_signed_int

const Datatype FEAT::Dist::dt_signed_int ( MPI_INT  ,
sizeof(int)   
)

Datatype wrapper for MPI_INT.

Definition at line 139 of file dist.hpp.

◆ dt_signed_int16

const Datatype FEAT::Dist::dt_signed_int16 ( MPI_INT16_T  ,
sizeof(std::int16_t)   
)

Datatype wrapper for MPI_INT16_T.

Definition at line 163 of file dist.hpp.

◆ dt_signed_int32

const Datatype FEAT::Dist::dt_signed_int32 ( MPI_INT32_T  ,
sizeof(std::int32_t)   
)

Datatype wrapper for MPI_INT32_T.

Definition at line 165 of file dist.hpp.

◆ dt_signed_int64

const Datatype FEAT::Dist::dt_signed_int64 ( MPI_INT64_T  ,
sizeof(std::int64_t)   
)

Datatype wrapper for MPI_INT64_T.

Definition at line 167 of file dist.hpp.

◆ dt_signed_int8

const Datatype FEAT::Dist::dt_signed_int8 ( MPI_INT8_T  ,
sizeof(std::int8_t)   
)

Datatype wrapper for MPI_INT8_T.

Definition at line 161 of file dist.hpp.

◆ dt_signed_long

const Datatype FEAT::Dist::dt_signed_long ( MPI_LONG  ,
sizeof(long)   
)

Datatype wrapper for MPI_LONG.

Definition at line 141 of file dist.hpp.

◆ dt_signed_long_long

const Datatype FEAT::Dist::dt_signed_long_long ( MPI_LONG_LONG  ,
sizeof(long long)   
)

Datatype wrapper for MPI_LONG_LONG.

Definition at line 143 of file dist.hpp.

◆ dt_signed_short

const Datatype FEAT::Dist::dt_signed_short ( MPI_SHORT  ,
sizeof(short)   
)

Datatype wrapper for MPI_SHORT.

Definition at line 137 of file dist.hpp.

◆ dt_unsigned_char

const Datatype FEAT::Dist::dt_unsigned_char ( MPI_UNSIGNED_CHAR  ,
sizeof(unsigned char)   
)

Datatype wrapper for MPI_UNSIGNED_CHAR.

Definition at line 145 of file dist.hpp.

◆ dt_unsigned_int

const Datatype FEAT::Dist::dt_unsigned_int ( MPI_UNSIGNED  ,
sizeof(unsigned int)   
)

Datatype wrapper for MPI_UNSIGNED.

Definition at line 149 of file dist.hpp.

◆ dt_unsigned_int16

const Datatype FEAT::Dist::dt_unsigned_int16 ( MPI_UINT16_T  ,
sizeof(std::uint16_t)   
)

Datatype wrapper for MPI_UINT16_T.

Definition at line 171 of file dist.hpp.

◆ dt_unsigned_int32

const Datatype FEAT::Dist::dt_unsigned_int32 ( MPI_UINT32_T  ,
sizeof(std::uint32_t)   
)

Datatype wrapper for MPI_UINT32_T.

Definition at line 173 of file dist.hpp.

◆ dt_unsigned_int64

const Datatype FEAT::Dist::dt_unsigned_int64 ( MPI_UINT64_T  ,
sizeof(std::uint64_t)   
)

Datatype wrapper for MPI_UINT64_T.

Definition at line 175 of file dist.hpp.

◆ dt_unsigned_int8

const Datatype FEAT::Dist::dt_unsigned_int8 ( MPI_UINT8_T  ,
sizeof(std::uint8_t)   
)

Datatype wrapper for MPI_UINT8_T.

Definition at line 169 of file dist.hpp.

◆ dt_unsigned_long

const Datatype FEAT::Dist::dt_unsigned_long ( MPI_UNSIGNED_LONG  ,
sizeof(unsigned long)   
)

Datatype wrapper for MPI_UNSIGNED_LONG.

Definition at line 151 of file dist.hpp.

◆ dt_unsigned_long_long

const Datatype FEAT::Dist::dt_unsigned_long_long ( MPI_UNSIGNED_LONG_LONG  ,
sizeof(unsigned long long)   
)

Datatype wrapper for MPI_UNSIGNED_LONG_LONG.

Definition at line 153 of file dist.hpp.

◆ dt_unsigned_short

const Datatype FEAT::Dist::dt_unsigned_short ( MPI_UNSIGNED_SHORT  ,
sizeof(unsigned short)   
)

Datatype wrapper for MPI_UNSIGNED_SHORT.

Definition at line 147 of file dist.hpp.

◆ dt_wchar

const Datatype FEAT::Dist::dt_wchar ( MPI_WCHAR  ,
sizeof(wchar_t)   
)

Datatype wrapper for MPI_WCHAR.

Definition at line 133 of file dist.hpp.

◆ op_max

◆ op_min

◆ op_sum

const Operation FEAT::Dist::op_sum ( MPI_SUM  )

Operation wrapper for MPI_SUM.

Definition at line 571 of file dist.hpp.

Referenced by FEAT::Global::MeanFilter< DT_, IT_ >::MeanFilter(), FEAT::Global::AlgDofPartiSystem< LocalMatrix_, LocalFilter_, Mirror_ >::_assemble_structure(), FEAT::Solver::AmaVankaGMRES< Global::Matrix< LocalMatrix_, MirrorRow_, MirrorCol_ >, Global::Filter< LocalFilter_, MirrorRow_ > >::_calc_triple_dots_s(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::adp_compute_counts(), FEAT::Solver::SchwarzPrecond< Global::Vector< LocalVector_, Mirror_ >, Global::Filter< LocalFilter_, Mirror_ > >::apply(), FEAT::Global::AlgDofParti< LocalVector_, Mirror_ >::assemble_by_gate(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::bytes(), FEAT::Control::Meshopt::MeshoptControlBase< DomainControl_ >::compute_mesh_quality(), FEAT::Global::MeanFilter< DT_, IT_ >::filter_rhs(), FEAT::Global::MeanFilter< DT_, IT_ >::filter_sol(), finalize(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::format_timings(), FEAT::Global::Gate< LocalVector_, Mirror_ >::get_num_global_dofs(), FEAT::Global::Gate< LocalVector_, Mirror_ >::get_num_global_dofs_raw(), initialize(), FEAT::Assembly::ScalarDiscreteEvalData< DT_, dim_ >::mean_value_dist(), FEAT::Assembly::VectorDiscreteEvalData< DT_, dim_ >::mean_value_dist(), FEAT::Assembly::MatrixDiscreteEvalData< DT_, dim_i_, dim_j_ >::mean_value_dist(), FEAT::Global::Gate< LocalVector_, Mirror_ >::norm2_async(), FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::num_nzes(), FEAT::MeshOpt::MeshDeformer< MeshType_ >::scale_to_same_integral_mean(), FEAT::Global::Gate< LocalVector_, Mirror_ >::sum_async(), FEAT::Assembly::TraceAssemblyStokesBodyForceAssemblyJob< VectorVelo_, VectorPres_, SpaceVelo_, SpacePres_ >::sync(), FEAT::Assembly::ScalarErrorInfo< DataType_ >::synchronize(), FEAT::Assembly::VectorErrorInfo< DataType_, dim_ >::synchronize(), FEAT::Assembly::FunctionIntegralInfo< DataType_, ValueType_, GradientType_, HessianType_ >::synchronize(), and FEAT::Assembly::VelocityInfo< DataType_, dim_ >::synchronize().