DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
DNDS::MPI::CommStrategy Class Reference

Process-wide singleton that selects how ArrayTransformer packs and waits for MPI messages. More...

#include <MPI.hpp>

Public Types

enum  ArrayCommType { UnknownArrayCommType = 0 , HIndexed = 1 , InSituPack = 2 }
 Which derived-type strategy ArrayTransformer should use. More...
 

Public Member Functions

ArrayCommType GetArrayStrategy ()
 Current array-pack strategy.
 
void SetArrayStrategy (ArrayCommType t)
 Override the array-pack strategy (affects subsequently-created transformers).
 
bool GetUseStrongSyncWait () const
 Whether barriers are inserted around Waitall for profiling.
 
bool GetUseAsyncOneByOne () const
 Whether transformers should use one-by-one Isend/Irecv.
 
double GetUseLazyWait () const
 Polling interval (ns) for MPI::WaitallLazy. 0 means use MPI_Waitall.
 

Static Public Member Functions

static CommStrategyInstance ()
 Access the process-wide singleton.
 

Static Public Attributes

static const int Ntype = 10
 

Detailed Description

Process-wide singleton that selects how ArrayTransformer packs and waits for MPI messages.

Settings affect every transformer:

  • ArrayCommType: HIndexed (default: MPI_Type_create_hindexed derived types) vs InSituPack (manual memcpy into contiguous send/recv buffers). The latter can be faster on networks where derived types pay large unpacking overhead.
  • UseStrongSyncWait: insert barriers around wait calls for easier profiling.
  • UseAsyncOneByOne: issue per-peer Isend/ Irecv instead of one persistent Startall.
  • UseLazyWait: poll interval (ns) used by MPI::WaitallLazy.

Must be constructed under MPI_COMM_WORLD. Thread-safe C++11 singleton.

Definition at line 728 of file MPI.hpp.

Member Enumeration Documentation

◆ ArrayCommType

Which derived-type strategy ArrayTransformer should use.

Enumerator
UnknownArrayCommType 

Sentinel / uninitialised.

HIndexed 

Use MPI_Type_create_hindexed derived types (default).

InSituPack 

Manually pack / unpack into contiguous buffers.

Definition at line 732 of file MPI.hpp.

Member Function Documentation

◆ GetArrayStrategy()

CommStrategy::ArrayCommType DNDS::MPI::CommStrategy::GetArrayStrategy ( )

Current array-pack strategy.

Definition at line 421 of file MPI.cpp.

Here is the caller graph for this function:

◆ GetUseAsyncOneByOne()

bool DNDS::MPI::CommStrategy::GetUseAsyncOneByOne ( ) const

Whether transformers should use one-by-one Isend/Irecv.

Definition at line 436 of file MPI.cpp.

◆ GetUseLazyWait()

double DNDS::MPI::CommStrategy::GetUseLazyWait ( ) const

Polling interval (ns) for MPI::WaitallLazy. 0 means use MPI_Waitall.

Definition at line 441 of file MPI.cpp.

◆ GetUseStrongSyncWait()

bool DNDS::MPI::CommStrategy::GetUseStrongSyncWait ( ) const

Whether barriers are inserted around Waitall for profiling.

Definition at line 431 of file MPI.cpp.

◆ Instance()

CommStrategy & DNDS::MPI::CommStrategy::Instance ( )
static

Access the process-wide singleton.

Definition at line 415 of file MPI.cpp.

Here is the caller graph for this function:

◆ SetArrayStrategy()

void DNDS::MPI::CommStrategy::SetArrayStrategy ( CommStrategy::ArrayCommType  t)

Override the array-pack strategy (affects subsequently-created transformers).

Definition at line 426 of file MPI.cpp.

Member Data Documentation

◆ Ntype

const int DNDS::MPI::CommStrategy::Ntype = 10
static

Definition at line 739 of file MPI.hpp.


The documentation for this class was generated from the following files: