ls1-MarDyn
ls1-MarDyn molecular dynamics code
|
This class is a dummy class which ensures that the collective communication commands also work if the program is executed sequentially without MPI. More...
#include <CollectiveCommBase.h>
Classes | |
union | valType |
Public Member Functions | |
void | init (int numValues) |
allocate memory for the values to be stored, initialize getter-iterator More... | |
virtual void | appendInt (int intValue) override |
virtual void | appendUnsLong (unsigned long unsLongValue) override |
virtual void | appendFloat (float floatValue) override |
virtual void | appendDouble (double doubleValue) override |
virtual void | appendLongDouble (long double longDoubleValue) override |
virtual void | broadcast (int=0) override |
virtual void | allreduceSum () override |
Performs an all-reduce (sum) More... | |
virtual void | allreduceCustom (ReduceType type) override |
virtual void | scanSum () override |
Performs a scan (sum) More... | |
virtual int | getInt () override |
virtual unsigned long | getUnsLong () override |
virtual float | getFloat () override |
virtual double | getDouble () override |
virtual long double | getLongDouble () override |
virtual void | finalize () override |
delete memory and MPI_Type More... | |
virtual size_t | getTotalSize () override |
![]() | |
virtual | ~CollectiveCommBaseInterface () |
virtual destructor | |
Protected Attributes | |
std::vector< valType > | _values |
Vector to store the values which shall be communicated. | |
std::vector< valType >::const_iterator | _getter |
Iterator to extract the values which were communicated. | |
This class is a dummy class which ensures that the collective communication commands also work if the program is executed sequentially without MPI.
Refactored to increase code-reuse
To fully understand the purpose of this class, read the documentation of the class CollectiveCommunication. The application developer should not have to care whether the program will be executed in parallel or sequentially. The only thing that the application developer should know that there might be several processes and at some point in the simulation those have to do a collective communication to broadcast or reduce values. Those values are given to the domain decomposition method, the communication command is executed by the domain decomp and the values can be read again. This class just has to ensure that this also works if there is no real domain decomposition but the class DomainDecompBase is used.
|
inlineoverridevirtual |
Performs an allreduce operation with a custom reduce type.
type | the type of the operation |
Implements CollectiveCommBaseInterface.
Reimplemented in CollectiveCommunication.
|
inlineoverridevirtual |
Performs an all-reduce (sum)
Implements CollectiveCommBaseInterface.
Reimplemented in CollectiveCommunication.
|
inlineoverridevirtual |
Append a double value to the list of values to be stored
doubleValue | the value |
Implements CollectiveCommBaseInterface.
Reimplemented in CollectiveCommunication.
|
inlineoverridevirtual |
Append a float value to the list of values to be stored
floatValue | the value |
Implements CollectiveCommBaseInterface.
Reimplemented in CollectiveCommunication.
|
inlineoverridevirtual |
Append an int value to the list of values to be stored
intValue | the value |
Implements CollectiveCommBaseInterface.
Reimplemented in CollectiveCommunication.
|
inlineoverridevirtual |
Append a long double value to the list of values to be stored
longDoubleValue | the value |
Implements CollectiveCommBaseInterface.
Reimplemented in CollectiveCommunication.
|
inlineoverridevirtual |
Append a unsigned long value to the list of values to be stored
unsLongValue | the value |
Implements CollectiveCommBaseInterface.
Reimplemented in CollectiveCommunication.
|
inlineoverridevirtual |
Performs a broadcast of the values to all processes in the communicator
root | of the broadcast |
Implements CollectiveCommBaseInterface.
Reimplemented in CollectiveCommunication.
|
inlineoverridevirtual |
delete memory and MPI_Type
Implements CollectiveCommBaseInterface.
Reimplemented in CollectiveCommunication, and CollectiveCommunicationSingleNonBlocking.
|
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
Implements CollectiveCommBaseInterface.
|
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
Implements CollectiveCommBaseInterface.
|
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 order3
Implements CollectiveCommBaseInterface.
|
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
Implements CollectiveCommBaseInterface.
|
inlineoverridevirtual |
get the size of the entire object allocated memory
Implements CollectiveCommBaseInterface.
Reimplemented in CollectiveCommunication.
|
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
Implements CollectiveCommBaseInterface.
|
inline |
allocate memory for the values to be stored, initialize getter-iterator
numValues | number of values that shall be stored |
|
inlineoverridevirtual |
Performs a scan (sum)
Implements CollectiveCommBaseInterface.
Reimplemented in CollectiveCommunication.