← Documentation
ADS-IDAC Engine 5.0.0
PEOutput.h File Reference

Pivotal-event output layouts (one file per node, or self-delimiting records in one aggregate per rank), rank-local compaction, and the sequential end-of-run renumber (journaled, filename-only in the per-file layout). More...

#include <algorithm>
#include <filesystem>
#include <fstream>
#include <map>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for PEOutput.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  adsidac
 
namespace  adsidac::pe
 

Functions

const char * adsidac::pe::aggregate_basename ()
 Basename of the aggregate file ("ZPENodes_agg.txt"). It is in the MPI merge's append-files list, so rank copies concatenate rather than overwrite. Note that the glob ZPENode* also matches this name. More...
 
void adsidac::pe::append_record (const std::string &pe_dir, int branch_id, const std::string &content)
 Append one node record to <pe_dir>ZPENodes_agg.txt. More...
 
void adsidac::pe::parse_aggregate (const fs::path &path, std::vector< std::pair< int, std::string > > &out)
 Parse one aggregate file, appending (id, content) to out in file order, duplicates and negative ids included. More...
 
std::pair< size_t, size_t > adsidac::pe::compact_aggregate (const fs::path &agg_path)
 Rewrite one rank's aggregate file last-wins per id, sorted by id. More...
 
std::vector< std::pair< int, std::string > > adsidac::pe::collect (const std::string &pe_dir)
 Collect every PE node under pe_dir (recursively), from either layout, reading all node content into memory. More...
 
size_t adsidac::pe::rewrite_sequential (const std::string &pe_dir, std::vector< std::pair< int, std::string > > entries, bool aggregate)
 Replace the contents of pe_dir with entries renumbered 0..N-1 in ascending id order (the content path of the renumber). More...
 
size_t adsidac::pe::finalize_sequential (const std::string &pe_dir, bool aggregate)
 End-of-run finalize: renumber every PE node 0..N-1 in id order, ending in the same layout rewrite_sequential produces (a single PEFolder_0/, no negative-id sentinels, no other buckets). More...
 

Detailed Description

Pivotal-event output layouts (one file per node, or self-delimiting records in one aggregate per rank), rank-local compaction, and the sequential end-of-run renumber (journaled, filename-only in the per-file layout).

Definition in file PEOutput.h.