-
Notifications
You must be signed in to change notification settings - Fork 52
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
file based bp5 writer hang #1655
Comments
I think I came across sth similar last week (but I actually got an error instead of a hang). |
Hello @guj and @pgrete series.writeIterations()[1].seriesFlush(); This is guaranteed to flush Iteration 1 on all ranks regardless if it is modified or not. |
Thanks Franz., the work around works. |
@franzpoeschel I am wondering if we can in series.flush(); // hangs here we can call something like series.writeIterations()[i].seriesFlush(); for the iterations that are marked open, to make sure the initial code works and we can simplify the API contract again so that |
To enable it, put it in the openPMD option through input file: e.g. ``` diag1.openpmd_backend = bp5 diag1.adios2_engine.parameters.FlattenSteps = on ``` This feature is useful for BTD use case. Data can be flushed after each buffered writes of a snapshot To check weather this feature is in use, try "bpls -V your_bp_file_name" Also adds a fix as in openPMD/openPMD-api#1655 for BP5 with file-based encoding, i.e., when some ranks have no particles. --------- Co-authored-by: Junmin Gu <[email protected]> Co-authored-by: Luca Fedeli <[email protected]> Co-authored-by: Junmin Gu <[email protected]> Co-authored-by: Axel Huebl <[email protected]>
Describe the bug
The recent optimization breaks a MPI use case when in file based mode. A minimal code is included below. One can use 2 ranks to see effect.
In short, at the second flush, rank 1 has nothing to contribute, so it didn't call BP5 while rank 0 did. In essence, BP5 write is collective. So rank 0 hangs because inactivity of rank 1.
If we use variable based, it looks like a flush to ADIOS is forced (by openPMD-api? ) on all ranks and so it works.
To Reproduce
c++ example:
#include <openPMD/openPMD.hpp>
#include <mpi.h>
#include
#include
using std::cout;
using namespace openPMD;
int main(int argc, char *argv[])
{
int provided;
MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided);
}
Software Environment
Additional context
The text was updated successfully, but these errors were encountered: