openPMD-api
 
Loading...
Searching...
No Matches
openPMD::chunk_assignment::Strategy Struct Referenceabstract

Interface for a chunk distribution strategy. More...

#include <ChunkInfo.hpp>

Inheritance diagram for openPMD::chunk_assignment::Strategy:
PyStrategy openPMD::chunk_assignment::BinPacking openPMD::chunk_assignment::Blocks openPMD::chunk_assignment::BlocksOfSourceRanks openPMD::chunk_assignment::ByCuboidSlice openPMD::chunk_assignment::DiscardingStrategy openPMD::chunk_assignment::FailingStrategy openPMD::chunk_assignment::FromPartialStrategy openPMD::chunk_assignment::RoundRobin openPMD::chunk_assignment::RoundRobinOfSourceRanks

Public Member Functions

Assignment assign (ChunkTable chunkTable, RankMeta const &in, RankMeta const &out, size_t my_rank, size_t num_ranks)
 Assign chunks to be loaded to reading processes.
 
virtual Assignment 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< Strategyclone () const =0
 

Detailed Description

Interface for a chunk distribution strategy.

Used for implementing algorithms that read a ChunkTable as produced by BaseRecordComponent::availableChunks() and produce as result a ChunkTable that guides data sinks on how to load data into reading processes.

Member Function Documentation

◆ assign() [1/2]

Assignment openPMD::chunk_assignment::Strategy::assign ( ChunkTable chunkTable,
RankMeta const & in,
RankMeta const & out,
size_t my_rank,
size_t num_ranks )

Assign chunks to be loaded to reading processes.

Parameters
chunkTableChunk table obtained by BaseRecordComponent::availableChunks().
inMeta information on writing processes, e.g. hostnames.
outMeta information on reading processes, e.g. hostnames.
my_rankRank 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_ranksNumber 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).
Returns
A table that assigns chunks to reading processes. Chunks are sorted by the destination process ID (MPI rank). Distribution strategies will in general only need to fill the chunks for the current (calling) process ID, but some (such as RoundRobin) will fill the information for other processes as well.

◆ assign() [2/2]

virtual Assignment openPMD::chunk_assignment::Strategy::assign ( PartialAssignment partialAssignment,
RankMeta const & in,
RankMeta const & out,
size_t my_rank,
size_t num_ranks )
pure virtual

Assign chunks to be loaded to reading processes.

To be defined by implementors.

Parameters
partialAssignmentTwo 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.
inMeta information on writing processes, e.g. hostnames.
outMeta information on reading processes, e.g. hostnames.
my_rankRank 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_ranksNumber 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).
Returns
A table that assigns chunks to reading processes. Chunks are sorted by the destination process ID (MPI rank). Distribution strategies will in general only need to fill the chunks for the current (calling) process ID, but some (such as RoundRobin) will fill the information for other processes as well.

Implemented in openPMD::chunk_assignment::BinPacking, openPMD::chunk_assignment::Blocks, openPMD::chunk_assignment::BlocksOfSourceRanks, openPMD::chunk_assignment::ByCuboidSlice, openPMD::chunk_assignment::DiscardingStrategy, openPMD::chunk_assignment::FailingStrategy, openPMD::chunk_assignment::FromPartialStrategy, openPMD::chunk_assignment::RoundRobin, openPMD::chunk_assignment::RoundRobinOfSourceRanks, and PyStrategy.


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