Skip to content

Commit ec449af

Browse files
Fixes for ADIOS2 v2.11 (#1804)
* No more changed dimensions in v encoding * Link to renamed ADIOS2 targets * Workaround the bug for now * Revert "Workaround the bug for now" This reverts commit 4bf7298. Fixed with ornladios/ADIOS2#4717 and ornladios/ADIOS2#4718
1 parent c5fb5de commit ec449af

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

CMakeLists.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,10 +544,18 @@ endif()
544544

545545
# ADIOS2 Backend
546546
if(openPMD_HAVE_ADIOS2)
547-
if(openPMD_HAVE_MPI)
548-
target_link_libraries(openPMD PUBLIC adios2::cxx11_mpi)
547+
if(${ADIOS2_VERSION} VERSION_GREATER_EQUAL 2.11.0)
548+
if(openPMD_HAVE_MPI)
549+
target_link_libraries(openPMD PUBLIC adios2::cxx_mpi)
550+
else()
551+
target_link_libraries(openPMD PUBLIC adios2::cxx)
552+
endif()
549553
else()
550-
target_link_libraries(openPMD PUBLIC adios2::cxx11)
554+
if(openPMD_HAVE_MPI)
555+
target_link_libraries(openPMD PUBLIC adios2::cxx11_mpi)
556+
else()
557+
target_link_libraries(openPMD PUBLIC adios2::cxx11)
558+
endif()
551559
endif()
552560
endif()
553561

test/SerialIOTest.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5853,10 +5853,11 @@ void variableBasedSeries(std::string const &file)
58535853

58545854
iteration.setAttribute("changing_value", i);
58555855

5856-
// this tests changing extents and dimensionalities
5857-
// across iterations
5856+
// this tests changing extents across iterations
5857+
// ADIOS2 does not support changing the dimensionality
5858+
// (older versions used to somewhat support it, but not really)
58585859
auto E_y = iteration.meshes["E"]["y"];
5859-
unsigned dimensionality = i % 3 + 1;
5860+
unsigned dimensionality = 3;
58605861
unsigned len = i + 1;
58615862
Extent changingExtent(dimensionality, len);
58625863
E_y.resetDataset({openPMD::Datatype::INT, changingExtent});
@@ -5984,7 +5985,7 @@ void variableBasedSeries(std::string const &file)
59845985
}
59855986

59865987
auto E_y = iteration.meshes["E"]["y"];
5987-
unsigned dimensionality = index % 3 + 1;
5988+
unsigned dimensionality = 3;
59885989
unsigned len = index + 1;
59895990
Extent changingExtent(dimensionality, len);
59905991
REQUIRE(E_y.getExtent() == changingExtent);

0 commit comments

Comments
 (0)