File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ namespace internal
182182 * To be used for reading
183183 */
184184 FlushParams const defaultFlushParams{};
185+ FlushParams const publicFlush{FlushLevel::UserFlush};
185186
186187 struct ParsedFlushParams ;
187188
Original file line number Diff line number Diff line change @@ -898,7 +898,7 @@ OPENPMD_private
898898 iterations_iterator end,
899899 internal::FlushParams const &flushParams,
900900 bool flushIOHandler = true );
901- void flushRankTable ();
901+ void flushRankTable (FlushLevel );
902902 /* Parameter `read_only_this_single_iteration` used for reopening an
903903 * Iteration after closing it.
904904 */
Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ void Iteration::flushFileBased(
260260 s.get ()
261261 .m_rankTable .m_attributable .get ()
262262 .m_writable .abstractFilePosition .reset ();
263- s.flushRankTable ();
263+ s.flushRankTable (flushParams. flushLevel );
264264
265265 /* create basePath */
266266 Parameter<Operation::CREATE_PATH> pCreate;
Original file line number Diff line number Diff line change @@ -405,7 +405,7 @@ chunk_assignment::RankMeta Series::rankTable([[maybe_unused]] bool collective)
405405 readDataset.data = get;
406406
407407 IOHandler ()->enqueue (IOTask (&rankTable.m_attributable , readDataset));
408- IOHandler ()->flush (internal::defaultFlushParams );
408+ IOHandler ()->flush (internal::publicFlush );
409409 };
410410
411411#if openPMD_HAVE_MPI
@@ -464,8 +464,12 @@ Series &Series::setRankTable(const std::string &myRankInfo)
464464 return *this ;
465465}
466466
467- void Series::flushRankTable ()
467+ void Series::flushRankTable (FlushLevel l )
468468{
469+ if (!flush_level::global_flushpoint (l))
470+ {
471+ return ;
472+ }
469473 auto &series = get ();
470474 auto &rankTable = series.m_rankTable ;
471475 auto maybeMyRankInfo = std::visit (
@@ -1629,7 +1633,7 @@ void Series::flushGorVBased(
16291633 fCreate .name = series.m_name ;
16301634 IOHandler ()->enqueue (IOTask (this , fCreate ));
16311635
1632- flushRankTable ();
1636+ flushRankTable (flushParams. flushLevel );
16331637 }
16341638
16351639 series.iterations .flush (
Original file line number Diff line number Diff line change @@ -1972,6 +1972,10 @@ inline void fileBased_write_test(const std::string &backend)
19721972 " \\ " ,
19731973 " /" ));
19741974
1975+ // TODO: somehow make the rank table appear in iteration 1
1976+ o.iterations [1 ];
1977+ o.flush ();
1978+
19751979 ParticleSpecies &e_1 = o.iterations [1 ].particles [" e" ];
19761980
19771981 std::vector<double > position_global (4 );
You can’t perform that action at this time.
0 commit comments