openPMD-api
 
Loading...
Searching...
No Matches
openPMD::chunk_assignment::ByHostname Struct Reference

Strategy that assigns chunks to be read by processes within the same host that produced the chunk. More...

#include <ChunkInfo.hpp>

Inheritance diagram for openPMD::chunk_assignment::ByHostname:
openPMD::chunk_assignment::PartialStrategy

Public Member Functions

 ByHostname (std::unique_ptr< Strategy > withinNode)
 
PartialAssignment assign (PartialAssignment, RankMeta const &in, RankMeta const &out, size_t my_rank, size_t num_ranks) override
 Assign chunks to be loaded to reading processes.
 
virtual std::unique_ptr< PartialStrategyclone () const override
 
- Public Member Functions inherited from openPMD::chunk_assignment::PartialStrategy
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.
 

Detailed Description

Strategy that assigns chunks to be read by processes within the same host that produced the chunk.

The distribution strategy within one such chunk can be flexibly chosen.

Member Function Documentation

◆ assign()

PartialAssignment openPMD::chunk_assignment::ByHostname::assign ( PartialAssignment partialAssignment,
RankMeta const & in,
RankMeta const & out,
size_t my_rank,
size_t num_ranks )
overridevirtual

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
Two chunktables, one of leftover chunks that were not assigned and one that assigns chunks to reading processes. Assigned 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. Chunks assigned to another destination processes may be silently dropped.

Implements openPMD::chunk_assignment::PartialStrategy.

◆ clone()

std::unique_ptr< PartialStrategy > openPMD::chunk_assignment::ByHostname::clone ( ) const
overridevirtual

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