Skip to content

Commit 0263879

Browse files
Deactivate Span API by default in BP5 (#1771)
* Deactivate Span API by default in BP5 * Link the fix PR
1 parent b6f9b30 commit 0263879

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

src/IO/ADIOS/ADIOS2IOHandler.cpp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1247,6 +1247,12 @@ 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+
* fixed by https://github.com/ornladios/ADIOS2/pull/4587,
1254+
* so we treat the Span API as opt-in there.
1255+
*/
12501256
std::string optInEngines[] = {"bp4", "bp5", "file", "filestream"};
12511257
if (std::none_of(
12521258
begin(optInEngines),
@@ -1270,7 +1276,17 @@ void ADIOS2IOHandlerImpl::getBufferView(
12701276
return;
12711277
case UseSpan::Auto:
12721278
if (switchAdios2VariableType<detail::HasOperators>(
1273-
parameters.dtype, name, ba.m_IO))
1279+
parameters.dtype, name, ba.m_IO)
1280+
#if ( \
1281+
ADIOS2_VERSION_MAJOR * 1000 + ADIOS2_VERSION_MINOR * 10 + \
1282+
ADIOS2_VERSION_PATCH) <= 2102
1283+
||
1284+
// Deactivate the Span API in BP5 by default due to this bug
1285+
// https://github.com/ornladios/ADIOS2/issues/4586,
1286+
// fixed by https://github.com/ornladios/ADIOS2/pull/4587
1287+
this->realEngineType() == "bp5"
1288+
#endif
1289+
)
12741290
{
12751291
parameters.out->backendManagedBuffer = false;
12761292
return;

test/Files_ParallelIO/iterate_nonstreaming_series.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,18 @@ 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+
* fixed by https://github.com/ornladios/ADIOS2/pull/4587.
32+
* For this test, we enable it.
33+
*/
34+
json::merge(
35+
jsonConfig, R"({"adios2":{"use_span_based_put": true}})"));
2536
if (variableBasedLayout)
2637
{
2738
writeSeries.setIterationEncoding(IterationEncoding::variableBased);

test/SerialIOTest.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6394,7 +6394,17 @@ 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+
* fixed by https://github.com/ornladios/ADIOS2/pull/4587.
6404+
* For this test, we enable it.
6405+
*/
6406+
json::merge(
6407+
jsonConfig, R"({"adios2":{"use_span_based_put": true}})"));
63986408
if (variableBasedLayout)
63996409
{
64006410
writeSeries.setIterationEncoding(IterationEncoding::variableBased);

0 commit comments

Comments
 (0)