Skip to content

Commit

Permalink
Implicitly defer task in ADIOS2
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Mar 1, 2021
1 parent 249d7ad commit 21b89e4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/IO/ADIOS/ADIOS2IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,16 @@ struct GetSpan
variable.SetSelection( { std::move( offset ), std::move( extent ) } );
typename adios2::Variable< T >::Span span = engine.Put( variable );
params.out->taskSupportedByBackend = true;
params.out->ptr = span.data();
/*
* SIC!
* Do not emplace span.data() yet.
* Only call span.data() as soon as the user needs the pointer
* (will always be propagated to the backend with parameters.update
* = true).
* This avoids repeated resizing of ADIOS2 internal buffers if calling
* multiple spans.
*/
// params.out->ptr = span.data();
unsigned nextIndex;
if( ba.m_updateSpans.empty() )
{
Expand Down

0 comments on commit 21b89e4

Please sign in to comment.