diff --git a/CMakeLists.txt b/CMakeLists.txt index 3811ca7ab3..d37b76b25b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -544,10 +544,18 @@ endif() # ADIOS2 Backend if(openPMD_HAVE_ADIOS2) - if(openPMD_HAVE_MPI) - target_link_libraries(openPMD PUBLIC adios2::cxx11_mpi) + if(${ADIOS2_VERSION} VERSION_GREATER_EQUAL 2.11.0) + if(openPMD_HAVE_MPI) + target_link_libraries(openPMD PUBLIC adios2::cxx_mpi) + else() + target_link_libraries(openPMD PUBLIC adios2::cxx) + endif() else() - target_link_libraries(openPMD PUBLIC adios2::cxx11) + if(openPMD_HAVE_MPI) + target_link_libraries(openPMD PUBLIC adios2::cxx11_mpi) + else() + target_link_libraries(openPMD PUBLIC adios2::cxx11) + endif() endif() endif() diff --git a/test/SerialIOTest.cpp b/test/SerialIOTest.cpp index 64d41adadb..432dd864f3 100644 --- a/test/SerialIOTest.cpp +++ b/test/SerialIOTest.cpp @@ -5853,10 +5853,11 @@ void variableBasedSeries(std::string const &file) iteration.setAttribute("changing_value", i); - // this tests changing extents and dimensionalities - // across iterations + // this tests changing extents across iterations + // ADIOS2 does not support changing the dimensionality + // (older versions used to somewhat support it, but not really) auto E_y = iteration.meshes["E"]["y"]; - unsigned dimensionality = i % 3 + 1; + unsigned dimensionality = 3; unsigned len = i + 1; Extent changingExtent(dimensionality, len); E_y.resetDataset({openPMD::Datatype::INT, changingExtent}); @@ -5984,7 +5985,7 @@ void variableBasedSeries(std::string const &file) } auto E_y = iteration.meshes["E"]["y"]; - unsigned dimensionality = index % 3 + 1; + unsigned dimensionality = 3; unsigned len = index + 1; Extent changingExtent(dimensionality, len); REQUIRE(E_y.getExtent() == changingExtent);