diff --git a/src/IO/ADIOS/ADIOS2IOHandler.cpp b/src/IO/ADIOS/ADIOS2IOHandler.cpp index 7175d48cb8..40bbf562a5 100644 --- a/src/IO/ADIOS/ADIOS2IOHandler.cpp +++ b/src/IO/ADIOS/ADIOS2IOHandler.cpp @@ -342,17 +342,32 @@ std::string ADIOS2IOHandlerImpl::fileSuffix(bool verbose) const { // SST engine adds its suffix unconditionally // so we don't add it +#if defined(ADIOS2_HAVE_BP5) && openPMD_HAS_ADIOS_2_9 + constexpr char const *const default_file_ending = ".bp5"; +#else + constexpr char const *const default_file_ending = ".bp4"; +#endif + static std::map const endings{ - {"sst", {{"", ""}, {".sst", ""}}}, - {"staging", {{"", ""}, {".sst", ""}}}, - {"filestream", {{".bp", ".bp"}, {".bp4", ".bp4"}, {".bp5", ".bp5"}}}, - {"bp4", {{".bp4", ".bp4"}, {".bp", ".bp"}}}, - {"bp5", {{".bp5", ".bp5"}, {".bp", ".bp"}}}, - {"bp3", {{".bp", ".bp"}}}, - {"file", {{".bp", ".bp"}, {".bp4", ".bp4"}, {".bp5", ".bp5"}}}, - {"hdf5", {{".h5", ".h5"}}}, - {"nullcore", {{".nullcore", ".nullcore"}, {".bp", ".bp"}}}, - {"ssc", {{".ssc", ".ssc"}}}}; + {"sst", {{"", ""}, {".sst", ""}, {".%E", ""}}}, + {"staging", {{"", ""}, {".sst", ""}, {".%E", ""}}}, + {"filestream", + {{".bp", ".bp"}, + {".bp4", ".bp4"}, + {".bp5", ".bp5"}, + {".%E", default_file_ending}}}, + {"bp4", {{".bp4", ".bp4"}, {".bp", ".bp"}, {".%E", ".bp4"}}}, + {"bp5", {{".bp5", ".bp5"}, {".bp", ".bp"}, {".%E", ".bp5"}}}, + {"bp3", {{".bp", ".bp"}, {".%E", ".bp"}}}, + {"file", + {{".bp", ".bp"}, + {".bp4", ".bp4"}, + {".bp5", ".bp5"}, + {".%E", default_file_ending}}}, + {"hdf5", {{".h5", ".h5"}, {".%E", ".h5"}}}, + {"nullcore", + {{".nullcore", ".nullcore"}, {".bp", ".bp"}, {".%E", ".nullcore"}}}, + {"ssc", {{".ssc", ".ssc"}, {".%E", ".ssc"}}}}; if (auto engine = endings.find(m_engineType); engine != endings.end()) { diff --git a/src/Series.cpp b/src/Series.cpp index ff3a19bea5..97b0f46e28 100644 --- a/src/Series.cpp +++ b/src/Series.cpp @@ -738,6 +738,12 @@ auto Series::initIOHandler( "Unable to automatically determine filename extension. Please " "specify in some way."); } + else if (input->format == Format::ADIOS2_BP) + { + // Since ADIOS2 has multiple extensions depending on the engine, + // we need to pass this job on to the backend + input->filenameExtension = ".%E"; + } else { input->filenameExtension = suffix(input->format);