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 28, 2024
1 parent 267d1f6 commit 7222f20
Show file tree
Hide file tree
Showing 2 changed files with 248 additions and 202 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 @@ -59,6 +62,19 @@ stripe_count = -1
chunks = "auto"
)";

#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 7222f20

Please sign in to comment.