Concrete derivation of DataStackBase, managing an array of fundamental data types (or tuples thereof, if DataStackBase::typeMultiplicity is greater than one).
More...
#include <LoadManager.hpp>
|
| DataStack () |
| Construct a new Data Stack object. More...
|
|
void | applyCalculator (const int i) override |
| Invoke internal calculator and write result to the data array at the specified index. More...
|
|
void | send (const int offset, const int count, const int serverRank, const MPI_Comm communicator) const override |
| Send a data block to a different MPI rank, typically the server rank. More...
|
|
void | receive (const int offset, const int count, const int rank, const MPI_Comm communicator, MPI_Request &request) override |
| Asynchronously receive a data block from a different MPI rank. More...
|
|
void | broadcast (const int serverRank, const MPI_Comm communicator) override |
| Broadcast a data block from the server rank to all other MPI ranks. More...
|
|
|
enum | StackType { StackType::Explicit,
StackType::Implicit,
StackType::Slave,
StackType::Passive
} |
| List to identify the different traits of DataStack. More...
|
|
enum | MessageTag { MessageTag::Chunk,
MessageTag::ChunkReturn
} |
| Internal message tags for MPI communication. More...
|
|
virtual | ~DataStackBase () |
| Virtual destructor.
|
|
StackType | type |
| Specifies the trait of the stack. More...
|
|
StackIdentifier | master |
| Specifies the id of an associated stack. Only relevant for slave stacks, otherwise set to -1. More...
|
|
int | size |
| Number of elements (or tuples of elements if DataStackBase::typeMultiplicity is greater than one) stored in the stack.
|
|
int | typeMultiplicity |
| Multiplicity of each element. Cannot be greater than one for explicit stacks. If greater than one, the data stack is assumed to consist of tuples of fundamental data types. Element indexing then refers to the tuples, not the fundamental data types.
|
|
int | recommendedChunkSizeMultiple |
| When breaking the data stack down into smaller work chunks, attempt to form chunks whose size is a multiple of the given value. This is helpful if calculators vary in runtime, but can be joined to groups whose collective runtime is expected to be constant.
|
|
int | recommendedChunksPerRank |
| When breaking the data stack down into smaller work chunks, attempt to form approximately the specified number of chunks per MPI rank.
|
|
bool | autoBroadcast |
| If set to true, modifications to the stack's data that are a consequence of the onvication of calculators are automatically communicated across all MPI ranks. If set to false, they are only sent to the MPI server rank.
|
|
template<class StackT>
struct HMP::LoadManager::DataStack< StackT >
Concrete derivation of DataStackBase, managing an array of fundamental data types (or tuples thereof, if DataStackBase::typeMultiplicity is greater than one).
- Template Parameters
-
StackT | The fundamental data type stored in the internal data array. |
◆ DataStack()
◆ applyCalculator()
template<class StackT >
|
inlineoverrideprotectedvirtual |
Invoke internal calculator and write result to the data array at the specified index.
- Parameters
-
i | Index of the element to which the result is written. |
Reimplemented from HMP::LoadManager::DataStackBase.
◆ broadcast()
template<class StackT >
|
inlineoverrideprotectedvirtual |
Broadcast a data block from the server rank to all other MPI ranks.
- Parameters
-
serverRank | The MPI rank to take the role of the sender. |
communicator | The MPI communicator used for communication. |
Reimplemented from HMP::LoadManager::DataStackBase.
◆ receive()
template<class StackT >
void HMP::LoadManager::DataStack< StackT >::receive |
( |
const int |
offset, |
|
|
const int |
count, |
|
|
const int |
rank, |
|
|
const MPI_Comm |
communicator, |
|
|
MPI_Request & |
request |
|
) |
| |
|
inlineoverrideprotectedvirtual |
Asynchronously receive a data block from a different MPI rank.
- Parameters
-
[in] | offset | Id of the first element of the data block to be received, measured in number of entries (or number of entry tuples, if DataStackBase::typeMultiplicity is greater than one). |
[in] | count | Number of elements (or element tuples) to be received. |
[in] | rank | Sender's MPI rank. |
[in] | communicator | The MPI communicator used for communication. |
[out] | request | MPI request object for the communication; Should be used to determine whether the non-blocking receive has been completed. |
Reimplemented from HMP::LoadManager::DataStackBase.
◆ send()
template<class StackT >
void HMP::LoadManager::DataStack< StackT >::send |
( |
const int |
offset, |
|
|
const int |
count, |
|
|
const int |
serverRank, |
|
|
const MPI_Comm |
communicator |
|
) |
| const |
|
inlineoverrideprotectedvirtual |
Send a data block to a different MPI rank, typically the server rank.
- Parameters
-
offset | Id of the first element of the data block to be sent, measured in number of entries (or number of entry tuples, if DataStackBase::typeMultiplicity is greater than one). |
count | Number of elements (or element tuples) to be sent. |
serverRank | Receiver's MPI rank, typically the server rank. |
communicator | The MPI communicator used for communication. |
Reimplemented from HMP::LoadManager::DataStackBase.
The documentation for this struct was generated from the following file: