-
Notifications
You must be signed in to change notification settings - Fork 126
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
Garbage data while appending local variables to a BP4 file several times #2987
Comments
@sergeylesnik thanks for providing the code snippet.
Yes, What's surprising is that Append still works the first time a file is opened (assuming it doesn't exist), maybe it needs an exception. Also, Append mode in parallel I/O is tricky since the same number of streams must be conserved (local and aggregators) so it's not as straight-forward (as in serial I/O) to add to any dataset. It's not the case in your example, but it's something to consider. |
@williamfgc tank you for the quick response.
The preferred way is to use BeginStep and EndStep to separate transport operations in Open/Close.
I can imagine that this is a difficult task. So, is this supported by ADIOS2? Back to the original problem. I've done some testing and found something that looks definitely like a bug to me. Consider the following example:
The values from the first run are OK but the second run delivers again garbage data for the 2nd rank. If I manually change the variable names ( |
Yes, this is a bug where aggregation + append causes corrupt data. Related to #2482 |
What @pnorbert said. Also, BP3 doesn't support "Append" mode (it should throw an exception, though), BP4 was added with the purpose of being a more streaming-friendly format, but as you can see there is always corner cases. |
Thanks for clarifying! We are implementing ADIOS as a parallel IO into OpenFOAM (a computational fluid dynamics library) and one of the important features in this context is aggregation. This bug renders the "Append" mode useless for us. Are there any plans to fix it? |
We will fix this |
This should be fixed now in master |
Thank you, it works properly now. I close the issue. |
@sergeylesnik FYI, @olesenm has done work integrating adios with OpenFOAM |
@sergeylesnik - I'm not sure what exactly or how you are implementing ADIOS as parallel IO in OpenFOAM, but as @williamfgc mentioned there has already been some work done on this - Henrik R. at your company surely has this information too. |
@williamfgc Yes, thanks, I knew about it. But our concept is different. |
OK that makes much more sense now - as long as it's going into the wp3 proof-of-concept should be alright. |
The BP4 engine is set to write in Append mode. The variables are local and in the particular case each variable belongs to a single rank. As a result the data written for steps >0 and ranks > 0 end up to be some random numbers. Interestingly enough the min/max (inspected with bpls -l) values are correct.
To Reproduce
Run it
mpirun -np 2 localArray_write_mpi
Inspect the data
Expected behavior
v1_rank1_step1 variable is populated with 1.1
Desktop (please complete the following information):
When Open(...) and Close() are moved outside the for loop, everything is fine. I suppose that opening and closing an appending engine for a subset of variables to be written is not the default use case but I couldn't find any hint in the documentation that this is not supported.
The text was updated successfully, but these errors were encountered: