A chunk distribution strategy that guarantees no complete distribution. More...
#include <ChunkInfo.hpp>
Public Member Functions | |
| PartialAssignment | assign (ChunkTable table, RankMeta const &in, RankMeta const &out, size_t my_rank, size_t num_ranks) |
| Assign chunks to be loaded to reading processes. | |
| virtual PartialAssignment | assign (PartialAssignment partialAssignment, RankMeta const &in, RankMeta const &out, size_t my_rank, size_t num_ranks)=0 |
| Assign chunks to be loaded to reading processes. | |
| virtual std::unique_ptr< PartialStrategy > | clone () const =0 |
A chunk distribution strategy that guarantees no complete distribution.
Combine with a full Strategy using the FromPartialStrategy struct to obtain a Strategy that works in two phases:
A typical partial assignment strategy is ByHostname, which can assign chunks only within one compute node and will fail if there is no consumer in that same compute node.
| PartialAssignment openPMD::chunk_assignment::PartialStrategy::assign | ( | ChunkTable | table, |
| RankMeta const & | in, | ||
| RankMeta const & | out, | ||
| size_t | my_rank, | ||
| size_t | num_ranks ) |
Assign chunks to be loaded to reading processes.
| table | Chunk table obtained by BaseRecordComponent::availableChunks(). Merge the unassigned chunks into the partially assigned table. |
| in | Meta information on writing processes, e.g. hostnames. |
| out | Meta information on reading processes, e.g. hostnames. |
| my_rank | Rank identifier for the current process. Will be considered by some distribution strategies that may be called for only a subselection of the data space (e.g. for distributing data within processes on the same compute node in a cluster). |
| num_ranks | Number of processes among which chunks are to be distributed. Will be considered by some distribution strategies that may be called for only a subselection of the data space (e.g. for distributing data within processes on the same compute node in a cluster). |
|
pure virtual |
Assign chunks to be loaded to reading processes.
To be defined by implementors.
| partialAssignment | Two chunktables, one of unassigned chunks and one of chunks that might have already been assigned previously. Merge the unassigned chunks into the partially assigned table. |
| in | Meta information on writing processes, e.g. hostnames. |
| out | Meta information on reading processes, e.g. hostnames. |
| my_rank | Rank identifier for the current process. Will be considered by some distribution strategies that may be called for only a subselection of the data space (e.g. for distributing data within processes on the same compute node in a cluster). |
| num_ranks | Number of processes among which chunks are to be distributed. Will be considered by some distribution strategies that may be called for only a subselection of the data space (e.g. for distributing data within processes on the same compute node in a cluster). |
Implemented in openPMD::chunk_assignment::ByHostname, and PyPartialStrategy.