Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/IO/ADIOS/ADIOS2IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,12 @@ void ADIOS2IOHandlerImpl::getBufferView(
Writable *writable, Parameter<Operation::GET_BUFFER_VIEW> &parameters)
{
// @todo check access mode
/*
* We will check BP5 again below. BP5 fundamentally supports the Span API,
* but runs into this bug https://github.com/ornladios/ADIOS2/issues/4586,
* fixed by https://github.com/ornladios/ADIOS2/pull/4587,
* so we treat the Span API as opt-in there.
*/
std::string optInEngines[] = {"bp4", "bp5", "file", "filestream"};
if (std::none_of(
begin(optInEngines),
Expand All @@ -1270,7 +1276,17 @@ void ADIOS2IOHandlerImpl::getBufferView(
return;
case UseSpan::Auto:
if (switchAdios2VariableType<detail::HasOperators>(
parameters.dtype, name, ba.m_IO))
parameters.dtype, name, ba.m_IO)
#if ( \
ADIOS2_VERSION_MAJOR * 1000 + ADIOS2_VERSION_MINOR * 10 + \
ADIOS2_VERSION_PATCH) <= 2102
||
// Deactivate the Span API in BP5 by default due to this bug
// https://github.com/ornladios/ADIOS2/issues/4586,
// fixed by https://github.com/ornladios/ADIOS2/pull/4587
this->realEngineType() == "bp5"
#endif
)
{
parameters.out->backendManagedBuffer = false;
return;
Expand Down
13 changes: 12 additions & 1 deletion test/Files_ParallelIO/iterate_nonstreaming_series.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,18 @@ static auto run_test(
size_t const extent = base_extent * size_t(mpi_size);

{
Series writeSeries(file, Access::CREATE, MPI_COMM_WORLD, jsonConfig);
Series writeSeries(
file,
Access::CREATE,
MPI_COMM_WORLD,
/*
* The ADIOS2 backend deactivates the Span API by default due to
* this bug: https://github.com/ornladios/ADIOS2/issues/4586,
* fixed by https://github.com/ornladios/ADIOS2/pull/4587.
* For this test, we enable it.
*/
json::merge(
jsonConfig, R"({"adios2":{"use_span_based_put": true}})"));
if (variableBasedLayout)
{
writeSeries.setIterationEncoding(IterationEncoding::variableBased);
Expand Down
12 changes: 11 additions & 1 deletion test/SerialIOTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6394,7 +6394,17 @@ void iterate_nonstreaming_series(
{
constexpr size_t extent = 100;
{
Series writeSeries(file, Access::CREATE, jsonConfig);
Series writeSeries(
file,
Access::CREATE,
/*
* The ADIOS2 backend deactivates the Span API by default due to
* this bug: https://github.com/ornladios/ADIOS2/issues/4586,
* fixed by https://github.com/ornladios/ADIOS2/pull/4587.
* For this test, we enable it.
*/
json::merge(
jsonConfig, R"({"adios2":{"use_span_based_put": true}})"));
if (variableBasedLayout)
{
writeSeries.setIterationEncoding(IterationEncoding::variableBased);
Expand Down
Loading