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...
 

Functions

template<typename T_ >
const Datatypeautotype ()
 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_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_.

◆ 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::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 124 of file dist.hpp.

◆ dt_char

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

Datatype wrapper for MPI_CHAR.

Definition at line 126 of file dist.hpp.

◆ dt_double

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

Datatype wrapper for MPI_DOUBLE.

Definition at line 152 of file dist.hpp.

◆ dt_float

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

Datatype wrapper for MPI_FLOAT.

Definition at line 150 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 154 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 130 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 134 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 158 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 160 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 162 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 156 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 136 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 138 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 132 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 140 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 144 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 166 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 168 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 170 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 164 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 146 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 148 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 142 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 128 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 271 of file dist.hpp.

Referenced by FEAT::Global::MeanFilter< DT_, IT_ >::MeanFilter(), FEAT::Solver::SchwarzPrecond< Global::Vector< LocalVector_, Mirror_ >, Global::Filter< LocalFilter_, Mirror_ > >::apply(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::asm_adp_symbolic(), FEAT::Global::AlgDofParti< LAFEM::DenseVector< DT_, IT_ >, LAFEM::VectorMirror< DT_, IT_ > >::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::MemoryUsage::format_peak_physical_usage(), 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(), 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::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(), FEAT::Assembly::VelocityInfo< DataType_, dim_ >::synchronize(), and FEAT::Global::Matrix< LocalMatrix_, RowMirror_, ColMirror_ >::used_elements().