From 66f15aa473f365ee8eed877a2e7b5c1fe3f24590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Fri, 21 Jun 2024 14:00:16 +0200 Subject: [PATCH] Guard against ADIOS2 v2.7 --- src/IO/ADIOS/ADIOS2IOHandler.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/IO/ADIOS/ADIOS2IOHandler.cpp b/src/IO/ADIOS/ADIOS2IOHandler.cpp index 0c7d316198..d6e46a5917 100644 --- a/src/IO/ADIOS/ADIOS2IOHandler.cpp +++ b/src/IO/ADIOS/ADIOS2IOHandler.cpp @@ -1512,8 +1512,12 @@ adios2::Mode ADIOS2IOHandlerImpl::adios2AccessMode(std::string const &fullPath) constexpr std::array modeNames{ pair_t{"write", adios2::Mode::Write}, pair_t{"read", adios2::Mode::Read}, - pair_t{"append", adios2::Mode::Append}, - pair_t{"readrandomaccess", adios2::Mode::ReadRandomAccess}}; + pair_t{"append", adios2::Mode::Append} +#if openPMD_HAS_ADIOS_2_8 + , + pair_t{"readrandomaccess", adios2::Mode::ReadRandomAccess} +#endif + }; for (auto const &[name, mode] : modeNames) { if (name == access_mode_string)