-
Notifications
You must be signed in to change notification settings - Fork 52
Series Flush Type #484
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
base: dev
Are you sure you want to change the base?
Series Flush Type #484
Conversation
include/openPMD/RecordComponent.hpp
Outdated
* Series::flush is called. | ||
* @todo implement: if the shared pointers' `use_count` drops to one | ||
* before Series::flush is called, the load will be skipped during | ||
* Series::flush. (check if this works with our `shareRaw()` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will become possible when #470 is implemented
include/openPMD/RecordComponent.hpp
Outdated
* Series::flush is called. | ||
* @todo implement: if the shared pointers' `use_count` drops to one | ||
* before Series::flush is called, the store will be skipped during | ||
* Series::flush. (check if this works with our `shareRaw()` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will become possible when #470 is implemented
@C0nsultant do you think the right location to store the |
adaf209
to
b10925c
Compare
test/ParallelIOTest.cpp
Outdated
@@ -86,6 +86,7 @@ TEST_CASE( "hdf5_write_test", "[parallel][hdf5]" ) | |||
uint64_t mpi_size = static_cast<uint64_t>(mpi_s); | |||
uint64_t mpi_rank = static_cast<uint64_t>(mpi_r); | |||
Series o = Series("../samples/parallel_write.h5", AccessType::CREATE, MPI_COMM_WORLD); | |||
o.setFlush(FlushType::DEFER); // @todo crashes in DIRECT flush mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see bug #490
test/ParallelIOTest.cpp
Outdated
@@ -120,6 +123,7 @@ TEST_CASE( "hdf5_write_test_zero_extent", "[parallel][hdf5]" ) | |||
uint64_t size = static_cast<uint64_t>(mpi_s); | |||
uint64_t rank = static_cast<uint64_t>(mpi_r); | |||
Series o = Series("../samples/parallel_write_zero_extent.h5", AccessType::CREATE, MPI_COMM_WORLD); | |||
o.setFlush(FlushType::DEFER); // @todo crashes in DIRECT flush mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see bug #490
There (currently) is a 1:1 mapping of Strictly speaking separation of concern, the IO backend (and in this case, the handler) is a perfectly suitable place for it. The |
Thanks, sounds good. I actually pushed a first working draft in this PR, for in-code comments/review :) |
b10925c
to
e41190a
Compare
af7c8b2
to
0ba666a
Compare
6bf4c46
to
c63f74b
Compare
@C0nsultant ready for review :) |
@C0nsultant if you have the time, the logic in flushing here and in #490 needs to be refactored by us to be more flexible with flushes triggered from a record component (instead of top-down from a series-iteration-record-...) :-) |
650b9c9
to
d316e66
Compare
Add a new data flush mode to Series. Although we implement a more general model of data passing and accumulating, allowing a "directly synchronous" mode will allow us to target the typical h5py Python user who just quickly wants to explore small data sets without frustration. We definitely have a continued need for our generalized, deferred, asynchronous chunk load/store mechanisms for our applications in parallel I/O and upcoming staging (think: streaming) modes. Just let us enable them explicitly as an "advanced" feature.
Try to use deferred mode for most tests, but add some direct ones as well. Especially, with fixed defaults for particle position/positionOffset creation, we should add direct mode tests for CREATE of those as well.
Document the new Series flush type and how to upgrade from previous releases, as this is a breaking change.
dynamic casts can return nullptrs ;-) openPMD#471
Add a new potential data flush mode to
Series
.Although we implement a more general model of data passing and accumulating, allowing a "directly synchronous" mode will allow us to target the typical h5py Python user who just quickly wants to explore small data sets without frustration ("why is my data all zeros?").
We definitely have a continued need for our generalized, deferred, asynchronous chunk load/store mechanisms for our applications in parallel I/O and upcoming staging (think: streaming) modes. Just let us enable them explicitly as an "advanced" feature (therefore switch the default to the simple
DIRECT
mode). This is purely a user-interface change in order to target a wider audience.The new
DIRECT
mode should also help somewhat in debugging.Stylistic note: I think
AccessType
andFlushType
might better be called...Mode
?@franzpoeschel @C0nsultant what do you think? I hope that description is not too brief, otherwise let's chat :-)
PRs to this branch that implement that mode, also in parts, very welcome.
To Do