Skip to content

Commit

Permalink
WIP: Implement attribute_writing_ranks in HDF5
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Feb 5, 2024
1 parent bc3219c commit cc20b48
Show file tree
Hide file tree
Showing 2 changed files with 252 additions and 210 deletions.
16 changes: 16 additions & 0 deletions examples/5_write_parallel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@
*/
#include <openPMD/openPMD.hpp>

#include <openPMD/auxiliary/Environment.hpp>

#include <mpi.h>

#include <iostream>
#include <memory>
#include <sstream>
#include <vector> // std::vector

using std::cout;
Expand Down Expand Up @@ -56,6 +59,19 @@ stripe_size = 33554432
stripe_count = -1
)";

#if 1
subfiling_config =
[]() {
std::stringstream res;
res << "attribute_writing_ranks = ["
<< auxiliary::getEnvString("RANKS", "0") << "]";
auto res_str = res.str();
std::cout << "RETURNING: '" << res_str << "'" << std::endl;
return res_str;
}() +
subfiling_config;
#endif

// open file for writing
Series series = Series(
"../samples/5_parallel_write.h5",
Expand Down
Loading

0 comments on commit cc20b48

Please sign in to comment.