ls1-MarDyn
ls1-MarDyn molecular dynamics code
Public Member Functions | List of all members
CollectiveCommunicationNonBlocking Class Reference

#include <CollectiveCommunicationNonBlocking.h>

Inheritance diagram for CollectiveCommunicationNonBlocking:
CollectiveCommunicationInterface CollectiveCommBaseInterface

Public Member Functions

 CollectiveCommunicationNonBlocking ()
 Constructor, does nothing yet.
 
 ~CollectiveCommunicationNonBlocking () override=default
 
void init (MPI_Comm communicator, int numValues, int key=0) override
 allocate memory for the values to be sent, initialize counters for specific More...
 
void finalize () override
 delete memory and MPI_Type More...
 
void appendInt (int intValue) override
 
void appendUnsLong (unsigned long unsLongValue) override
 
void appendFloat (float floatValue) override
 
void appendDouble (double doubleValue) override
 
void appendLongDouble (long double longDoubleValue) override
 
MPI_Comm getTopology () override
 
int getInt () override
 
unsigned long getUnsLong () override
 
float getFloat () override
 
double getDouble () override
 
long double getLongDouble () override
 
void broadcast (int root=0) override
 
void allreduceSum () override
 Do Allreduce off all values with reduce operation add. More...
 
virtual void allreduceSumAllowPrevious () override
 
void allreduceCustom (ReduceType type) override
 
void scanSum () override
 Performs a scan (sum) More...
 
size_t getTotalSize () override
 
- Public Member Functions inherited from CollectiveCommunicationInterface
 ~CollectiveCommunicationInterface () override=default
 virtual destructor
 
- Public Member Functions inherited from CollectiveCommBaseInterface
virtual ~CollectiveCommBaseInterface ()
 virtual destructor
 

Detailed Description

CollectiveCommunicationNonBlocking provides an interface to access multiple CollectiveCommunicationSingleNonBlocking objects. This allows the use of multiple different collective calls, which is needed for the different ensembles.

Author
Steffen Seckler
Note
requires MPI >= 3!

Constructor & Destructor Documentation

◆ ~CollectiveCommunicationNonBlocking()

CollectiveCommunicationNonBlocking::~CollectiveCommunicationNonBlocking ( )
overridedefault

Destructor

Member Function Documentation

◆ allreduceCustom()

void CollectiveCommunicationNonBlocking::allreduceCustom ( ReduceType  type)
inlineoverridevirtual

Performs an allreduce operation with a custom reduce type.

Parameters
typethe type of the operation

Implements CollectiveCommBaseInterface.

◆ allreduceSum()

void CollectiveCommunicationNonBlocking::allreduceSum ( )
inlineoverridevirtual

Do Allreduce off all values with reduce operation add.

Implements CollectiveCommBaseInterface.

◆ allreduceSumAllowPrevious()

virtual void CollectiveCommunicationNonBlocking::allreduceSumAllowPrevious ( )
inlineoverridevirtual

Performs an all-reduce (sum), however values of previous iterations are permitted. By allowing values from previous iterations, overlapping communication is possible. One possible use case for this function is the reduction of slowly changing variables, e.g. the temperature.

Implements CollectiveCommunicationInterface.

◆ appendDouble()

void CollectiveCommunicationNonBlocking::appendDouble ( double  doubleValue)
inlineoverridevirtual

Append a double value to the list of values to be sent

Parameters
unsLongValuevalue to be appended

Implements CollectiveCommBaseInterface.

◆ appendFloat()

void CollectiveCommunicationNonBlocking::appendFloat ( float  floatValue)
inlineoverridevirtual

Append a float value to the list of values to be sent

Parameters
unsLongValuevalue to be appended

Implements CollectiveCommBaseInterface.

◆ appendInt()

void CollectiveCommunicationNonBlocking::appendInt ( int  intValue)
inlineoverridevirtual

Append an int value to the list of values to be sent

Parameters
intValuevalue to be appended

Implements CollectiveCommBaseInterface.

◆ appendLongDouble()

void CollectiveCommunicationNonBlocking::appendLongDouble ( long double  longDoubleValue)
inlineoverridevirtual

Append a long double value to the list of values to be sent

Parameters
unsLongValuevalue to be appended

Implements CollectiveCommBaseInterface.

◆ appendUnsLong()

void CollectiveCommunicationNonBlocking::appendUnsLong ( unsigned long  unsLongValue)
inlineoverridevirtual

Append a unsigned long value to the list of values to be sent

Parameters
unsLongValuevalue to be appended

Implements CollectiveCommBaseInterface.

◆ broadcast()

void CollectiveCommunicationNonBlocking::broadcast ( int  root = 0)
inlineoverridevirtual

Broadcast all values from the process with rank 0 to all others

Parameters
rootThe root of the broadcast

Implements CollectiveCommBaseInterface.

◆ finalize()

void CollectiveCommunicationNonBlocking::finalize ( )
inlineoverridevirtual

delete memory and MPI_Type

Parameters
keyThe key of the collective communication

Implements CollectiveCommBaseInterface.

◆ getDouble()

double CollectiveCommunicationNonBlocking::getDouble ( )
inlineoverridevirtual

Get the next value from the list, which must be double

no check is performed that the type is correct, so we rely on the sanity of the programmer to ensure FIFO ordering w.r.t. append-get order

Returns
the value

Implements CollectiveCommBaseInterface.

◆ getFloat()

float CollectiveCommunicationNonBlocking::getFloat ( )
inlineoverridevirtual

Get the next value from the list, which must be float

no check is performed that the type is correct, so we rely on the sanity of the programmer to ensure FIFO ordering w.r.t. append-get order

Returns
the value

Implements CollectiveCommBaseInterface.

◆ getInt()

int CollectiveCommunicationNonBlocking::getInt ( )
inlineoverridevirtual

Get the next value from the list, which must be int

no check is performed that the type is correct, so we rely on the sanity of the programmer to ensure FIFO ordering w.r.t. append-get order

Returns
the value

Implements CollectiveCommBaseInterface.

◆ getLongDouble()

long double CollectiveCommunicationNonBlocking::getLongDouble ( )
inlineoverridevirtual

Get the next value from the list, which must be long double

no check is performed that the type is correct, so we rely on the sanity of the programmer to ensure FIFO ordering w.r.t. append-get order

Returns
the value

Implements CollectiveCommBaseInterface.

◆ getTopology()

MPI_Comm CollectiveCommunicationNonBlocking::getTopology ( )
inlineoverridevirtual

Get the MPI communicator

Returns
MPI communicator

Implements CollectiveCommunicationInterface.

◆ getTotalSize()

size_t CollectiveCommunicationNonBlocking::getTotalSize ( )
inlineoverridevirtual

Waits until collective operation is finished.

Parameters
keyThe key of the collective communication

Implements CollectiveCommBaseInterface.

◆ getUnsLong()

unsigned long CollectiveCommunicationNonBlocking::getUnsLong ( )
inlineoverridevirtual

Get the next value from the list, which must be unsigned long

no check is performed that the type is correct, so we rely on the sanity of the programmer to ensure FIFO ordering w.r.t. append-get order

Returns
the value

Implements CollectiveCommBaseInterface.

◆ init()

void CollectiveCommunicationNonBlocking::init ( MPI_Comm  communicator,
int  numValues,
int  key = 0 
)
inlineoverridevirtual

allocate memory for the values to be sent, initialize counters for specific

Parameters
keyThe key of the collective communication, this key will be used
communicatorMPI communicator for the
numValuesnumber of values that shall be communicated

Implements CollectiveCommunicationInterface.

◆ scanSum()

void CollectiveCommunicationNonBlocking::scanSum ( )
inlineoverridevirtual

Performs a scan (sum)

Implements CollectiveCommBaseInterface.


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