Replies: 3 comments
-
The manual could probably be written more clearly. There are two things being presented here, one is that if you use ReadRandomAccess mode, ADIOS will internally read all the metadata associated with the input. If your file has a lot of variables, a lot of timesteps, and was written using a lot of writer ranks that metadata can take up a lot of memory (and make the Open() take a long time). However, the third sentence above refers to allocating memory for what you are going to read. SetStepSelection() takes a range of steps, so you're not necessarily reading just one. It is suggesting that you make sure you allocate enough memory for all the variable data that you are going to read. |
Beta Was this translation helpful? Give feedback.
-
What's the recommended (best) way to read one step from a file? |
Beta Was this translation helpful? Give feedback.
-
In ReadRandomAccess mode If you need to read just a specific step, set the range in SetStepSelection() to have a size of 1. For example to read step N: |
Beta Was this translation helpful? Give feedback.
-
The manuals states:
"ReadRandomAccess can only be used with file engines and involves loading all the file metadata at once. So it can be more memory intensive than adios2::Mode::Read mode, but allows reading data from any timestep using SetStepSelection(). If you use adios2::Mode::ReadRandomAccess mode, be sure to allocate enough memory to hold multiple steps of the variable content. "
Do I really need to allocate memory for all the available steps if I use SetStepSelection() to pick the one I want?
Beta Was this translation helpful? Give feedback.
All reactions