Skip to content

Commit ef2042f

Browse files
committed
Deactivate Span API by default in BP5
1 parent b6f9b30 commit ef2042f

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed

src/IO/ADIOS/ADIOS2IOHandler.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1247,6 +1247,11 @@ void ADIOS2IOHandlerImpl::getBufferView(
12471247
Writable *writable, Parameter<Operation::GET_BUFFER_VIEW> &parameters)
12481248
{
12491249
// @todo check access mode
1250+
/*
1251+
* We will check BP5 again below. BP5 fundamentally supports the Span API,
1252+
* but runs into this bug https://github.com/ornladios/ADIOS2/issues/4586,
1253+
* so we treat the Span API as opt-in there.
1254+
*/
12501255
std::string optInEngines[] = {"bp4", "bp5", "file", "filestream"};
12511256
if (std::none_of(
12521257
begin(optInEngines),
@@ -1270,7 +1275,16 @@ void ADIOS2IOHandlerImpl::getBufferView(
12701275
return;
12711276
case UseSpan::Auto:
12721277
if (switchAdios2VariableType<detail::HasOperators>(
1273-
parameters.dtype, name, ba.m_IO))
1278+
parameters.dtype, name, ba.m_IO)
1279+
#if ( \
1280+
ADIOS2_VERSION_MAJOR * 1000 + ADIOS2_VERSION_MINOR * 10 + \
1281+
ADIOS2_VERSION_PATCH) <= 2102
1282+
||
1283+
// Deactivate the Span API in BP5 by default due to this bug
1284+
// https://github.com/ornladios/ADIOS2/issues/4586,
1285+
this->realEngineType() == "bp5"
1286+
#endif
1287+
)
12741288
{
12751289
parameters.out->backendManagedBuffer = false;
12761290
return;

test/Files_ParallelIO/iterate_nonstreaming_series.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,17 @@ static auto run_test(
2121
size_t const extent = base_extent * size_t(mpi_size);
2222

2323
{
24-
Series writeSeries(file, Access::CREATE, MPI_COMM_WORLD, jsonConfig);
24+
Series writeSeries(
25+
file,
26+
Access::CREATE,
27+
MPI_COMM_WORLD,
28+
/*
29+
* The ADIOS2 backend deactivates the Span API by default due to
30+
* this bug: https://github.com/ornladios/ADIOS2/issues/4586.
31+
* For this test, we enable it.
32+
*/
33+
json::merge(
34+
jsonConfig, R"({"adios2":{"use_span_based_put": true}})"));
2535
if (variableBasedLayout)
2636
{
2737
writeSeries.setIterationEncoding(IterationEncoding::variableBased);

test/SerialIOTest.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6394,7 +6394,16 @@ void iterate_nonstreaming_series(
63946394
{
63956395
constexpr size_t extent = 100;
63966396
{
6397-
Series writeSeries(file, Access::CREATE, jsonConfig);
6397+
Series writeSeries(
6398+
file,
6399+
Access::CREATE,
6400+
/*
6401+
* The ADIOS2 backend deactivates the Span API by default due to
6402+
* this bug: https://github.com/ornladios/ADIOS2/issues/4586.
6403+
* For this test, we enable it.
6404+
*/
6405+
json::merge(
6406+
jsonConfig, R"({"adios2":{"use_span_based_put": true}})"));
63986407
if (variableBasedLayout)
63996408
{
64006409
writeSeries.setIterationEncoding(IterationEncoding::variableBased);

0 commit comments

Comments
 (0)