diff --git a/.github/ci/spack-envs/clang14_py311_nompi_h5_ad2/spack.yaml b/.github/ci/spack-envs/clang14_py311_nompi_h5_ad2/spack.yaml index 06e9d1ac40..08bbe79f00 100644 --- a/.github/ci/spack-envs/clang14_py311_nompi_h5_ad2/spack.yaml +++ b/.github/ci/spack-envs/clang14_py311_nompi_h5_ad2/spack.yaml @@ -13,7 +13,7 @@ spack: hdf5: variants: ~mpi adios2: - variants: ~mpi ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2 + variants: ~mpi ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2 ~mgard cmake: externals: - spec: cmake@3.22.1 diff --git a/.github/ci/spack-envs/clang7_nopy_ompi_h5_ad2/spack.yaml b/.github/ci/spack-envs/clang7_nopy_ompi_h5_ad2/spack.yaml index fa2e588608..9baf1d3151 100644 --- a/.github/ci/spack-envs/clang7_nopy_ompi_h5_ad2/spack.yaml +++ b/.github/ci/spack-envs/clang7_nopy_ompi_h5_ad2/spack.yaml @@ -12,7 +12,7 @@ spack: packages: adios2: - variants: ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2 + variants: ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2 ~blosc2 cmake: externals: - spec: cmake@3.23.0 diff --git a/.github/ci/spack-envs/clang7_nopy_ompi_h5_ad2_libcpp/spack.yaml b/.github/ci/spack-envs/clang7_nopy_ompi_h5_ad2_libcpp/spack.yaml index 8a8dd00024..0785e5c4b6 100644 --- a/.github/ci/spack-envs/clang7_nopy_ompi_h5_ad2_libcpp/spack.yaml +++ b/.github/ci/spack-envs/clang7_nopy_ompi_h5_ad2_libcpp/spack.yaml @@ -6,13 +6,13 @@ # spack: specs: - - adios2 + - adios2@2.10 - hdf5 - openmpi packages: adios2: - variants: ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2 + variants: ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2 ~mgard ~blosc2 cmake: externals: - spec: cmake@3.23.0 diff --git a/.github/ci/spack-envs/clang8_py38_mpich_h5_ad2/spack.yaml b/.github/ci/spack-envs/clang8_py38_mpich_h5_ad2/spack.yaml index a6d568611f..81e3155f8f 100644 --- a/.github/ci/spack-envs/clang8_py38_mpich_h5_ad2/spack.yaml +++ b/.github/ci/spack-envs/clang8_py38_mpich_h5_ad2/spack.yaml @@ -6,13 +6,13 @@ # spack: specs: - - adios2@2.7.1 + - adios2@2.10 - hdf5 - mpich packages: adios2: - variants: ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2 + variants: ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2 ~blosc2 cmake: externals: - spec: cmake@3.23.0 diff --git a/.github/ci/spack-envs/clangtidy_nopy_ompi_h5_ad2/spack.yaml b/.github/ci/spack-envs/clangtidy_nopy_ompi_h5_ad2/spack.yaml index 1543ec794c..ebe5acb1bd 100644 --- a/.github/ci/spack-envs/clangtidy_nopy_ompi_h5_ad2/spack.yaml +++ b/.github/ci/spack-envs/clangtidy_nopy_ompi_h5_ad2/spack.yaml @@ -6,7 +6,7 @@ # spack: specs: - - adios2 + - adios2@2.10 - hdf5 - openmpi diff --git a/.github/ci/spack-envs/gcc7_py36_ompi_h5_ad2/spack.yaml b/.github/ci/spack-envs/gcc7_py36_ompi_h5_ad2/spack.yaml index 8785650cf2..6e528c5ddb 100644 --- a/.github/ci/spack-envs/gcc7_py36_ompi_h5_ad2/spack.yaml +++ b/.github/ci/spack-envs/gcc7_py36_ompi_h5_ad2/spack.yaml @@ -6,7 +6,7 @@ # spack: specs: - - adios2 + - adios2@2.10 - hdf5 - openmpi diff --git a/.github/workflows/dependencies/install_spack b/.github/workflows/dependencies/install_spack index 30d7d06a92..7a45620503 100755 --- a/.github/workflows/dependencies/install_spack +++ b/.github/workflows/dependencies/install_spack @@ -3,7 +3,7 @@ set -eu -o pipefail -spack_ver="0.17.1" +spack_ver="0.22.3" cd /opt if [[ -d spack && ! -f spack_${spack_ver} ]] diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index bb54349a08..53daa723c7 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -63,6 +63,7 @@ jobs: mpiexec --version perl --version python --version + sudo ln -s "$(which cmake)" /usr/bin/cmake eval $(spack env activate --sh .github/ci/spack-envs/clang7_nopy_ompi_h5_ad2_libcpp/) spack install @@ -99,6 +100,7 @@ jobs: - name: Build env: {CC: clang-7, CXX: clang++-7, CXXFLAGS: -Werror} run: | + sudo ln -s "$(which cmake)" /usr/bin/cmake eval $(spack env activate --sh .github/ci/spack-envs/clang7_nopy_ompi_h5_ad2/) spack install @@ -178,6 +180,7 @@ jobs: mpiexec --version perl --version python --version + sudo ln -s "$(which cmake)" /usr/bin/cmake eval $(spack env activate --sh .github/ci/spack-envs/clang8_py38_mpich_h5_ad2/) spack install @@ -229,6 +232,7 @@ jobs: - name: Build env: {CC: gcc-7, CXX: g++-7, CXXFLAGS: -Werror} run: | + sudo ln -s "$(which cmake)" /usr/bin/cmake eval $(spack env activate --sh .github/ci/spack-envs/gcc7_py36_ompi_h5_ad2/) spack install diff --git a/.github/workflows/tooling.yml b/.github/workflows/tooling.yml index 03d5070d86..4f4ed5e377 100644 --- a/.github/workflows/tooling.yml +++ b/.github/workflows/tooling.yml @@ -24,6 +24,7 @@ jobs: - name: Build env: {CC: clang, CXX: clang++} run: | + sudo ln -s "$(which cmake)" /usr/bin/cmake eval $(spack env activate --sh .github/ci/spack-envs/clangtidy_nopy_ompi_h5_ad2/) spack install @@ -54,6 +55,7 @@ jobs: - name: Build env: {CC: mpicc, CXX: mpic++, OMPI_CC: clang-10, OMPI_CXX: clang++-10, CXXFLAGS: -Werror, OPENPMD_HDF5_CHUNKS: none, OPENPMD_TEST_NFILES_MAX: 100} run: | + sudo ln -s "$(which cmake)" /usr/bin/cmake eval $(spack env activate --sh .github/ci/spack-envs/clangtidy_nopy_ompi_h5_ad2/) spack install SOURCEPATH="$(pwd)" diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 409997c5b8..f02069f097 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,17 @@ Changelog ========= +0.16.0 +------ + +Changes to "0.15.0" +^^^^^^^^^^^^^^^^^^^ + +Other +""""" + +- ADIOS2: require version 2.9.0 #1711 + 0.16.0 ------ **Date:** 2024-10-07 diff --git a/CMakeLists.txt b/CMakeLists.txt index e5272ae2de..03637b1938 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -365,14 +365,14 @@ if(openPMD_HAVE_MPI) list(APPEND openPMD_REQUIRED_ADIOS2_COMPONENTS MPI) endif() if(openPMD_USE_ADIOS2 STREQUAL AUTO) - find_package(ADIOS2 2.7.0 CONFIG COMPONENTS ${openPMD_REQUIRED_ADIOS2_COMPONENTS}) + find_package(ADIOS2 2.9.0 CONFIG COMPONENTS ${openPMD_REQUIRED_ADIOS2_COMPONENTS}) if(ADIOS2_FOUND) set(openPMD_HAVE_ADIOS2 TRUE) else() set(openPMD_HAVE_ADIOS2 FALSE) endif() elseif(openPMD_USE_ADIOS2) - find_package(ADIOS2 2.7.0 REQUIRED CONFIG COMPONENTS ${openPMD_REQUIRED_ADIOS2_COMPONENTS}) + find_package(ADIOS2 2.9.0 REQUIRED CONFIG COMPONENTS ${openPMD_REQUIRED_ADIOS2_COMPONENTS}) set(openPMD_HAVE_ADIOS2 TRUE) else() set(openPMD_HAVE_ADIOS2 FALSE) diff --git a/Dockerfile b/Dockerfile index eb31c61c51..3186001384 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,7 +56,7 @@ RUN curl -sLo c-blosc-1.15.0.tar.gz https://github.com/Blosc/c-blosc/arch && make \ && make install -RUN curl -sLo adios2-2.7.1.tar.gz https://github.com/ornladios/ADIOS2/archive/v2.7.1.tar.gz \ +RUN curl -sLo adios2-2.9.2.tar.gz https://github.com/ornladios/ADIOS2/archive/v2.9.2.tar.gz \ && file adios2*.tar.gz \ && tar -xzf adios2*.tar.gz \ && rm adios2*.tar.gz \ diff --git a/NEWS.rst b/NEWS.rst index beb53b4079..c3abe97204 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -3,6 +3,11 @@ Upgrade Guide ============= +0.17.0 +------ + +ADIOS 2.9.0 is now the minimally supported version for ADIOS2 support. + 0.16.0 ------ diff --git a/README.md b/README.md index 79dc6f1714..ce7a2bd5fe 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ Shipped internally (downloaded by CMake unless `openPMD_SUPERBUILD=OFF` is set): I/O backends: * [JSON](https://en.wikipedia.org/wiki/JSON) * [HDF5](https://support.hdfgroup.org/HDF5) 1.8.13+ (optional) -* [ADIOS2](https://github.com/ornladios/ADIOS2) 2.7.0+ (optional) +* [ADIOS2](https://github.com/ornladios/ADIOS2) 2.9.0+ (optional) while those can be built either with or without: * MPI 2.1+, e.g. OpenMPI 1.6.5+ or MPICH2 diff --git a/docs/source/backends/adios2.rst b/docs/source/backends/adios2.rst index 55f080494c..0c0e87e612 100644 --- a/docs/source/backends/adios2.rst +++ b/docs/source/backends/adios2.rst @@ -58,9 +58,6 @@ Steps ADIOS2 is optimized towards organizing the process of reading/writing data into IO steps. In order to activate steps, it is imperative to use the :ref:`Streaming API ` (which can be used for either file-based or streaming-based workflows). -ADIOS2 release 2.6.0 contained a bug (fixed in ADIOS 2.7.0, see `PR #2348 `_) that disallows random-accessing steps in file-based engines. -With this ADIOS2 release, files written with steps may only be read using the streaming API. - Upon reading a file, the ADIOS2 backend will automatically recognize whether it has been written with or without steps, ignoring the JSON option mentioned above. Steps are mandatory for streaming-based engines and trying to switch them off will result in a runtime error. diff --git a/docs/source/dev/dependencies.rst b/docs/source/dev/dependencies.rst index 87667f0efb..9fa226f416 100644 --- a/docs/source/dev/dependencies.rst +++ b/docs/source/dev/dependencies.rst @@ -27,7 +27,7 @@ Optional: I/O backends * `JSON `_ * `HDF5 `_ 1.8.13+ -* `ADIOS2 `_ 2.7.0+ +* `ADIOS2 `_ 2.9.0+ while those can be build either with or without: diff --git a/include/openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp b/include/openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp index e741b029df..2741a91fb0 100644 --- a/include/openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp +++ b/include/openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp @@ -198,9 +198,7 @@ namespace detail case adios2::Mode::Write: return false; case adios2::Mode::Read: -#if openPMD_HAS_ADIOS_2_8 case adios2::Mode::ReadRandomAccess: -#endif return true; case adios2::Mode::Undefined: case adios2::Mode::Sync: @@ -217,9 +215,7 @@ namespace detail case adios2::Mode::Write: return true; case adios2::Mode::Read: -#if openPMD_HAS_ADIOS_2_8 case adios2::Mode::ReadRandomAccess: -#endif return false; case adios2::Mode::Undefined: case adios2::Mode::Sync: diff --git a/include/openPMD/IO/ADIOS/macros.hpp b/include/openPMD/IO/ADIOS/macros.hpp index 8618573713..656a7aec35 100644 --- a/include/openPMD/IO/ADIOS/macros.hpp +++ b/include/openPMD/IO/ADIOS/macros.hpp @@ -6,19 +6,6 @@ #include -/* - * ADIOS2 v2.8 brings mode::ReadRandomAccess - */ -#define openPMD_HAS_ADIOS_2_8 \ - (ADIOS2_VERSION_MAJOR * 100 + ADIOS2_VERSION_MINOR >= 208) -/* - * ADIOS2 v2.9 brings modifiable attributes (technically already in v2.8, but - * there are too many bugs, so we only support it beginning with v2.9). - * Group table feature requires ADIOS2 v2.9. - */ -#define openPMD_HAS_ADIOS_2_9 \ - (ADIOS2_VERSION_MAJOR * 100 + ADIOS2_VERSION_MINOR >= 209) - #define openPMD_HAS_ADIOS_2_10 \ (ADIOS2_VERSION_MAJOR * 100 + ADIOS2_VERSION_MINOR >= 210) diff --git a/src/IO/ADIOS/ADIOS2File.cpp b/src/IO/ADIOS/ADIOS2File.cpp index 82dd33f70b..c6f4747aff 100644 --- a/src/IO/ADIOS/ADIOS2File.cpp +++ b/src/IO/ADIOS/ADIOS2File.cpp @@ -428,8 +428,6 @@ void ADIOS2File::configure_IO() // these properties are inferred from the opened dataset in read mode if (writeOnly(m_mode)) { - -#if openPMD_HAS_ADIOS_2_9 if (!m_impl->m_useGroupTable.has_value()) { switch (m_impl->m_handler->m_encoding) @@ -456,15 +454,6 @@ void ADIOS2File::configure_IO() ? ADIOS2IOHandlerImpl::ModifiableAttributes::Yes : ADIOS2IOHandlerImpl::ModifiableAttributes::No; } -#else - if (!m_impl->m_useGroupTable.has_value()) - { - m_impl->m_useGroupTable = UseGroupTable::No; - } - - m_impl->m_modifiableAttributes = - ADIOS2IOHandlerImpl::ModifiableAttributes::No; -#endif } // set engine type @@ -764,9 +753,7 @@ adios2::Engine &ADIOS2File::getEngine() streamStatus = StreamStatus::DuringStep; break; } -#if openPMD_HAS_ADIOS_2_8 case adios2::Mode::ReadRandomAccess: -#endif case adios2::Mode::Read: { m_engine = std::make_optional(adios2::Engine(m_IO.Open(m_file, m_mode))); @@ -1320,9 +1307,7 @@ void ADIOS2File::markActive(Writable *writable) { case UseGroupTable::No: break; - case UseGroupTable::Yes: -#if openPMD_HAS_ADIOS_2_9 - { + case UseGroupTable::Yes: { if (writeOnly(m_mode) && m_impl->m_writeAttributesFromThisRank) { auto currentStepBuffered = currentStep(); @@ -1346,12 +1331,6 @@ void ADIOS2File::markActive(Writable *writable) m_pathsMarkedAsActive.end()); } } -#else - (void)writable; - throw error::OperationUnsupportedInBackend( - m_impl->m_handler->backendName(), - "Group table feature requires ADIOS2 >= v2.9."); -#endif break; } } diff --git a/src/IO/ADIOS/ADIOS2IOHandler.cpp b/src/IO/ADIOS/ADIOS2IOHandler.cpp index 0f1bbe3eeb..5bd3803446 100644 --- a/src/IO/ADIOS/ADIOS2IOHandler.cpp +++ b/src/IO/ADIOS/ADIOS2IOHandler.cpp @@ -293,21 +293,6 @@ void ADIOS2IOHandlerImpl::init( defaultOperators = std::move(operators.value()); } } -#if !openPMD_HAS_ADIOS_2_9 - if (m_modifiableAttributes == ModifiableAttributes::Yes) - { - throw error::OperationUnsupportedInBackend( - m_handler->backendName(), - "Modifiable attributes require ADIOS2 >= v2.9."); - } - if (m_useGroupTable.has_value() && - m_useGroupTable.value() == UseGroupTable::Yes) - { - throw error::OperationUnsupportedInBackend( - m_handler->backendName(), - "ADIOS2 group table feature requires ADIOS2 >= v2.9."); - } -#endif } std::optional> @@ -378,7 +363,7 @@ std::string ADIOS2IOHandlerImpl::fileSuffix(bool verbose) const { // SST engine adds its suffix unconditionally // so we don't add it -#if openPMD_HAVE_ADIOS2_BP5 && openPMD_HAS_ADIOS_2_9 +#if openPMD_HAVE_ADIOS2_BP5 constexpr char const *const default_file_ending = ".bp5"; #else constexpr char const *const default_file_ending = ".bp4"; @@ -661,12 +646,9 @@ void ADIOS2IOHandlerImpl::createFile( // print this warning only in the new layout (with group table) if (m_useGroupTable.value_or(UseGroupTable::No) == UseGroupTable::Yes && - (m_engineType == "bp5" -#if openPMD_HAS_ADIOS_2_9 - || (m_engineType == "file" || m_engineType == "filestream" || - m_engineType == "bp") -#endif - )) + (m_engineType == "bp5" || + (m_engineType == "file" || m_engineType == "filestream" || + m_engineType == "bp"))) { std::cerr << warningADIOS2NoGroupbasedEncoding << std::endl; printedWarningsAlready.noGroupBased = true; @@ -775,13 +757,7 @@ void ADIOS2IOHandlerImpl::createDataset( "[ADIOS2] Creating a dataset in a file opened as read " "only is not possible."); } -#if !openPMD_HAS_ADIOS_2_9 - if (parameters.joinedDimension.has_value()) - { - error::throwOperationUnsupportedInBackend( - "ADIOS2", "Joined Arrays require ADIOS2 >= v2.9"); - } -#endif + if (!writable->written) { /* Sanitize name */ @@ -1073,14 +1049,6 @@ void ADIOS2IOHandlerImpl::writeAttribute( { return; } -#if !openPMD_HAS_ADIOS_2_9 - if (parameters.changesOverSteps == - Parameter::ChangesOverSteps::Yes) - { - // cannot do this - return; - } -#endif switchType( parameters.dtype, this, writable, parameters); } @@ -1552,12 +1520,8 @@ adios2::Mode ADIOS2IOHandlerImpl::adios2AccessMode( constexpr std::array modeNames{ pair_t{"write", adios2::Mode::Write}, pair_t{"read", adios2::Mode::Read}, - pair_t{"append", adios2::Mode::Append} -#if openPMD_HAS_ADIOS_2_8 - , - pair_t{"readrandomaccess", adios2::Mode::ReadRandomAccess} -#endif - }; + pair_t{"append", adios2::Mode::Append}, + pair_t{"readrandomaccess", adios2::Mode::ReadRandomAccess}}; for (auto const &[name, mode] : modeNames) { if (name == access_mode_string) @@ -1589,7 +1553,6 @@ adios2::Mode ADIOS2IOHandlerImpl::adios2AccessMode( return adios2::Mode::Append; } break; -#if openPMD_HAS_ADIOS_2_8 case Access::READ_LINEAR: switch (m_handler->m_encoding) { @@ -1603,11 +1566,6 @@ adios2::Mode ADIOS2IOHandlerImpl::adios2AccessMode( break; case Access::READ_ONLY: return adios2::Mode::ReadRandomAccess; -#else - case Access::READ_LINEAR: - case Access::READ_ONLY: - return adios2::Mode::Read; -#endif case Access::READ_WRITE: if (auxiliary::directory_exists(fullPath) || auxiliary::file_exists(fullPath)) @@ -1622,11 +1580,7 @@ adios2::Mode ADIOS2IOHandlerImpl::adios2AccessMode( case adios_defs::OpenFileAs::Create: return adios2::Mode::Write; case adios_defs::OpenFileAs::Open: -#if openPMD_HAS_ADIOS_2_8 return adios2::Mode::ReadRandomAccess; -#else - return adios2::Mode::Read; -#endif case adios_defs::OpenFileAs::ReopenFileThatWeCreated: /* In order to write new data to an Iteration that was * created and closed previously, the only applicable access @@ -1921,12 +1875,10 @@ namespace detail adios2::IO IO = filedata.m_IO; impl->m_dirty.emplace(std::move(file)); -#if openPMD_HAS_ADIOS_2_9 if (impl->m_modifiableAttributes == ADIOS2IOHandlerImpl::ModifiableAttributes::No && parameters.changesOverSteps == Parameter::ChangesOverSteps::No) -#endif // we only support modifiable attrs for ADIOS2 >= 2.9, so no `if` { std::string t = IO.AttributeType(fullName); if (!t.empty()) // an attribute is present <=> it has a type @@ -1987,21 +1939,13 @@ namespace detail } auto &value = std::get(parameters.resource); -#if openPMD_HAS_ADIOS_2_9 bool modifiable = impl->m_modifiableAttributes == ADIOS2IOHandlerImpl::ModifiableAttributes::Yes || parameters.changesOverSteps != Parameter::ChangesOverSteps::No; -#else - bool modifiable = impl->m_modifiableAttributes == - ADIOS2IOHandlerImpl::ModifiableAttributes::Yes || - parameters.changesOverSteps == - Parameter::ChangesOverSteps::Yes; -#endif auto defineAttribute = [&IO, &fullName, &modifiable, &impl](auto const &...args) { -#if openPMD_HAS_ADIOS_2_9 (void)impl; auto attr = IO.DefineAttribute( fullName, @@ -2009,19 +1953,7 @@ namespace detail /* variableName = */ "", /* separator = */ "/", /* allowModification = */ modifiable); -#else - /* - * Defensive coding, normally this condition should be checked - * before getting this far. - */ - if (modifiable) - { - throw error::OperationUnsupportedInBackend( - impl->m_handler->backendName(), - "Modifiable attributes require ADIOS2 >= v2.8."); - } - auto attr = IO.DefineAttribute(fullName, args...); -#endif + if (!attr) { throw std::runtime_error( diff --git a/test/CoreTest.cpp b/test/CoreTest.cpp index 2c4a0b1680..3f88a18864 100644 --- a/test/CoreTest.cpp +++ b/test/CoreTest.cpp @@ -1200,7 +1200,7 @@ TEST_CASE("backend_via_json", "[core]") TEST_CASE("wildcard_extension", "[core]") { #if openPMD_HAVE_ADIOS2 -#if openPMD_HAVE_ADIOS2_BP5 && openPMD_HAS_ADIOS_2_9 +#if openPMD_HAVE_ADIOS2_BP5 constexpr char const *const default_file_ending = "bp5"; #else constexpr char const *const default_file_ending = "bp4"; diff --git a/test/Files_SerialIO/close_and_reopen_test.cpp b/test/Files_SerialIO/close_and_reopen_test.cpp index dcc1969ded..56be4a39f6 100644 --- a/test/Files_SerialIO/close_and_reopen_test.cpp +++ b/test/Files_SerialIO/close_and_reopen_test.cpp @@ -12,13 +12,8 @@ using namespace openPMD; #if openPMD_HAVE_ADIOS2 constexpr char const *write_cfg = -#if openPMD_HAS_ADIOS_2_9 R"(adios2.use_group_table = true adios2.modifiable_attributes = true)"; -#else - R"(adios2.use_group_table = false - adios2.modifiable_attributes = false)"; -#endif template auto run_test_filebased( @@ -65,16 +60,12 @@ auto run_test_filebased( E_x.storeChunk(data, {0}, {5}); it.close(); -#if !openPMD_HAS_ADIOS_2_8 if (series.backend() != "ADIOS2") { -#endif it.open(); it.setTimeUnitSI(2.0); it.close(); -#if !openPMD_HAS_ADIOS_2_8 } -#endif } series.close(); @@ -289,7 +280,6 @@ auto close_and_reopen_test() -> void * This test writes the same attribute with different values over steps, * triggering a bug in ADIOS2 v2.7. */ -#if openPMD_HAS_ADIOS_2_8 run_test_groupbased( [](Series &s) { return s.iterations; }, "bp4", @@ -309,7 +299,6 @@ auto close_and_reopen_test() -> void [](Series &s) { return s.snapshots(); }, "json", {Access::READ_RANDOM_ACCESS, Access::READ_LINEAR}); -#endif #if openPMD_HAVE_HDF5 run_test_groupbased( [](Series &s) { return s.snapshots(); }, diff --git a/test/ParallelIOTest.cpp b/test/ParallelIOTest.cpp index 519a8749b2..2d4cc6554e 100644 --- a/test/ParallelIOTest.cpp +++ b/test/ParallelIOTest.cpp @@ -1155,7 +1155,7 @@ TEST_CASE("hipace_like_write", "[parallel]") } #endif -#if openPMD_HAVE_ADIOS2 && openPMD_HAS_ADIOS_2_9 && openPMD_HAVE_MPI +#if openPMD_HAVE_ADIOS2 && openPMD_HAVE_MPI TEST_CASE("independent_write_with_collective_flush", "[parallel]") { Series write( @@ -1328,11 +1328,7 @@ doshuffle = "BLOSC_BITSHUFFLE" [adios2] unused = "parameter" attribute_writing_ranks = 0 -)END" -#if openPMD_HAS_ADIOS_2_9 - "use_group_table = true" -#endif - R"END( +use_group_table = true [adios2.engine] type = "bp4" unused = "as well" diff --git a/test/SerialIOTest.cpp b/test/SerialIOTest.cpp index 9c06ac0e3e..ab8c2ed15c 100644 --- a/test/SerialIOTest.cpp +++ b/test/SerialIOTest.cpp @@ -107,21 +107,12 @@ std::vector testedFileExtensions() allExtensions.begin(), allExtensions.end(), []([[maybe_unused]] std::string const &ext) { -#if openPMD_HAS_ADIOS_2_9 // sst and ssc need a receiver for testing // bp5 is already tested via bp // toml parsing is very slow and its implementation is equivalent to // the json backend, so it is only activated for selected tests return ext == "sst" || ext == "ssc" || ext == "bp5" || ext == "toml"; -#else - // toml parsing is very slow and its implementation is equivalent to - // the json backend, so it is only activated for selected tests - // sst and ssc need a receiver for testing - // bp4 is already tested via bp - return ext == "sst" || ext == "ssc" || ext == "bp4" || - ext == "toml"; -#endif }); return {allExtensions.begin(), newEnd}; } @@ -593,9 +584,7 @@ TEST_CASE("close_iteration_interleaved_test", "[serial]") // run this test for ADIOS2 & JSON only if (t == "h5") continue; -#if openPMD_HAS_ADIOS_2_9 close_iteration_interleaved_test(t, IterationEncoding::variableBased); -#endif // openPMD_HAS_ADIOS_2_9 } } @@ -5182,22 +5171,16 @@ void bp4_steps( TEST_CASE("bp4_steps", "[serial][adios2]") { - std::string bp4 = json::merge( - R"( + std::string bp4 = R"( { "ADIOS2": { + "use_group_table": true, "engine": { "type": "bp4" } } } - )", -#if openPMD_HAS_ADIOS_2_9 - R"({"ADIOS2":{"use_group_table": true}})" -#else - R"({"ADIOS2":{"use_group_table": false}})" -#endif - ); + )"; std::string nullcore = R"( { "adios2": { @@ -5211,17 +5194,8 @@ TEST_CASE("bp4_steps", "[serial][adios2]") bp4_steps("../samples/bp4steps_default.bp", "{}"); // Can use READ_LINEAR with ADIOS2 v2.9 because then we have the group table // feature and can sensibly parse group-based encoding in step-based mode - bp4_steps( - "../samples/bp4steps.bp", - bp4, -#if openPMD_HAS_ADIOS_2_9 - Access::READ_LINEAR -#else - Access::READ_ONLY -#endif - ); + bp4_steps("../samples/bp4steps.bp", bp4, Access::READ_LINEAR); -#if openPMD_HAS_ADIOS_2_9 /* * Do this whole thing once more, but this time use the new attribute * layout. @@ -5238,7 +5212,6 @@ TEST_CASE("bp4_steps", "[serial][adios2]") )"; bp4_steps("../samples/newlayout_bp4steps.bp", bp4, Access::READ_LINEAR); bp4_steps("../samples/newlayout_bp4steps.bp", bp4); -#endif } #endif @@ -5738,7 +5711,6 @@ TEST_CASE("git_adios2_sample_test", "[serial][adios2]") } } -#if openPMD_HAS_ADIOS_2_9 void adios2_group_table( std::string const &jsonWrite, std::string const &jsonRead, @@ -6102,10 +6074,7 @@ TEST_CASE("variableBasedParticleData", "[serial][adios2]") { variableBasedParticleData(); } -#endif // openPMD_HAS_ADIOS_2_9 -#endif // openPMD_HAS_ADIOS2 -#if openPMD_HAVE_ADIOS2 #ifdef ADIOS2_HAVE_BZIP2 TEST_CASE("automatically_deactivate_span", "[serial][adios2]") { @@ -6271,7 +6240,6 @@ TEST_CASE("automatically_deactivate_span", "[serial][adios2]") } } #endif -#endif // @todo Upon switching to ADIOS2 2.7.0, test this the other way around also void iterate_nonstreaming_series( @@ -6430,7 +6398,7 @@ TEST_CASE("iterate_nonstreaming_series", "[serial][adios2]") } #endif } -#if openPMD_HAVE_ADIOS2 && openPMD_HAS_ADIOS_2_9 +#if openPMD_HAVE_ADIOS2 iterate_nonstreaming_series( "../samples/iterate_nonstreaming_series_variablebased.bp", true, @@ -6832,7 +6800,6 @@ TEST_CASE("deferred_parsing", "[serial]") } } -#if openPMD_HAS_ADIOS_2_9 void chaotic_stream(std::string const &filename, bool variableBased) { /* @@ -6907,7 +6874,6 @@ TEST_CASE("chaotic_stream", "[serial]") chaotic_stream("../samples/chaotic_stream_vbased." + t, true); } } -#endif // openPMD_HAS_ADIOS_2_9 #ifdef openPMD_USE_INVASIVE_TESTS void unfinished_iteration_test( @@ -7030,7 +6996,6 @@ TEST_CASE("unfinished_iteration_test", "[serial]") IterationEncoding::groupBased, R"({"backend": "adios2"})", /* test_linear_access = */ false); -#if openPMD_HAS_ADIOS_2_9 unfinished_iteration_test( "bp5", IterationEncoding::variableBased, @@ -7043,7 +7008,6 @@ TEST_CASE("unfinished_iteration_test", "[serial]") } } )"); -#endif // openPMD_HAS_ADIOS_2_9 unfinished_iteration_test( "bp", IterationEncoding::fileBased, R"({"backend": "adios2"})"); #endif @@ -7480,7 +7444,6 @@ TEST_CASE("append_mode", "[serial]") ParseMode::LinearWithoutSnapshot, jsonConfigOld, /* test_read_linear = */ false); -#if openPMD_HAS_ADIOS_2_9 append_mode( "../samples/append/append_groupbased." + t, false, @@ -7497,7 +7460,6 @@ TEST_CASE("append_mode", "[serial]") true, ParseMode::WithSnapshot, jsonConfigNew); -#endif } else { @@ -7509,7 +7471,6 @@ TEST_CASE("append_mode", "[serial]") } } -#if openPMD_HAS_ADIOS_2_9 void append_mode_filebased(std::string const &extension) { std::string jsonConfig = R"END( diff --git a/test/python/unittest/API/APITest.py b/test/python/unittest/API/APITest.py index be1609d577..1566dcad06 100644 --- a/test/python/unittest/API/APITest.py +++ b/test/python/unittest/API/APITest.py @@ -367,7 +367,7 @@ def attributeRoundTrip(self, file_ending): np.testing.assert_almost_equal( series.get_attribute("nparr_cdouble"), [4.5 + 1.1j, 6.7 - 2.2j]) - # not in ADIOS 1.13.1 nor ADIOS 2.7.0 + # not in ADIOS2 if file_ending not in ["bp", "bp4", "bp5"]: np.testing.assert_almost_equal( series.get_attribute("nparr_clongdouble"),