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 @@ -905,7 +905,7 @@ OPENPMD_private
905905 iterations_iterator end,
906906 internal::FlushParams const &flushParams,
907907 bool flushIOHandler = true );
908- void flushRankTable ();
908+ void flushRankTable (FlushLevel );
909909 /* Parameter `read_only_this_single_iteration` used for reopening an
910910 * Iteration after closing it.
911911 */
Original file line number Diff line number Diff line change @@ -302,7 +302,7 @@ void Iteration::flushFileBased(
302302 s.get ()
303303 .m_rankTable .m_attributable .get ()
304304 .m_writable .abstractFilePosition .reset ();
305- s.flushRankTable ();
305+ s.flushRankTable (flushParams. flushLevel );
306306
307307 /* create basePath */
308308 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