-
Notifications
You must be signed in to change notification settings - Fork 51
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
Design limitations in the frontend resulting in unexpected behaviours (segfaults, premature destructor calls) #534
Comments
This has been a massive performance drain. openPMD#534 This should be extended to further levels of the openPMD hierarchy.
Thanks for the assessment and I agree with the design issues. To add on your analysis, I think the use of (user-facing) handles is fine and the underlying issues reside in the business logic (internally linked handles/parents that you mention) at the following points. First of all, the logic of openPMD logic (defaults, etc.) is not separated from data "container" objects. This is problematic as we have already seen and makes upgrades way more complicated than they should be. We should refactor all defaults, including sub-object creation out of the data storage. (If you want, e.g. MVC without the V ;) is a pattern to follow, or related approaches.) Furthermore, the logic between handles from parents to childs is a directed tree, which is very cumbersome when dealing with construction, destruction and defaults. This can be solved with refactoring the first part, I think. |
cc-ing @C0nsultant for ideas/feedback :) |
On the one hand, since openPMD is a hierarchical format, we should retain this logic from the user side, but I think we have seen that building our memory layout off of this is not the best way to go. I would suggest splitting the Within the hierarchy itself, we should then use |
Yes exactly, also I am not sure our (physical) hierarchy will always be a simple DAG tree in openPMD. We might relax that in newer versions of the standard.
Fully agreed, the one-direction linking makes it even harder to keep track. Not speeking of the
I think that's a good idea and would allow us furthermore to expose this handle object in two public headers: one with MPI includes pulled in and one without. Potentially create it via two free standing functions? |
This has been a massive performance drain. openPMD#534 This should be extended to further levels of the openPMD hierarchy.
This has been a massive performance drain. openPMD#534 This should be extended to further levels of the openPMD hierarchy.
This has been a massive performance drain. openPMD#534 This should be extended to further levels of the openPMD hierarchy.
This has been a massive performance drain. openPMD#534 This should be extended to further levels of the openPMD hierarchy.
This has been a massive performance drain. openPMD#534 This should be extended to further levels of the openPMD hierarchy.
This has been a massive performance drain. openPMD#534 This should be extended to further levels of the openPMD hierarchy.
This has been a massive performance drain. openPMD#534 This should be extended to further levels of the openPMD hierarchy.
Do not set `-Werror` during Spack/dependency install phase. README: Author Contributions Acknowledgements in the README, not only in meta-data :) JSON Backend: Throw if Missing In case the JSON backend is voluntarily disabled, we should throw as in other I/O backends about missing support. Allow choosing ADIOS2 Engine type from the frontend Implemented by allowing to specify generic settings in form of a map<string,string>. Set options via JSON Set engine parameters from JSON Do not expose JSON library publicly Fix passing of parameters in MPI mode Remove notifyOption from ADIOS2IOHandler also some formatting Add advance method to Writable class Move advance logic from Writable to Series Simple implementation for starting a next step in ADIOS2 Remove path field from ADVANCE task To be handled in the standard way by OPEN_FILE et al. Differentiate read and write advance modes Remember written chunks during writing Setup frontend for inquiring a record component for available chunks Remove trailing blanks Add support for inquiring chunks in ADIOS2 backend write a chunk table per rank and dataset this allows to have workflows where single ranks write different numbers of chunks without introducing unnecessary mpi communication Introduce own datatype for return type of BaseRecordComponent::availableChunks Add OVER to AdvanceStatus Fix a number of bugs concerning the processing of futures Differentiate when to end step manually upon destruction Allow workflows where one rank contributes nothing to a dataset Re-read the hierarchy tree after advance Two small fixes Turn advance into a no-op in non-streaming mode Current implementation breaks ADIOS2 file-based engines, this is preliminary up until a more sensible implementation for file-based engines. Allow to call advance at the end of writing without opening new step Fix passing of parameters in MPI mode Return OVER on advance in read- and file-based mode Let simulations explicitly set an iteration as finalized Store datasets explicitly in form of attributes Necessary since ADIOS2 does not show variables if no data has been written to them. Write dummy values to adios variables if they havent been touched in a step Add utility indexing functions Add method to automatically load all chunks that are available Add more flexible overload to previous commit's method Allows the user to allocate buffers himself Revert "Store datasets explicitly in form of attributes" This reverts commit b68895e. Has been made obsolete by following commit (41d9e62) and causes problems when reading constant record components. Ensure that attributes are not read too late Fix 1: read Series' attributes before descenting the openPMD tree Fix 2: ensure that a step is active before any reading command Add collectStrided to TaggedChunk struct Documentation Resolve frontend bug concerning advance and asynchronous execution Only reparse openPMD tree after advance has succeeded. Make advance return faster in read mode Do not wait until next step begins, but wait in the returned future. Take reference of Series in advance future Series object will call destructor so it is problematic to make a copy. (todo: open an issue for this) Fix indexing bug in Dataset::restrictToSelection Use ADIOS2's own BlockInfo method to extract available chunks Remove some functions that are not needed any more since the last commit Simplify writtenChunks member of BufferedActions struct Only names of written variables are still of interest. Make chain_futures more flexible Allow to decide execution strategy for first future at compile time by template parameters. Directly return a ConsumingFuture on advance Link issue in Series::advance openPMD#534 Don't re-read finalized Iterations This has been a massive performance drain. openPMD#534 This should be extended to further levels of the openPMD hierarchy. Remember which variables are dummies To avoid accidentally loading dummy chunks. Use last commit to provide a method to ask whether var is dummy Guard availableChunks() against dummy variables Little refactor of BufferedActions class make some members private and remove some stale functionality store stream status as enum instead of several booleans Add facility to buffer attribute maps Use buffering of last commit Document future Remember whether ConsumingFuture is running or not Fix a bug with deferred advancing in read mode Avoid empty reads Remember whether a record component has already been read Do not write dummies any more Parse datasets once only The do (currently) not change, and reparsing may be harmful because ADIOS2 does not send variables if no data has been written in a step. Add chunk assignment facility Without implementation for second pass and egalitarian chunk assignment so far. Make rank meta info more consistent Add trivial implementation for SplitEgalitarian Also some bugfixes Move ranksPerHost to FirstPass base class Add a simple implementation for the second pass Use adios2::Variable<T>::Info::WriterID member Split loadAvailableChunksContiguous in two functions Internal function uses chunks passed to it and loads them. Return to loadAvailableChunksContiguous not taking a reference to the provideBuffer functor Add auxiliary::read_file_by_lines Add ranksMetaInfo attribute to Series object Make setMpiRanksMetaInfo pass if file does not exist Add Series::setMpiRanksMetaInfoByEnvvar Rename some methods in Series, also remember MPI Communicator Add Series::setMpiRanksMetaInfo( std::string const & myRankInfo ) Add Wrapper for gethostname Use Method enum to enable switching host identification method at runtime Add function to allow allgathering var-sized strings Add FirstPassByCuboidSlice Correctly read rank meta info also if world size = 1 Add facility to dump times Perform a flush when advancing in file-based mode This is temporary until a better implementation. Fix deadlock when one rank does not contribute data in file-based mode Close files after Iteration::finalize() Make MPI helper functions inlineable (might take this commit back again, mainly to avoid linking errors for now) Do not re-parse the Series once the stream is over Make ADIOS2 backend usable in serial when compiled with MPI Allow to choose time formatting more flexibly Drop finalized iterations This will help avoid building up huge amounts of attributes. Frontend support for staling groups STALE_GROUP task that will (for now) be sent as a hint to backends for iterations that are not going to be modified any longer. Add ADIOS2 support for declaring a group stale Some documentation for the traits in Streaming.hpp Move CuboidSlice to SplitEgalitarian Add ChunkTable::splitToSizeSorted Implement SplitEgalitarianSliceIncomingChunks Fix bug in MPI mode Resolve compiler warnings about control flow reaching end of non-void functions Merge SecondPass and SplitEgalitarian Name things more orderly and add first pass that does nothing Temporarily workaround the changed behaviour of AvailableAttributes To remove this workaround, create for each hierarchical group in the openPMD hierarchy a dummy variable so that prefixed AvailableAttributes will work again. Adapt second_pass::SliceIncomingChunks to have provable bin usage guarantees Buffer attributes map Use the fact that std::map sorts string lexicographically This allows faster lookup by prefix. Dito for variables Fix ADIOS2IOHandler dummy constructors if ADIOS2 is not built Close IO object upon closing a file Make ADIOS2 backend aware of existence of BP4 engine and set BP3 as default
Do not set `-Werror` during Spack/dependency install phase. README: Author Contributions Acknowledgements in the README, not only in meta-data :) JSON Backend: Throw if Missing In case the JSON backend is voluntarily disabled, we should throw as in other I/O backends about missing support. Allow choosing ADIOS2 Engine type from the frontend Implemented by allowing to specify generic settings in form of a map<string,string>. Set options via JSON Set engine parameters from JSON Do not expose JSON library publicly Fix passing of parameters in MPI mode Remove notifyOption from ADIOS2IOHandler also some formatting Add advance method to Writable class Move advance logic from Writable to Series Simple implementation for starting a next step in ADIOS2 Remove path field from ADVANCE task To be handled in the standard way by OPEN_FILE et al. Differentiate read and write advance modes Remember written chunks during writing Setup frontend for inquiring a record component for available chunks Remove trailing blanks Add support for inquiring chunks in ADIOS2 backend write a chunk table per rank and dataset this allows to have workflows where single ranks write different numbers of chunks without introducing unnecessary mpi communication Introduce own datatype for return type of BaseRecordComponent::availableChunks Add OVER to AdvanceStatus Fix a number of bugs concerning the processing of futures Differentiate when to end step manually upon destruction Allow workflows where one rank contributes nothing to a dataset Re-read the hierarchy tree after advance Two small fixes Turn advance into a no-op in non-streaming mode Current implementation breaks ADIOS2 file-based engines, this is preliminary up until a more sensible implementation for file-based engines. Allow to call advance at the end of writing without opening new step Fix passing of parameters in MPI mode Return OVER on advance in read- and file-based mode Let simulations explicitly set an iteration as finalized Store datasets explicitly in form of attributes Necessary since ADIOS2 does not show variables if no data has been written to them. Write dummy values to adios variables if they havent been touched in a step Add utility indexing functions Add method to automatically load all chunks that are available Add more flexible overload to previous commit's method Allows the user to allocate buffers himself Revert "Store datasets explicitly in form of attributes" This reverts commit b68895e. Has been made obsolete by following commit (41d9e62) and causes problems when reading constant record components. Ensure that attributes are not read too late Fix 1: read Series' attributes before descenting the openPMD tree Fix 2: ensure that a step is active before any reading command Add collectStrided to TaggedChunk struct Documentation Resolve frontend bug concerning advance and asynchronous execution Only reparse openPMD tree after advance has succeeded. Make advance return faster in read mode Do not wait until next step begins, but wait in the returned future. Take reference of Series in advance future Series object will call destructor so it is problematic to make a copy. (todo: open an issue for this) Fix indexing bug in Dataset::restrictToSelection Use ADIOS2's own BlockInfo method to extract available chunks Remove some functions that are not needed any more since the last commit Simplify writtenChunks member of BufferedActions struct Only names of written variables are still of interest. Make chain_futures more flexible Allow to decide execution strategy for first future at compile time by template parameters. Directly return a ConsumingFuture on advance Link issue in Series::advance openPMD#534 Don't re-read finalized Iterations This has been a massive performance drain. openPMD#534 This should be extended to further levels of the openPMD hierarchy. Remember which variables are dummies To avoid accidentally loading dummy chunks. Use last commit to provide a method to ask whether var is dummy Guard availableChunks() against dummy variables Little refactor of BufferedActions class make some members private and remove some stale functionality store stream status as enum instead of several booleans Add facility to buffer attribute maps Use buffering of last commit Document future Remember whether ConsumingFuture is running or not Fix a bug with deferred advancing in read mode Avoid empty reads Remember whether a record component has already been read Do not write dummies any more Parse datasets once only The do (currently) not change, and reparsing may be harmful because ADIOS2 does not send variables if no data has been written in a step. Add chunk assignment facility Without implementation for second pass and egalitarian chunk assignment so far. Make rank meta info more consistent Add trivial implementation for SplitEgalitarian Also some bugfixes Move ranksPerHost to FirstPass base class Add a simple implementation for the second pass Use adios2::Variable<T>::Info::WriterID member Split loadAvailableChunksContiguous in two functions Internal function uses chunks passed to it and loads them. Return to loadAvailableChunksContiguous not taking a reference to the provideBuffer functor Add auxiliary::read_file_by_lines Add ranksMetaInfo attribute to Series object Make setMpiRanksMetaInfo pass if file does not exist Add Series::setMpiRanksMetaInfoByEnvvar Rename some methods in Series, also remember MPI Communicator Add Series::setMpiRanksMetaInfo( std::string const & myRankInfo ) Add Wrapper for gethostname Use Method enum to enable switching host identification method at runtime Add function to allow allgathering var-sized strings Add FirstPassByCuboidSlice Correctly read rank meta info also if world size = 1 Add facility to dump times Perform a flush when advancing in file-based mode This is temporary until a better implementation. Fix deadlock when one rank does not contribute data in file-based mode Close files after Iteration::finalize() Make MPI helper functions inlineable (might take this commit back again, mainly to avoid linking errors for now) Do not re-parse the Series once the stream is over Make ADIOS2 backend usable in serial when compiled with MPI Allow to choose time formatting more flexibly Drop finalized iterations This will help avoid building up huge amounts of attributes. Frontend support for staling groups STALE_GROUP task that will (for now) be sent as a hint to backends for iterations that are not going to be modified any longer. Add ADIOS2 support for declaring a group stale Some documentation for the traits in Streaming.hpp Move CuboidSlice to SplitEgalitarian Add ChunkTable::splitToSizeSorted Implement SplitEgalitarianSliceIncomingChunks Fix bug in MPI mode Resolve compiler warnings about control flow reaching end of non-void functions Merge SecondPass and SplitEgalitarian Name things more orderly and add first pass that does nothing Temporarily workaround the changed behaviour of AvailableAttributes To remove this workaround, create for each hierarchical group in the openPMD hierarchy a dummy variable so that prefixed AvailableAttributes will work again. Adapt second_pass::SliceIncomingChunks to have provable bin usage guarantees Buffer attributes map Use the fact that std::map sorts string lexicographically This allows faster lookup by prefix. Dito for variables Fix ADIOS2IOHandler dummy constructors if ADIOS2 is not built Close IO object upon closing a file Make ADIOS2 backend aware of existence of BP4 engine and set BP3 as default
Do not set `-Werror` during Spack/dependency install phase. README: Author Contributions Acknowledgements in the README, not only in meta-data :) JSON Backend: Throw if Missing In case the JSON backend is voluntarily disabled, we should throw as in other I/O backends about missing support. Allow choosing ADIOS2 Engine type from the frontend Implemented by allowing to specify generic settings in form of a map<string,string>. Set options via JSON Set engine parameters from JSON Do not expose JSON library publicly Fix passing of parameters in MPI mode Remove notifyOption from ADIOS2IOHandler also some formatting Add advance method to Writable class Move advance logic from Writable to Series Simple implementation for starting a next step in ADIOS2 Remove path field from ADVANCE task To be handled in the standard way by OPEN_FILE et al. Differentiate read and write advance modes Remember written chunks during writing Setup frontend for inquiring a record component for available chunks Remove trailing blanks Add support for inquiring chunks in ADIOS2 backend write a chunk table per rank and dataset this allows to have workflows where single ranks write different numbers of chunks without introducing unnecessary mpi communication Introduce own datatype for return type of BaseRecordComponent::availableChunks Add OVER to AdvanceStatus Fix a number of bugs concerning the processing of futures Differentiate when to end step manually upon destruction Allow workflows where one rank contributes nothing to a dataset Re-read the hierarchy tree after advance Two small fixes Turn advance into a no-op in non-streaming mode Current implementation breaks ADIOS2 file-based engines, this is preliminary up until a more sensible implementation for file-based engines. Allow to call advance at the end of writing without opening new step Fix passing of parameters in MPI mode Return OVER on advance in read- and file-based mode Let simulations explicitly set an iteration as finalized Store datasets explicitly in form of attributes Necessary since ADIOS2 does not show variables if no data has been written to them. Write dummy values to adios variables if they havent been touched in a step Add utility indexing functions Add method to automatically load all chunks that are available Add more flexible overload to previous commit's method Allows the user to allocate buffers himself Revert "Store datasets explicitly in form of attributes" This reverts commit b68895e. Has been made obsolete by following commit (41d9e62) and causes problems when reading constant record components. Ensure that attributes are not read too late Fix 1: read Series' attributes before descenting the openPMD tree Fix 2: ensure that a step is active before any reading command Add collectStrided to TaggedChunk struct Documentation Resolve frontend bug concerning advance and asynchronous execution Only reparse openPMD tree after advance has succeeded. Make advance return faster in read mode Do not wait until next step begins, but wait in the returned future. Take reference of Series in advance future Series object will call destructor so it is problematic to make a copy. (todo: open an issue for this) Fix indexing bug in Dataset::restrictToSelection Use ADIOS2's own BlockInfo method to extract available chunks Remove some functions that are not needed any more since the last commit Simplify writtenChunks member of BufferedActions struct Only names of written variables are still of interest. Make chain_futures more flexible Allow to decide execution strategy for first future at compile time by template parameters. Directly return a ConsumingFuture on advance Link issue in Series::advance openPMD#534 Don't re-read finalized Iterations This has been a massive performance drain. openPMD#534 This should be extended to further levels of the openPMD hierarchy. Remember which variables are dummies To avoid accidentally loading dummy chunks. Use last commit to provide a method to ask whether var is dummy Guard availableChunks() against dummy variables Little refactor of BufferedActions class make some members private and remove some stale functionality store stream status as enum instead of several booleans Add facility to buffer attribute maps Use buffering of last commit Document future Remember whether ConsumingFuture is running or not Fix a bug with deferred advancing in read mode Avoid empty reads Remember whether a record component has already been read Do not write dummies any more Parse datasets once only The do (currently) not change, and reparsing may be harmful because ADIOS2 does not send variables if no data has been written in a step. Add chunk assignment facility Without implementation for second pass and egalitarian chunk assignment so far. Make rank meta info more consistent Add trivial implementation for SplitEgalitarian Also some bugfixes Move ranksPerHost to FirstPass base class Add a simple implementation for the second pass Use adios2::Variable<T>::Info::WriterID member Split loadAvailableChunksContiguous in two functions Internal function uses chunks passed to it and loads them. Return to loadAvailableChunksContiguous not taking a reference to the provideBuffer functor Add auxiliary::read_file_by_lines Add ranksMetaInfo attribute to Series object Make setMpiRanksMetaInfo pass if file does not exist Add Series::setMpiRanksMetaInfoByEnvvar Rename some methods in Series, also remember MPI Communicator Add Series::setMpiRanksMetaInfo( std::string const & myRankInfo ) Add Wrapper for gethostname Use Method enum to enable switching host identification method at runtime Add function to allow allgathering var-sized strings Add FirstPassByCuboidSlice Correctly read rank meta info also if world size = 1 Add facility to dump times Perform a flush when advancing in file-based mode This is temporary until a better implementation. Fix deadlock when one rank does not contribute data in file-based mode Close files after Iteration::finalize() Make MPI helper functions inlineable (might take this commit back again, mainly to avoid linking errors for now) Do not re-parse the Series once the stream is over Make ADIOS2 backend usable in serial when compiled with MPI Allow to choose time formatting more flexibly Drop finalized iterations This will help avoid building up huge amounts of attributes. Frontend support for staling groups STALE_GROUP task that will (for now) be sent as a hint to backends for iterations that are not going to be modified any longer. Add ADIOS2 support for declaring a group stale Some documentation for the traits in Streaming.hpp Move CuboidSlice to SplitEgalitarian Add ChunkTable::splitToSizeSorted Implement SplitEgalitarianSliceIncomingChunks Fix bug in MPI mode Resolve compiler warnings about control flow reaching end of non-void functions Merge SecondPass and SplitEgalitarian Name things more orderly and add first pass that does nothing Temporarily workaround the changed behaviour of AvailableAttributes To remove this workaround, create for each hierarchical group in the openPMD hierarchy a dummy variable so that prefixed AvailableAttributes will work again. Adapt second_pass::SliceIncomingChunks to have provable bin usage guarantees Buffer attributes map Use the fact that std::map sorts string lexicographically This allows faster lookup by prefix. Dito for variables Fix ADIOS2IOHandler dummy constructors if ADIOS2 is not built Close IO object upon closing a file Make ADIOS2 backend aware of existence of BP4 engine and set BP3 as default
Do not set `-Werror` during Spack/dependency install phase. README: Author Contributions Acknowledgements in the README, not only in meta-data :) JSON Backend: Throw if Missing In case the JSON backend is voluntarily disabled, we should throw as in other I/O backends about missing support. Allow choosing ADIOS2 Engine type from the frontend Implemented by allowing to specify generic settings in form of a map<string,string>. Set options via JSON Set engine parameters from JSON Do not expose JSON library publicly Fix passing of parameters in MPI mode Remove notifyOption from ADIOS2IOHandler also some formatting Add advance method to Writable class Move advance logic from Writable to Series Simple implementation for starting a next step in ADIOS2 Remove path field from ADVANCE task To be handled in the standard way by OPEN_FILE et al. Differentiate read and write advance modes Remember written chunks during writing Setup frontend for inquiring a record component for available chunks Remove trailing blanks Add support for inquiring chunks in ADIOS2 backend write a chunk table per rank and dataset this allows to have workflows where single ranks write different numbers of chunks without introducing unnecessary mpi communication Introduce own datatype for return type of BaseRecordComponent::availableChunks Add OVER to AdvanceStatus Fix a number of bugs concerning the processing of futures Differentiate when to end step manually upon destruction Allow workflows where one rank contributes nothing to a dataset Re-read the hierarchy tree after advance Two small fixes Turn advance into a no-op in non-streaming mode Current implementation breaks ADIOS2 file-based engines, this is preliminary up until a more sensible implementation for file-based engines. Allow to call advance at the end of writing without opening new step Fix passing of parameters in MPI mode Return OVER on advance in read- and file-based mode Let simulations explicitly set an iteration as finalized Store datasets explicitly in form of attributes Necessary since ADIOS2 does not show variables if no data has been written to them. Write dummy values to adios variables if they havent been touched in a step Add utility indexing functions Add method to automatically load all chunks that are available Add more flexible overload to previous commit's method Allows the user to allocate buffers himself Revert "Store datasets explicitly in form of attributes" This reverts commit b68895e. Has been made obsolete by following commit (41d9e62) and causes problems when reading constant record components. Ensure that attributes are not read too late Fix 1: read Series' attributes before descenting the openPMD tree Fix 2: ensure that a step is active before any reading command Add collectStrided to TaggedChunk struct Documentation Resolve frontend bug concerning advance and asynchronous execution Only reparse openPMD tree after advance has succeeded. Make advance return faster in read mode Do not wait until next step begins, but wait in the returned future. Take reference of Series in advance future Series object will call destructor so it is problematic to make a copy. (todo: open an issue for this) Fix indexing bug in Dataset::restrictToSelection Use ADIOS2's own BlockInfo method to extract available chunks Remove some functions that are not needed any more since the last commit Simplify writtenChunks member of BufferedActions struct Only names of written variables are still of interest. Make chain_futures more flexible Allow to decide execution strategy for first future at compile time by template parameters. Directly return a ConsumingFuture on advance Link issue in Series::advance openPMD#534 Don't re-read finalized Iterations This has been a massive performance drain. openPMD#534 This should be extended to further levels of the openPMD hierarchy. Remember which variables are dummies To avoid accidentally loading dummy chunks. Use last commit to provide a method to ask whether var is dummy Guard availableChunks() against dummy variables Little refactor of BufferedActions class make some members private and remove some stale functionality store stream status as enum instead of several booleans Add facility to buffer attribute maps Use buffering of last commit Document future Remember whether ConsumingFuture is running or not Fix a bug with deferred advancing in read mode Avoid empty reads Remember whether a record component has already been read Do not write dummies any more Parse datasets once only The do (currently) not change, and reparsing may be harmful because ADIOS2 does not send variables if no data has been written in a step. Add chunk assignment facility Without implementation for second pass and egalitarian chunk assignment so far. Make rank meta info more consistent Add trivial implementation for SplitEgalitarian Also some bugfixes Move ranksPerHost to FirstPass base class Add a simple implementation for the second pass Use adios2::Variable<T>::Info::WriterID member Split loadAvailableChunksContiguous in two functions Internal function uses chunks passed to it and loads them. Return to loadAvailableChunksContiguous not taking a reference to the provideBuffer functor Add auxiliary::read_file_by_lines Add ranksMetaInfo attribute to Series object Make setMpiRanksMetaInfo pass if file does not exist Add Series::setMpiRanksMetaInfoByEnvvar Rename some methods in Series, also remember MPI Communicator Add Series::setMpiRanksMetaInfo( std::string const & myRankInfo ) Add Wrapper for gethostname Use Method enum to enable switching host identification method at runtime Add function to allow allgathering var-sized strings Add FirstPassByCuboidSlice Correctly read rank meta info also if world size = 1 Add facility to dump times Perform a flush when advancing in file-based mode This is temporary until a better implementation. Fix deadlock when one rank does not contribute data in file-based mode Close files after Iteration::finalize() Make MPI helper functions inlineable (might take this commit back again, mainly to avoid linking errors for now) Do not re-parse the Series once the stream is over Make ADIOS2 backend usable in serial when compiled with MPI Allow to choose time formatting more flexibly Drop finalized iterations This will help avoid building up huge amounts of attributes. Frontend support for staling groups STALE_GROUP task that will (for now) be sent as a hint to backends for iterations that are not going to be modified any longer. Add ADIOS2 support for declaring a group stale Some documentation for the traits in Streaming.hpp Move CuboidSlice to SplitEgalitarian Add ChunkTable::splitToSizeSorted Implement SplitEgalitarianSliceIncomingChunks Fix bug in MPI mode Resolve compiler warnings about control flow reaching end of non-void functions Merge SecondPass and SplitEgalitarian Name things more orderly and add first pass that does nothing Temporarily workaround the changed behaviour of AvailableAttributes To remove this workaround, create for each hierarchical group in the openPMD hierarchy a dummy variable so that prefixed AvailableAttributes will work again. Adapt second_pass::SliceIncomingChunks to have provable bin usage guarantees Buffer attributes map Use the fact that std::map sorts string lexicographically This allows faster lookup by prefix. Dito for variables Fix ADIOS2IOHandler dummy constructors if ADIOS2 is not built Close IO object upon closing a file Make ADIOS2 backend aware of existence of BP4 engine and set BP3 as default
Do not set `-Werror` during Spack/dependency install phase. README: Author Contributions Acknowledgements in the README, not only in meta-data :) JSON Backend: Throw if Missing In case the JSON backend is voluntarily disabled, we should throw as in other I/O backends about missing support. Allow choosing ADIOS2 Engine type from the frontend Implemented by allowing to specify generic settings in form of a map<string,string>. Set options via JSON Set engine parameters from JSON Do not expose JSON library publicly Fix passing of parameters in MPI mode Remove notifyOption from ADIOS2IOHandler also some formatting Add advance method to Writable class Move advance logic from Writable to Series Simple implementation for starting a next step in ADIOS2 Remove path field from ADVANCE task To be handled in the standard way by OPEN_FILE et al. Differentiate read and write advance modes Remember written chunks during writing Setup frontend for inquiring a record component for available chunks Remove trailing blanks Add support for inquiring chunks in ADIOS2 backend write a chunk table per rank and dataset this allows to have workflows where single ranks write different numbers of chunks without introducing unnecessary mpi communication Introduce own datatype for return type of BaseRecordComponent::availableChunks Add OVER to AdvanceStatus Fix a number of bugs concerning the processing of futures Differentiate when to end step manually upon destruction Allow workflows where one rank contributes nothing to a dataset Re-read the hierarchy tree after advance Two small fixes Turn advance into a no-op in non-streaming mode Current implementation breaks ADIOS2 file-based engines, this is preliminary up until a more sensible implementation for file-based engines. Allow to call advance at the end of writing without opening new step Fix passing of parameters in MPI mode Return OVER on advance in read- and file-based mode Let simulations explicitly set an iteration as finalized Store datasets explicitly in form of attributes Necessary since ADIOS2 does not show variables if no data has been written to them. Write dummy values to adios variables if they havent been touched in a step Add utility indexing functions Add method to automatically load all chunks that are available Add more flexible overload to previous commit's method Allows the user to allocate buffers himself Revert "Store datasets explicitly in form of attributes" This reverts commit b68895e. Has been made obsolete by following commit (41d9e62) and causes problems when reading constant record components. Ensure that attributes are not read too late Fix 1: read Series' attributes before descenting the openPMD tree Fix 2: ensure that a step is active before any reading command Add collectStrided to TaggedChunk struct Documentation Resolve frontend bug concerning advance and asynchronous execution Only reparse openPMD tree after advance has succeeded. Make advance return faster in read mode Do not wait until next step begins, but wait in the returned future. Take reference of Series in advance future Series object will call destructor so it is problematic to make a copy. (todo: open an issue for this) Fix indexing bug in Dataset::restrictToSelection Use ADIOS2's own BlockInfo method to extract available chunks Remove some functions that are not needed any more since the last commit Simplify writtenChunks member of BufferedActions struct Only names of written variables are still of interest. Make chain_futures more flexible Allow to decide execution strategy for first future at compile time by template parameters. Directly return a ConsumingFuture on advance Link issue in Series::advance openPMD#534 Don't re-read finalized Iterations This has been a massive performance drain. openPMD#534 This should be extended to further levels of the openPMD hierarchy. Remember which variables are dummies To avoid accidentally loading dummy chunks. Use last commit to provide a method to ask whether var is dummy Guard availableChunks() against dummy variables Little refactor of BufferedActions class make some members private and remove some stale functionality store stream status as enum instead of several booleans Add facility to buffer attribute maps Use buffering of last commit Document future Remember whether ConsumingFuture is running or not Fix a bug with deferred advancing in read mode Avoid empty reads Remember whether a record component has already been read Do not write dummies any more Parse datasets once only The do (currently) not change, and reparsing may be harmful because ADIOS2 does not send variables if no data has been written in a step. Add chunk assignment facility Without implementation for second pass and egalitarian chunk assignment so far. Make rank meta info more consistent Add trivial implementation for SplitEgalitarian Also some bugfixes Move ranksPerHost to FirstPass base class Add a simple implementation for the second pass Use adios2::Variable<T>::Info::WriterID member Split loadAvailableChunksContiguous in two functions Internal function uses chunks passed to it and loads them. Return to loadAvailableChunksContiguous not taking a reference to the provideBuffer functor Add auxiliary::read_file_by_lines Add ranksMetaInfo attribute to Series object Make setMpiRanksMetaInfo pass if file does not exist Add Series::setMpiRanksMetaInfoByEnvvar Rename some methods in Series, also remember MPI Communicator Add Series::setMpiRanksMetaInfo( std::string const & myRankInfo ) Add Wrapper for gethostname Use Method enum to enable switching host identification method at runtime Add function to allow allgathering var-sized strings Add FirstPassByCuboidSlice Correctly read rank meta info also if world size = 1 Add facility to dump times Perform a flush when advancing in file-based mode This is temporary until a better implementation. Fix deadlock when one rank does not contribute data in file-based mode Close files after Iteration::finalize() Make MPI helper functions inlineable (might take this commit back again, mainly to avoid linking errors for now) Do not re-parse the Series once the stream is over Make ADIOS2 backend usable in serial when compiled with MPI Allow to choose time formatting more flexibly Drop finalized iterations This will help avoid building up huge amounts of attributes. Frontend support for staling groups STALE_GROUP task that will (for now) be sent as a hint to backends for iterations that are not going to be modified any longer. Add ADIOS2 support for declaring a group stale Some documentation for the traits in Streaming.hpp Move CuboidSlice to SplitEgalitarian Add ChunkTable::splitToSizeSorted Implement SplitEgalitarianSliceIncomingChunks Fix bug in MPI mode Resolve compiler warnings about control flow reaching end of non-void functions Merge SecondPass and SplitEgalitarian Name things more orderly and add first pass that does nothing Temporarily workaround the changed behaviour of AvailableAttributes To remove this workaround, create for each hierarchical group in the openPMD hierarchy a dummy variable so that prefixed AvailableAttributes will work again. Adapt second_pass::SliceIncomingChunks to have provable bin usage guarantees Buffer attributes map Use the fact that std::map sorts string lexicographically This allows faster lookup by prefix. Dito for variables Fix ADIOS2IOHandler dummy constructors if ADIOS2 is not built Close IO object upon closing a file Make ADIOS2 backend aware of existence of BP4 engine and set BP3 as default
For
Currently Consequently, in MPI-context the |
Create openPMDWriter based on ADIOSWriter (WIP) Adapt CountParticles partially to openPMD Adapt WriteSpecies to openPMD Translate WriteMeta.hpp to openPMD Add function "asStandardVector()" Translate NDScalars.hpp to openPMD Adapt everything to openPMD except for the main file (openPMDWriter.hpp) Adapt openPMDWriter.hpp to openPMD WIP Change management of openPMD Series Further adapt openPMDWriter to openPMD Add openPMD to CMake Add openPMD to version formatting Properly acquaint openPMD plugin with build and help system Make openPMD namespacing explicit Remove adios-specific fields from ThreadParams First successfull run with LaserWakeField example Cleanup Use clang-format Update licensing information Separate basename and filename extension into two separate help parameters Refactor dataset creation Use Mesh::setTimeOffset() template Causes a linker error with the current version of openPMD API, a fix will be merged soon on the dev branch. Clean up some leftovers Use ASCII characters to spell my name Remove unnecessary whitespaces Adapt to removal of pmacc::forward Remove accidentally versioned config file Make checkpoints usable Fix a number of bugs concerning the reading of checkpoints Still problematic is the attribute "timeOffset", currently mitigated by uncommenting the sanity check in the openPMD API. Needs further investigation. Remove CollectFieldsSizes Legacy from ADIOS writer, not necessary in openPMD. Remove ParticleAttributeSize and openPMDCountParticles Legacy from ADIOS Writer Use clang-format Adhere to openPMD requirements before flushing For a given particle species, the openPMD API requires that required records (such as "position", "positionOffset") and their contained components be defined (not necessarily written). Make sure to define all such datasets before issuing the first flush. Maybe open an issue in the openPMD API to allow for a more flexible usage. Fix an indexing bug Eliminate dataset preparation for NDScalars Also fix a bug where particles were named wrongly in checkpoints. Do not write empty particle datasets Treat non-existing datasets as empty in reading Remove prepared datasets Remove WithWindow struct Use transform to enable ADIOS1 compression Remove accidentally versioned files Rename LoadParticleAttributesFromADIOS to LoadParticleAttributesFromOpenPMD Remove traces of the old ADIOS plugin mostly the word "adios" from comments Take copies and not references of openPMD handles Fix autoformatting Require newer openPMD API Also add ADIOS2_ROOT to CMAKE_PREFIX_PATH Add version label to format string only if present Replace typedefs with using Remove further indexing bug in writing particles_info table Cleanup restart Remove dataset preparation Commit 0b50561 reintroduced a reduced form of dataset preparation in order to adhere to requirements (restrictions) of the openPMD API. This workaround results in dummy dataset writes (likely a bug in the openPMD API), hence this commit reverts those changes. The corresponding pull request in the openPMD API to relax this restriction can be found at openPMD/openPMD-api#518. Postpone writing of meta attributes Due to a bug in the ADIOS1 backend of the openPMD API, the first dataset needs to be written before the first flush. This works around the problem by first defining all the fields and particles. Bug report will follow. Resolve counting bug during particle writing Fix whitespaces Separate ADIOS and HDF5 particle writing strategies Allow choosing strategy as runtime parameter Cleanup Fix openPMD version formatting Update examples to use openPMD Refactor passing of filename and extension Reassemble filename and extension upon opening the series. Fix some missing includes Do not skip writing empty datasets See openPMD PR: openPMD/openPMD-api#529 This allows to write empty datasets Remove debugging leftovers Write timeOffset for particles in a standard-compliant way Do not declare zero-sized arrays C++ standard requires that array size evaluate to a value greater than zero. Do not use storeChunk on empty datasets centralize initialization of thread params from config Fix undefined identifier in assert statements Error passes silently in release builds. Pass JSON config to openPMD::Series ctor Do not copy Series object see openPMD/openPMD-api#534 Allow NULL as configuration infix to denote empty string Adapt to changes in pmacc etc. Enable use of group-based layout as well Requires keeping openPMD Series open. Since openPMD currently has no explicit call to close a file, we implement this only for group-based layout for now. Do not use deprecated Series::setSoftwareVersion call Apply commit b797c0a to openPMD backend Formatting in .cfg files Fix an uninitialized value and an indexing bug Implement reviewers' comments concerning CMakeLists
Create openPMDWriter based on ADIOSWriter (WIP) Adapt CountParticles partially to openPMD Adapt WriteSpecies to openPMD Translate WriteMeta.hpp to openPMD Add function "asStandardVector()" Translate NDScalars.hpp to openPMD Adapt everything to openPMD except for the main file (openPMDWriter.hpp) Adapt openPMDWriter.hpp to openPMD WIP Change management of openPMD Series Further adapt openPMDWriter to openPMD Add openPMD to CMake Add openPMD to version formatting Properly acquaint openPMD plugin with build and help system Make openPMD namespacing explicit Remove adios-specific fields from ThreadParams First successfull run with LaserWakeField example Cleanup Use clang-format Update licensing information Separate basename and filename extension into two separate help parameters Refactor dataset creation Use Mesh::setTimeOffset() template Causes a linker error with the current version of openPMD API, a fix will be merged soon on the dev branch. Clean up some leftovers Use ASCII characters to spell my name Remove unnecessary whitespaces Adapt to removal of pmacc::forward Remove accidentally versioned config file Make checkpoints usable Fix a number of bugs concerning the reading of checkpoints Still problematic is the attribute "timeOffset", currently mitigated by uncommenting the sanity check in the openPMD API. Needs further investigation. Remove CollectFieldsSizes Legacy from ADIOS writer, not necessary in openPMD. Remove ParticleAttributeSize and openPMDCountParticles Legacy from ADIOS Writer Use clang-format Adhere to openPMD requirements before flushing For a given particle species, the openPMD API requires that required records (such as "position", "positionOffset") and their contained components be defined (not necessarily written). Make sure to define all such datasets before issuing the first flush. Maybe open an issue in the openPMD API to allow for a more flexible usage. Fix an indexing bug Eliminate dataset preparation for NDScalars Also fix a bug where particles were named wrongly in checkpoints. Do not write empty particle datasets Treat non-existing datasets as empty in reading Remove prepared datasets Remove WithWindow struct Use transform to enable ADIOS1 compression Remove accidentally versioned files Rename LoadParticleAttributesFromADIOS to LoadParticleAttributesFromOpenPMD Remove traces of the old ADIOS plugin mostly the word "adios" from comments Take copies and not references of openPMD handles Fix autoformatting Require newer openPMD API Also add ADIOS2_ROOT to CMAKE_PREFIX_PATH Add version label to format string only if present Replace typedefs with using Remove further indexing bug in writing particles_info table Cleanup restart Remove dataset preparation Commit 0b50561 reintroduced a reduced form of dataset preparation in order to adhere to requirements (restrictions) of the openPMD API. This workaround results in dummy dataset writes (likely a bug in the openPMD API), hence this commit reverts those changes. The corresponding pull request in the openPMD API to relax this restriction can be found at openPMD/openPMD-api#518. Postpone writing of meta attributes Due to a bug in the ADIOS1 backend of the openPMD API, the first dataset needs to be written before the first flush. This works around the problem by first defining all the fields and particles. Bug report will follow. Resolve counting bug during particle writing Fix whitespaces Separate ADIOS and HDF5 particle writing strategies Allow choosing strategy as runtime parameter Cleanup Fix openPMD version formatting Update examples to use openPMD Refactor passing of filename and extension Reassemble filename and extension upon opening the series. Fix some missing includes Do not skip writing empty datasets See openPMD PR: openPMD/openPMD-api#529 This allows to write empty datasets Remove debugging leftovers Write timeOffset for particles in a standard-compliant way Do not declare zero-sized arrays C++ standard requires that array size evaluate to a value greater than zero. Do not use storeChunk on empty datasets centralize initialization of thread params from config Fix undefined identifier in assert statements Error passes silently in release builds. Pass JSON config to openPMD::Series ctor Do not copy Series object see openPMD/openPMD-api#534 Allow NULL as configuration infix to denote empty string Adapt to changes in pmacc etc. Enable use of group-based layout as well Requires keeping openPMD Series open. Since openPMD currently has no explicit call to close a file, we implement this only for group-based layout for now. Do not use deprecated Series::setSoftwareVersion call Apply commit b797c0a to openPMD backend Formatting in .cfg files Fix an uninitialized value and an indexing bug Implement reviewers' comments concerning CMakeLists
Create openPMDWriter based on ADIOSWriter (WIP) Adapt CountParticles partially to openPMD Adapt WriteSpecies to openPMD Translate WriteMeta.hpp to openPMD Add function "asStandardVector()" Translate NDScalars.hpp to openPMD Adapt everything to openPMD except for the main file (openPMDWriter.hpp) Adapt openPMDWriter.hpp to openPMD WIP Change management of openPMD Series Further adapt openPMDWriter to openPMD Add openPMD to CMake Add openPMD to version formatting Properly acquaint openPMD plugin with build and help system Make openPMD namespacing explicit Remove adios-specific fields from ThreadParams First successfull run with LaserWakeField example Cleanup Use clang-format Update licensing information Separate basename and filename extension into two separate help parameters Refactor dataset creation Use Mesh::setTimeOffset() template Causes a linker error with the current version of openPMD API, a fix will be merged soon on the dev branch. Clean up some leftovers Use ASCII characters to spell my name Remove unnecessary whitespaces Adapt to removal of pmacc::forward Remove accidentally versioned config file Make checkpoints usable Fix a number of bugs concerning the reading of checkpoints Still problematic is the attribute "timeOffset", currently mitigated by uncommenting the sanity check in the openPMD API. Needs further investigation. Remove CollectFieldsSizes Legacy from ADIOS writer, not necessary in openPMD. Remove ParticleAttributeSize and openPMDCountParticles Legacy from ADIOS Writer Use clang-format Adhere to openPMD requirements before flushing For a given particle species, the openPMD API requires that required records (such as "position", "positionOffset") and their contained components be defined (not necessarily written). Make sure to define all such datasets before issuing the first flush. Maybe open an issue in the openPMD API to allow for a more flexible usage. Fix an indexing bug Eliminate dataset preparation for NDScalars Also fix a bug where particles were named wrongly in checkpoints. Do not write empty particle datasets Treat non-existing datasets as empty in reading Remove prepared datasets Remove WithWindow struct Use transform to enable ADIOS1 compression Remove accidentally versioned files Rename LoadParticleAttributesFromADIOS to LoadParticleAttributesFromOpenPMD Remove traces of the old ADIOS plugin mostly the word "adios" from comments Take copies and not references of openPMD handles Fix autoformatting Require newer openPMD API Also add ADIOS2_ROOT to CMAKE_PREFIX_PATH Add version label to format string only if present Replace typedefs with using Remove further indexing bug in writing particles_info table Cleanup restart Remove dataset preparation Commit 0b50561 reintroduced a reduced form of dataset preparation in order to adhere to requirements (restrictions) of the openPMD API. This workaround results in dummy dataset writes (likely a bug in the openPMD API), hence this commit reverts those changes. The corresponding pull request in the openPMD API to relax this restriction can be found at openPMD/openPMD-api#518. Postpone writing of meta attributes Due to a bug in the ADIOS1 backend of the openPMD API, the first dataset needs to be written before the first flush. This works around the problem by first defining all the fields and particles. Bug report will follow. Resolve counting bug during particle writing Fix whitespaces Separate ADIOS and HDF5 particle writing strategies Allow choosing strategy as runtime parameter Cleanup Fix openPMD version formatting Update examples to use openPMD Refactor passing of filename and extension Reassemble filename and extension upon opening the series. Fix some missing includes Do not skip writing empty datasets See openPMD PR: openPMD/openPMD-api#529 This allows to write empty datasets Remove debugging leftovers Write timeOffset for particles in a standard-compliant way Do not declare zero-sized arrays C++ standard requires that array size evaluate to a value greater than zero. Do not use storeChunk on empty datasets centralize initialization of thread params from config Fix undefined identifier in assert statements Error passes silently in release builds. Pass JSON config to openPMD::Series ctor Do not copy Series object see openPMD/openPMD-api#534 Allow NULL as configuration infix to denote empty string Adapt to changes in pmacc etc. Enable use of group-based layout as well Requires keeping openPMD Series open. Since openPMD currently has no explicit call to close a file, we implement this only for group-based layout for now. Do not use deprecated Series::setSoftwareVersion call Apply commit b797c0a to openPMD backend Formatting in .cfg files Fix an uninitialized value and an indexing bug Implement reviewers' comments concerning CMakeLists
Create openPMDWriter based on ADIOSWriter (WIP) Adapt CountParticles partially to openPMD Adapt WriteSpecies to openPMD Translate WriteMeta.hpp to openPMD Add function "asStandardVector()" Translate NDScalars.hpp to openPMD Adapt everything to openPMD except for the main file (openPMDWriter.hpp) Adapt openPMDWriter.hpp to openPMD WIP Change management of openPMD Series Further adapt openPMDWriter to openPMD Add openPMD to CMake Add openPMD to version formatting Properly acquaint openPMD plugin with build and help system Make openPMD namespacing explicit Remove adios-specific fields from ThreadParams First successfull run with LaserWakeField example Cleanup Use clang-format Update licensing information Separate basename and filename extension into two separate help parameters Refactor dataset creation Use Mesh::setTimeOffset() template Causes a linker error with the current version of openPMD API, a fix will be merged soon on the dev branch. Clean up some leftovers Use ASCII characters to spell my name Remove unnecessary whitespaces Adapt to removal of pmacc::forward Remove accidentally versioned config file Make checkpoints usable Fix a number of bugs concerning the reading of checkpoints Still problematic is the attribute "timeOffset", currently mitigated by uncommenting the sanity check in the openPMD API. Needs further investigation. Remove CollectFieldsSizes Legacy from ADIOS writer, not necessary in openPMD. Remove ParticleAttributeSize and openPMDCountParticles Legacy from ADIOS Writer Use clang-format Adhere to openPMD requirements before flushing For a given particle species, the openPMD API requires that required records (such as "position", "positionOffset") and their contained components be defined (not necessarily written). Make sure to define all such datasets before issuing the first flush. Maybe open an issue in the openPMD API to allow for a more flexible usage. Fix an indexing bug Eliminate dataset preparation for NDScalars Also fix a bug where particles were named wrongly in checkpoints. Do not write empty particle datasets Treat non-existing datasets as empty in reading Remove prepared datasets Remove WithWindow struct Use transform to enable ADIOS1 compression Remove accidentally versioned files Rename LoadParticleAttributesFromADIOS to LoadParticleAttributesFromOpenPMD Remove traces of the old ADIOS plugin mostly the word "adios" from comments Take copies and not references of openPMD handles Fix autoformatting Require newer openPMD API Also add ADIOS2_ROOT to CMAKE_PREFIX_PATH Add version label to format string only if present Replace typedefs with using Remove further indexing bug in writing particles_info table Cleanup restart Remove dataset preparation Commit 0b50561 reintroduced a reduced form of dataset preparation in order to adhere to requirements (restrictions) of the openPMD API. This workaround results in dummy dataset writes (likely a bug in the openPMD API), hence this commit reverts those changes. The corresponding pull request in the openPMD API to relax this restriction can be found at openPMD/openPMD-api#518. Postpone writing of meta attributes Due to a bug in the ADIOS1 backend of the openPMD API, the first dataset needs to be written before the first flush. This works around the problem by first defining all the fields and particles. Bug report will follow. Resolve counting bug during particle writing Fix whitespaces Separate ADIOS and HDF5 particle writing strategies Allow choosing strategy as runtime parameter Cleanup Fix openPMD version formatting Update examples to use openPMD Refactor passing of filename and extension Reassemble filename and extension upon opening the series. Fix some missing includes Do not skip writing empty datasets See openPMD PR: openPMD/openPMD-api#529 This allows to write empty datasets Remove debugging leftovers Write timeOffset for particles in a standard-compliant way Do not declare zero-sized arrays C++ standard requires that array size evaluate to a value greater than zero. Do not use storeChunk on empty datasets centralize initialization of thread params from config Fix undefined identifier in assert statements Error passes silently in release builds. Pass JSON config to openPMD::Series ctor Do not copy Series object see openPMD/openPMD-api#534 Allow NULL as configuration infix to denote empty string Adapt to changes in pmacc etc. Enable use of group-based layout as well Requires keeping openPMD Series open. Since openPMD currently has no explicit call to close a file, we implement this only for group-based layout for now. Do not use deprecated Series::setSoftwareVersion call Apply commit b797c0a to openPMD backend Formatting in .cfg files Fix an uninitialized value and an indexing bug Implement reviewers' comments concerning CMakeLists
Create openPMDWriter based on ADIOSWriter (WIP) Adapt CountParticles partially to openPMD Adapt WriteSpecies to openPMD Translate WriteMeta.hpp to openPMD Add function "asStandardVector()" Translate NDScalars.hpp to openPMD Adapt everything to openPMD except for the main file (openPMDWriter.hpp) Adapt openPMDWriter.hpp to openPMD WIP Change management of openPMD Series Further adapt openPMDWriter to openPMD Add openPMD to CMake Add openPMD to version formatting Properly acquaint openPMD plugin with build and help system Make openPMD namespacing explicit Remove adios-specific fields from ThreadParams First successfull run with LaserWakeField example Cleanup Use clang-format Update licensing information Separate basename and filename extension into two separate help parameters Refactor dataset creation Use Mesh::setTimeOffset() template Causes a linker error with the current version of openPMD API, a fix will be merged soon on the dev branch. Clean up some leftovers Use ASCII characters to spell my name Remove unnecessary whitespaces Adapt to removal of pmacc::forward Remove accidentally versioned config file Make checkpoints usable Fix a number of bugs concerning the reading of checkpoints Still problematic is the attribute "timeOffset", currently mitigated by uncommenting the sanity check in the openPMD API. Needs further investigation. Remove CollectFieldsSizes Legacy from ADIOS writer, not necessary in openPMD. Remove ParticleAttributeSize and openPMDCountParticles Legacy from ADIOS Writer Use clang-format Adhere to openPMD requirements before flushing For a given particle species, the openPMD API requires that required records (such as "position", "positionOffset") and their contained components be defined (not necessarily written). Make sure to define all such datasets before issuing the first flush. Maybe open an issue in the openPMD API to allow for a more flexible usage. Fix an indexing bug Eliminate dataset preparation for NDScalars Also fix a bug where particles were named wrongly in checkpoints. Do not write empty particle datasets Treat non-existing datasets as empty in reading Remove prepared datasets Remove WithWindow struct Use transform to enable ADIOS1 compression Remove accidentally versioned files Rename LoadParticleAttributesFromADIOS to LoadParticleAttributesFromOpenPMD Remove traces of the old ADIOS plugin mostly the word "adios" from comments Take copies and not references of openPMD handles Fix autoformatting Require newer openPMD API Also add ADIOS2_ROOT to CMAKE_PREFIX_PATH Add version label to format string only if present Replace typedefs with using Remove further indexing bug in writing particles_info table Cleanup restart Remove dataset preparation Commit 0b50561 reintroduced a reduced form of dataset preparation in order to adhere to requirements (restrictions) of the openPMD API. This workaround results in dummy dataset writes (likely a bug in the openPMD API), hence this commit reverts those changes. The corresponding pull request in the openPMD API to relax this restriction can be found at openPMD/openPMD-api#518. Postpone writing of meta attributes Due to a bug in the ADIOS1 backend of the openPMD API, the first dataset needs to be written before the first flush. This works around the problem by first defining all the fields and particles. Bug report will follow. Resolve counting bug during particle writing Fix whitespaces Separate ADIOS and HDF5 particle writing strategies Allow choosing strategy as runtime parameter Cleanup Fix openPMD version formatting Update examples to use openPMD Refactor passing of filename and extension Reassemble filename and extension upon opening the series. Fix some missing includes Do not skip writing empty datasets See openPMD PR: openPMD/openPMD-api#529 This allows to write empty datasets Remove debugging leftovers Write timeOffset for particles in a standard-compliant way Do not declare zero-sized arrays C++ standard requires that array size evaluate to a value greater than zero. Do not use storeChunk on empty datasets centralize initialization of thread params from config Fix undefined identifier in assert statements Error passes silently in release builds. Pass JSON config to openPMD::Series ctor Do not copy Series object see openPMD/openPMD-api#534 Allow NULL as configuration infix to denote empty string Adapt to changes in pmacc etc. Enable use of group-based layout as well Requires keeping openPMD Series open. Since openPMD currently has no explicit call to close a file, we implement this only for group-based layout for now. Do not use deprecated Series::setSoftwareVersion call Apply commit b797c0a to openPMD backend Formatting in .cfg files Fix an uninitialized value and an indexing bug Implement reviewers' comments concerning CMakeLists
Create openPMDWriter based on ADIOSWriter (WIP) Adapt CountParticles partially to openPMD Adapt WriteSpecies to openPMD Translate WriteMeta.hpp to openPMD Add function "asStandardVector()" Translate NDScalars.hpp to openPMD Adapt everything to openPMD except for the main file (openPMDWriter.hpp) Adapt openPMDWriter.hpp to openPMD WIP Change management of openPMD Series Further adapt openPMDWriter to openPMD Add openPMD to CMake Add openPMD to version formatting Properly acquaint openPMD plugin with build and help system Make openPMD namespacing explicit Remove adios-specific fields from ThreadParams First successfull run with LaserWakeField example Cleanup Use clang-format Update licensing information Separate basename and filename extension into two separate help parameters Refactor dataset creation Use Mesh::setTimeOffset() template Causes a linker error with the current version of openPMD API, a fix will be merged soon on the dev branch. Clean up some leftovers Use ASCII characters to spell my name Remove unnecessary whitespaces Adapt to removal of pmacc::forward Remove accidentally versioned config file Make checkpoints usable Fix a number of bugs concerning the reading of checkpoints Still problematic is the attribute "timeOffset", currently mitigated by uncommenting the sanity check in the openPMD API. Needs further investigation. Remove CollectFieldsSizes Legacy from ADIOS writer, not necessary in openPMD. Remove ParticleAttributeSize and openPMDCountParticles Legacy from ADIOS Writer Use clang-format Adhere to openPMD requirements before flushing For a given particle species, the openPMD API requires that required records (such as "position", "positionOffset") and their contained components be defined (not necessarily written). Make sure to define all such datasets before issuing the first flush. Maybe open an issue in the openPMD API to allow for a more flexible usage. Fix an indexing bug Eliminate dataset preparation for NDScalars Also fix a bug where particles were named wrongly in checkpoints. Do not write empty particle datasets Treat non-existing datasets as empty in reading Remove prepared datasets Remove WithWindow struct Use transform to enable ADIOS1 compression Remove accidentally versioned files Rename LoadParticleAttributesFromADIOS to LoadParticleAttributesFromOpenPMD Remove traces of the old ADIOS plugin mostly the word "adios" from comments Take copies and not references of openPMD handles Fix autoformatting Require newer openPMD API Also add ADIOS2_ROOT to CMAKE_PREFIX_PATH Add version label to format string only if present Replace typedefs with using Remove further indexing bug in writing particles_info table Cleanup restart Remove dataset preparation Commit 0b50561 reintroduced a reduced form of dataset preparation in order to adhere to requirements (restrictions) of the openPMD API. This workaround results in dummy dataset writes (likely a bug in the openPMD API), hence this commit reverts those changes. The corresponding pull request in the openPMD API to relax this restriction can be found at openPMD/openPMD-api#518. Postpone writing of meta attributes Due to a bug in the ADIOS1 backend of the openPMD API, the first dataset needs to be written before the first flush. This works around the problem by first defining all the fields and particles. Bug report will follow. Resolve counting bug during particle writing Fix whitespaces Separate ADIOS and HDF5 particle writing strategies Allow choosing strategy as runtime parameter Cleanup Fix openPMD version formatting Update examples to use openPMD Refactor passing of filename and extension Reassemble filename and extension upon opening the series. Fix some missing includes Do not skip writing empty datasets See openPMD PR: openPMD/openPMD-api#529 This allows to write empty datasets Remove debugging leftovers Write timeOffset for particles in a standard-compliant way Do not declare zero-sized arrays C++ standard requires that array size evaluate to a value greater than zero. Do not use storeChunk on empty datasets centralize initialization of thread params from config Fix undefined identifier in assert statements Error passes silently in release builds. Pass JSON config to openPMD::Series ctor Do not copy Series object see openPMD/openPMD-api#534 Allow NULL as configuration infix to denote empty string Adapt to changes in pmacc etc. Enable use of group-based layout as well Requires keeping openPMD Series open. Since openPMD currently has no explicit call to close a file, we implement this only for group-based layout for now. Do not use deprecated Series::setSoftwareVersion call Apply commit b797c0a to openPMD backend Formatting in .cfg files Fix an uninitialized value and an indexing bug Implement reviewers' comments concerning CMakeLists Fix some bugs and remove unneeded parameters Some ADIOS-specific parameters have been remove that haven't been implemented anyway and are going to be implemented via JSON. Don't set compression if set to "none". Also, I missed a small part when porting b797c0a to this plugin. Add documentation for openPMD plugin [WIP] Further write documentation Rename data preparation strategies adios -> doubleBuffer hdf5 -> mappedMemory Old names may still be used alternatively. Fix indexing bug for non domain-bound fields Fix indexing order in fields Implement Reviewer's comments Remove workaround for ADIOS1 backend fix attributes Mesh record component positions and unitSI Iteration: time ParticleAttribute unitDimension Implement reviewer's comments (2) Update copyright headers of files changed Add compression to openPMD TBG example Use openPMD::getVersion remove unnecessary parentheses
Create openPMDWriter based on ADIOSWriter (WIP) Adapt CountParticles partially to openPMD Adapt WriteSpecies to openPMD Translate WriteMeta.hpp to openPMD Add function "asStandardVector()" Translate NDScalars.hpp to openPMD Adapt everything to openPMD except for the main file (openPMDWriter.hpp) Adapt openPMDWriter.hpp to openPMD WIP Change management of openPMD Series Further adapt openPMDWriter to openPMD Add openPMD to CMake Add openPMD to version formatting Properly acquaint openPMD plugin with build and help system Make openPMD namespacing explicit Remove adios-specific fields from ThreadParams First successfull run with LaserWakeField example Cleanup Use clang-format Update licensing information Separate basename and filename extension into two separate help parameters Refactor dataset creation Use Mesh::setTimeOffset() template Causes a linker error with the current version of openPMD API, a fix will be merged soon on the dev branch. Clean up some leftovers Use ASCII characters to spell my name Remove unnecessary whitespaces Adapt to removal of pmacc::forward Remove accidentally versioned config file Make checkpoints usable Fix a number of bugs concerning the reading of checkpoints Still problematic is the attribute "timeOffset", currently mitigated by uncommenting the sanity check in the openPMD API. Needs further investigation. Remove CollectFieldsSizes Legacy from ADIOS writer, not necessary in openPMD. Remove ParticleAttributeSize and openPMDCountParticles Legacy from ADIOS Writer Use clang-format Adhere to openPMD requirements before flushing For a given particle species, the openPMD API requires that required records (such as "position", "positionOffset") and their contained components be defined (not necessarily written). Make sure to define all such datasets before issuing the first flush. Maybe open an issue in the openPMD API to allow for a more flexible usage. Fix an indexing bug Eliminate dataset preparation for NDScalars Also fix a bug where particles were named wrongly in checkpoints. Do not write empty particle datasets Treat non-existing datasets as empty in reading Remove prepared datasets Remove WithWindow struct Use transform to enable ADIOS1 compression Remove accidentally versioned files Rename LoadParticleAttributesFromADIOS to LoadParticleAttributesFromOpenPMD Remove traces of the old ADIOS plugin mostly the word "adios" from comments Take copies and not references of openPMD handles Fix autoformatting Require newer openPMD API Also add ADIOS2_ROOT to CMAKE_PREFIX_PATH Add version label to format string only if present Replace typedefs with using Remove further indexing bug in writing particles_info table Cleanup restart Remove dataset preparation Commit 0b50561 reintroduced a reduced form of dataset preparation in order to adhere to requirements (restrictions) of the openPMD API. This workaround results in dummy dataset writes (likely a bug in the openPMD API), hence this commit reverts those changes. The corresponding pull request in the openPMD API to relax this restriction can be found at openPMD/openPMD-api#518. Postpone writing of meta attributes Due to a bug in the ADIOS1 backend of the openPMD API, the first dataset needs to be written before the first flush. This works around the problem by first defining all the fields and particles. Bug report will follow. Resolve counting bug during particle writing Fix whitespaces Separate ADIOS and HDF5 particle writing strategies Allow choosing strategy as runtime parameter Cleanup Fix openPMD version formatting Update examples to use openPMD Refactor passing of filename and extension Reassemble filename and extension upon opening the series. Fix some missing includes Do not skip writing empty datasets See openPMD PR: openPMD/openPMD-api#529 This allows to write empty datasets Remove debugging leftovers Write timeOffset for particles in a standard-compliant way Do not declare zero-sized arrays C++ standard requires that array size evaluate to a value greater than zero. Do not use storeChunk on empty datasets centralize initialization of thread params from config Fix undefined identifier in assert statements Error passes silently in release builds. Pass JSON config to openPMD::Series ctor Do not copy Series object see openPMD/openPMD-api#534 Allow NULL as configuration infix to denote empty string Adapt to changes in pmacc etc. Enable use of group-based layout as well Requires keeping openPMD Series open. Since openPMD currently has no explicit call to close a file, we implement this only for group-based layout for now. Do not use deprecated Series::setSoftwareVersion call Apply commit b797c0a to openPMD backend Formatting in .cfg files Fix an uninitialized value and an indexing bug Implement reviewers' comments concerning CMakeLists Fix some bugs and remove unneeded parameters Some ADIOS-specific parameters have been remove that haven't been implemented anyway and are going to be implemented via JSON. Don't set compression if set to "none". Also, I missed a small part when porting b797c0a to this plugin. Add documentation for openPMD plugin [WIP] Further write documentation Rename data preparation strategies adios -> doubleBuffer hdf5 -> mappedMemory Old names may still be used alternatively. Fix indexing bug for non domain-bound fields Fix indexing order in fields Implement Reviewer's comments Remove workaround for ADIOS1 backend fix attributes Mesh record component positions and unitSI Iteration: time ParticleAttribute unitDimension Implement reviewer's comments (2) Update copyright headers of files changed Add compression to openPMD TBG example Use openPMD::getVersion remove unnecessary parentheses
This issue (or a closely related one) is causing problems for me trying to wrap openPMD from Julia. The problem I face is that many of the public openPMD types do not expose a default constructor. This makes it impossible (or at least very difficult, and I don't know how to do this for a Julia interface) to put objects of such types into STL containers. In practice, the STL really expects types to have a default constructor, and to have an "invalid" state if necessary. Another issue I'm facing is that Julia is garbage collected, and it's thus difficult to ensure that objects are destructed and closed in any particular order. I can call One simple way to make all this happen is to leave the openPMD types as they are, and to essentially use I would then also store these wrapper objects (and not actual objects) into the various It would be important (at least for Julia wrappers) that the implementation objects are completely hidden, and do not e.g. appear via public inheritance. For example, there is currently a |
Before answering to your post specifically, be aware that we already redesigned the
We have already moved
Again,
This is exactly the plan, yes
|
After following around a segmentation fault when using the openPMD API, I came to the conclusion that there is a relatively deeply-nested issue with the design of the frontend's classes.
Most of those classes have been designed as handles to some underlying data so that users can take a lightweight copy (instead of a reference or pointer) and still interact with the same shared data.
Key to this is the class
Container
that wraps ashared_ptr
to an internal container (e.g.std::map
). Most classes exposed in the public API store their payload behind aContainer
(e.g. inSeries
orIteration
) or directly behind ashared_ptr
(e.g. inAttributable
).The issue arises because atm there is no sufficiently clear separation between (1) functionality of copyable handles and (2) functionality that should be restricted to the unique non-copy internal data.
So far, I have found two issues falling in this category:
(1) Destructor calls
This issue has limited extent, fortunately, since most classes use a default destructor. But also the root class of the openPMD tree
Series
has been designed as a handle, so its destructor should not really perform a flush.(2) Going upward in the openPMD hierarchy
More problematic is the fact that the openPMD tree is not a tree of unique objects but a tree of the mentioned handles. The tree is linked (in upward direction) using the classes
Writable
andAttributable
, using raw pointers in order to break reference cycles. (More idiomatic would be weak pointers, but this is not the issue here). This linkage is later used again to go upward in the openPMD hierarchy.When doing this, in principle the handle that has been stored as a parent can already be invalidated while the underlying data is still present.
Fortunately enough, it is currently difficult to trigger this behavior. The following rather constructed examples show the issue:
Destructor runs at the marked line. No iteration is present yet, so flushing in file-based mode throws an exception. It seems surprising that the series is flushed.
We define the data earlier, so the first flush passes. Since the original handle has been destroyed, the second flush at the marked line fails with a segmentation fault.
The issue is not currently critical since triggering it requires writing rather esoteric programs, but for my current implementation of streaming this is becoming increasingly difficult to handle since re-parsing the openPMD hierarchy is necessary and I need to pay attention to not link to any copied handles but the original one instead.
I can currently work around the problem, but these issues should be considered in an upcoming refactoring of openPMD's frontend.
The text was updated successfully, but these errors were encountered: