See this line, similarly in Record.cpp.
In some backends, there are performance benefits from avoiding flushes before closing an iteration:
- BP4 engine of ADIOS2: The internal ADIOS2 buffer will be allocated to the correct size upon
Engine::EndStep(). If flushing before that, it needs to be allocated before ending the step and might need to be resized later.
- BP5 engine of ADIOS2: Flushing in BP5 might cause unnecessary copies into internal buffers. If using deferred Put() and EndStep() only, BP5 can avoid copies entirely.
Calling IOHandler()->flush() at those place ruins this and should be replaced with something more fine-grained.
It's currently essentially impossible to avoid these unnecessary copies into BP5 buffers while using scalar components.
See this line, similarly in
Record.cpp.In some backends, there are performance benefits from avoiding flushes before closing an iteration:
Engine::EndStep(). If flushing before that, it needs to be allocated before ending the step and might need to be resized later.Calling
IOHandler()->flush()at those place ruins this and should be replaced with something more fine-grained.It's currently essentially impossible to avoid these unnecessary copies into BP5 buffers while using scalar components.