Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for independent writes to Iterations in parallel, better detection of BP5 which in turn uncovers more instances of the first issue #1619

Open
wants to merge 13 commits into
base: dev
Choose a base branch
from

Conversation

franzpoeschel
Copy link
Contributor

@franzpoeschel franzpoeschel commented May 8, 2024

This somewhat fixes #1616 until we add a better solution. With this PR: seriesFlush() will always flush the containing Iteration if called from within an Iteration (and will ignore missing dirty annotations).

At the same time, I added a better detection for BP5-specific features. Since this means that adios2::Engine::PerformDataWrite() is used automatically more often, this uncovers further parallel flushing bugs. So, these two items are treated together in this PR.

In a follow-up PR later on, as a more breaking change, we would also flush all open iterations in MPI-parallel contexts on series.flush(), but for this we will first need functionality to reopen iterations after close #1592.

TODO:

  • documentation
  • testing

test/ParallelIOTest.cpp Fixed Show fixed Hide fixed
@franzpoeschel franzpoeschel changed the title Workaround for independent writes to Iterations in parallel Workaround for independent writes to Iterations in parallel, better detection of BP5 which in turn uncovers more instances of the first issue Jun 6, 2024
@@ -946,10 +946,16 @@ void hipace_like_write(std::string const &file_ending)
int const last_step = 100;
int const my_first_step = i_mpi_rank * int(local_Nz);
int const all_last_step = last_step + (i_mpi_size - 1) * int(local_Nz);

bool participate_in_barrier = true;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ax3l Can you please check if this bug also affects Hipace? Currently, the sequence of barriers and flushes dont match from rank to rank. This was uncovered only now, since flushing is effectively not collective in many situations, but this test now uses adios2::Engine::PerformDataWrite() of BP5 which is a bit stricter there.

"adios2.engine.preferred_flush_target = \"buffer\"");
int size, rank;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parallel flushing cannot rely on dirty checks
2 participants