From 80728d0c889ff4f64045808818c3687ed2ee81e7 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Sun, 3 Jan 2021 14:37:52 -0800 Subject: [PATCH 1/2] Fix ADIOS1: Iteration::open() Prepare the support for `Iteration::open()` for following non-collective, parallel reads for ADIOS1. --- test/ParallelIOTest.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/ParallelIOTest.cpp b/test/ParallelIOTest.cpp index 55cd473f0e..094e2a0bee 100644 --- a/test/ParallelIOTest.cpp +++ b/test/ParallelIOTest.cpp @@ -626,8 +626,7 @@ file_based_write_read( std::string file_ending ) Series read( name, Access::READ_ONLY, MPI_COMM_WORLD ); Iteration it = read.iterations[ 30 ]; it.open(); // collective - bool isAdios1 = read.backend() == "MPI_ADIOS1"; // FIXME: this is an ADIOS1 backend bug - if( mpi_rank == 0 || isAdios1 ) // non-collective branch (unless ADIOS1) + if( mpi_rank == 0 ) // non-collective branch { auto E_x = it.meshes["E"]["x"]; auto data = E_x.loadChunk< double >(); From 431947e28cad750e09837f055c1938949c01e3ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Mon, 4 Jan 2021 12:04:05 +0100 Subject: [PATCH 2/2] Fix ADIOS1 file opening --- src/IO/ADIOS/CommonADIOS1IOHandler.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/IO/ADIOS/CommonADIOS1IOHandler.cpp b/src/IO/ADIOS/CommonADIOS1IOHandler.cpp index 5d7b65d9cf..2eb0576e16 100644 --- a/src/IO/ADIOS/CommonADIOS1IOHandler.cpp +++ b/src/IO/ADIOS/CommonADIOS1IOHandler.cpp @@ -557,12 +557,15 @@ CommonADIOS1IOHandlerImpl::openFile(Writable* writable, if( m_groups.find(filePath) == m_groups.end() ) m_groups[filePath] = initialize_group(name); - ADIOS_FILE* f = open_read(name); + if( m_openReadFileHandles.find(filePath) == m_openReadFileHandles.end() ) + { + ADIOS_FILE* f = open_read(name); + m_openReadFileHandles[filePath] = f; + } writable->written = true; writable->abstractFilePosition = std::make_shared< ADIOS1FilePosition >("/"); - m_openReadFileHandles[filePath] = f; m_filePaths[writable] = filePath; m_existsOnDisk[filePath] = true; }