Skip to content

Commit

Permalink
Fixes for ADIOS2 v2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Mar 5, 2024
1 parent 9e3741d commit 26e5a49
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/IO/ADIOS/ADIOS2IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,6 @@ adios2::Mode ADIOS2IOHandlerImpl::adios2AccessMode(
if (auxiliary::directory_exists(fullPath) ||
auxiliary::file_exists(fullPath))
{
#if openPMD_HAS_ADIOS_2_8
switch (m_handler->m_encoding)
{

Expand All @@ -1523,7 +1522,11 @@ 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::Reopen:
return adios2::Mode::Append;
}
Expand All @@ -1533,9 +1536,6 @@ adios2::Mode ADIOS2IOHandlerImpl::adios2AccessMode(
return adios2::Mode::Read;
}
break;
#else
return adios2::Mode::Read;
#endif
}
else
{
Expand Down
13 changes: 10 additions & 3 deletions test/Files_SerialIO/close_iteration_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,16 @@ auto run_test_filebased(
E_x.storeChunk(data, {0}, {5});
it.close();

it.open();
it.setTimeUnitSI(2.0);
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();

Expand Down

0 comments on commit 26e5a49

Please sign in to comment.