diff --git a/Singularity b/Singularity index fb26fdf3bb..f58b39a2d5 100644 --- a/Singularity +++ b/Singularity @@ -7,7 +7,7 @@ From: debian:unstable Welcome to the openPMD-api container. This container contains a pre-installed openPMD-api library. This container provides serial I/O. -Supported backends are HDF5 and ADIOS1. +Supported backends are HDF5 and ADIOS2. Supported frontends are C++11 and Python3. %setup @@ -25,7 +25,6 @@ Supported frontends are C++11 and Python3. ipython3 \ python3-dev \ pybind11-dev \ - libadios-bin libadios-dev \ libglib2.0-dev libbz2-dev libibverbs-dev libnetcdf-dev \ libhdf5-dev && \ rm -rf /var/lib/apt/lists/* @@ -33,16 +32,12 @@ Supported frontends are C++11 and Python3. # python3-numpy # missing: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900804 - # libadios-openmpi-dev # libopenmpi-dev libhdf5-openmpi-dev - # libadios2-dev - cd $(mktemp -d) cmake /opt/openpmd-api \ -DopenPMD_USE_MPI=OFF \ -DopenPMD_USE_HDF5=ON \ - -DopenPMD_USE_ADIOS1=ON \ -DopenPMD_USE_ADIOS2=OFF \ -DopenPMD_USE_PYTHON=ON \ -DopenPMD_BUILD_TESTING=OFF \ @@ -61,6 +56,5 @@ Supported frontends are C++11 and Python3. %labels openPMD_HAVE_MPI OFF openPMD_HAVE_HDF5 ON - openPMD_HAVE_ADIOS1 ON openPMD_HAVE_ADIOS2 OFF openPMD_HAVE_PYTHON ON diff --git a/docs/Doxyfile b/docs/Doxyfile index d1835b60ed..471c3cef28 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -1,7 +1,7 @@ PROJECT_NAME = "openPMD-api" XML_OUTPUT = xml INPUT = ../src ../include ../README.md -EXCLUDE_PATTERNS = *CommonADIOS1IOHandler.cpp +#EXCLUDE_PATTERNS = *CommonADIOS1IOHandler.cpp # TAGFILES += "cppreference-doxygen-web.tag.xml=http://en.cppreference.com/w/" BUILTIN_STL_SUPPORT = YES @@ -24,7 +24,6 @@ MACRO_EXPANSION = YES PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS \ openPMD_HAVE_MPI=1 \ openPMD_HAVE_HDF5=1 \ - openPMD_HAVE_ADIOS1=1 \ openPMD_HAVE_ADIOS2=1 \ openPMD_HAVE_PYTHON=1 \ OPENPMD_private:=private \ diff --git a/docs/source/analysis/paraview.rst b/docs/source/analysis/paraview.rst index 696f08bbb2..e0c837ca0a 100644 --- a/docs/source/analysis/paraview.rst +++ b/docs/source/analysis/paraview.rst @@ -22,7 +22,7 @@ openPMD ------- openPMD files can be visualized with ParaView 5.9+, using 5.11+ is recommended. -ParaView supports ADIOS1, ADIOS2 and HDF5 files, as it implements against the Python bindings of openPMD-api. +ParaView supports ADIOS2 and HDF5 files, as it implements against the Python bindings of openPMD-api. For openPMD output to be recognized, create a small textfile with ``.pmd`` ending per data series, which can be opened with ParaView: diff --git a/docs/source/dev/dependencies.rst b/docs/source/dev/dependencies.rst index 00629fc58a..8e0cda7b97 100644 --- a/docs/source/dev/dependencies.rst +++ b/docs/source/dev/dependencies.rst @@ -27,7 +27,6 @@ Optional: I/O backends * `JSON `_ * `HDF5 `_ 1.8.13+ -* `ADIOS1 `_ 1.13.1+ (deprecated) * `ADIOS2 `_ 2.7.0+ while those can be build either with or without: diff --git a/examples/8a_benchmark_write_parallel.cpp b/examples/8a_benchmark_write_parallel.cpp index c509c879ff..6219fbb549 100644 --- a/examples/8a_benchmark_write_parallel.cpp +++ b/examples/8a_benchmark_write_parallel.cpp @@ -240,8 +240,7 @@ std::vector getBackends() { std::vector res; #if openPMD_HAVE_ADIOS2 - if (auxiliary::getEnvString("OPENPMD_BP_BACKEND", "NOT_SET") != "ADIOS1") - res.emplace_back(".bp"); + res.emplace_back(".bp"); #endif #if openPMD_HAVE_HDF5 diff --git a/examples/8b_benchmark_read_parallel.cpp b/examples/8b_benchmark_read_parallel.cpp index 98cd81add2..0b5466eb13 100644 --- a/examples/8b_benchmark_read_parallel.cpp +++ b/examples/8b_benchmark_read_parallel.cpp @@ -198,8 +198,7 @@ std::vector getBackends() { std::vector res; #if openPMD_HAVE_ADIOS2 - if (auxiliary::getEnvString("OPENPMD_BP_BACKEND", "NOT_SET") != "ADIOS1") - res.emplace_back(".bp"); + res.emplace_back(".bp"); if (auxiliary::getEnvString("OPENPMD_BENCHMARK_USE_BACKEND", "NOT_SET") == "ADIOS") return res; diff --git a/openPMDConfig.cmake.in b/openPMDConfig.cmake.in index 28d3d5b9e0..3f6902e503 100644 --- a/openPMDConfig.cmake.in +++ b/openPMDConfig.cmake.in @@ -29,12 +29,6 @@ if(openPMD_HAVE_HDF5) endif() set(openPMD_HDF5_FOUND ${openPMD_HAVE_HDF5}) -set(openPMD_HAVE_ADIOS1 @openPMD_HAVE_ADIOS1@) -if(openPMD_HAVE_ADIOS1) - find_dependency(ADIOS) -endif() -set(openPMD_ADIOS1_FOUND ${openPMD_HAVE_ADIOS1}) - set(openPMD_HAVE_ADIOS2 @openPMD_HAVE_ADIOS2@) if(openPMD_HAVE_ADIOS2) find_dependency(ADIOS2) diff --git a/setup.py b/setup.py index 2053f1bd22..27e4cc4916 100644 --- a/setup.py +++ b/setup.py @@ -61,10 +61,8 @@ def build_extension(self, ext): # static/shared libs '-DopenPMD_BUILD_SHARED_LIBS:BOOL=' + BUILD_SHARED_LIBS, '-DHDF5_USE_STATIC_LIBRARIES:BOOL=' + HDF5_USE_STATIC_LIBRARIES, - '-DADIOS_USE_STATIC_LIBS:BOOL=' + ADIOS_USE_STATIC_LIBS, # Unix: rpath to current dir when packaged - # needed for shared (here non-default) builds and ADIOS1 - # wrapper libraries + # needed for shared (here non-default) builds '-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON', '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF', # Windows: has no RPath concept, all `.dll`s must be in %PATH% @@ -129,7 +127,6 @@ def build_extension(self, ext): # note: changed default for SHARED, MPI, TESTING and EXAMPLES openPMD_USE_MPI = os.environ.get('openPMD_USE_MPI', 'OFF') HDF5_USE_STATIC_LIBRARIES = os.environ.get('HDF5_USE_STATIC_LIBRARIES', 'OFF') -ADIOS_USE_STATIC_LIBS = os.environ.get('ADIOS_USE_STATIC_LIBS', 'OFF') # deprecated: backwards compatibility to <= 0.13.* BUILD_SHARED_LIBS = os.environ.get('BUILD_SHARED_LIBS', 'OFF') BUILD_TESTING = os.environ.get('BUILD_TESTING', 'OFF') diff --git a/test/SerialIOTest.cpp b/test/SerialIOTest.cpp index 52ee3c387a..7002d31162 100644 --- a/test/SerialIOTest.cpp +++ b/test/SerialIOTest.cpp @@ -420,7 +420,6 @@ void close_iteration_test(std::string const &file_ending) std::vector data{2, 4, 6, 8}; // { // we do *not* need these parentheses Series write(name, Access::CREATE); - bool isAdios1 = write.backend() == "ADIOS1"; { Iteration it0 = write.iterations[0]; auto E_x = it0.meshes["E"]["x"]; @@ -431,13 +430,6 @@ void close_iteration_test(std::string const &file_ending) write.flush(); // } - if (isAdios1) - { - // run a simplified test for Adios1 since Adios1 has issues opening - // twice in the same process - REQUIRE(auxiliary::file_exists("../samples/close_iterations_0.bp")); - } - else { Series read(name, Access::READ_ONLY); Iteration it0 = read.iterations[0]; @@ -463,13 +455,6 @@ void close_iteration_test(std::string const &file_ending) REQUIRE_THROWS(write.flush()); } - if (isAdios1) - { - // run a simplified test for Adios1 since Adios1 has issues opening - // twice in the same process - REQUIRE(auxiliary::file_exists("../samples/close_iterations_1.bp")); - } - else { Series read(name, Access::READ_ONLY); Iteration it1 = read.iterations[1]; @@ -1284,7 +1269,6 @@ inline void dtype_test(const std::string &backend) bool test_long_long = (backend != "json") || sizeof(long long) <= 8; { Series s = Series("../samples/dtype_test." + backend, Access::CREATE); - bool adios1 = s.backend() == "ADIOS1" || s.backend() == "MPI_ADIOS1"; char c = 'c'; s.setAttribute("char", c); @@ -1315,10 +1299,7 @@ inline void dtype_test(const std::string &backend) } std::string str = "string"; s.setAttribute("string", str); - if (!adios1) - { - s.setAttribute("emptyString", ""); - } + s.setAttribute("emptyString", ""); s.setAttribute("vecChar", std::vector({'c', 'h', 'a', 'r'})); s.setAttribute("vecInt16", std::vector({32766, 32767})); s.setAttribute( @@ -1348,13 +1329,9 @@ inline void dtype_test(const std::string &backend) } s.setAttribute( "vecString", std::vector({"vector", "of", "strings"})); - if (!adios1) - { - s.setAttribute( - "vecEmptyString", std::vector{"", "", ""}); - s.setAttribute( - "vecMixedString", std::vector{"hi", "", "ho"}); - } + s.setAttribute("vecEmptyString", std::vector{"", "", ""}); + s.setAttribute( + "vecMixedString", std::vector{"hi", "", "ho"}); s.setAttribute("bool", true); s.setAttribute("boolF", false); @@ -1414,7 +1391,6 @@ inline void dtype_test(const std::string &backend) } Series s = Series("../samples/dtype_test." + backend, Access::READ_ONLY); - bool adios1 = s.backend() == "ADIOS1" || s.backend() == "MPI_ADIOS1"; REQUIRE(s.getAttribute("char").get() == 'c'); REQUIRE(s.getAttribute("uchar").get() == 'u'); @@ -1432,10 +1408,7 @@ inline void dtype_test(const std::string &backend) REQUIRE(s.getAttribute("longdouble").get() == 1.e80L); } REQUIRE(s.getAttribute("string").get() == "string"); - if (!adios1) - { - REQUIRE(s.getAttribute("emptyString").get().empty()); - } + REQUIRE(s.getAttribute("emptyString").get().empty()); REQUIRE( s.getAttribute("vecChar").get>() == std::vector({'c', 'h', 'a', 'r'})); @@ -1479,15 +1452,12 @@ inline void dtype_test(const std::string &backend) REQUIRE( s.getAttribute("vecString").get>() == std::vector({"vector", "of", "strings"})); - if (!adios1) - { - REQUIRE( - s.getAttribute("vecEmptyString").get>() == - std::vector({"", "", ""})); - REQUIRE( - s.getAttribute("vecMixedString").get>() == - std::vector({"hi", "", "ho"})); - } + REQUIRE( + s.getAttribute("vecEmptyString").get>() == + std::vector({"", "", ""})); + REQUIRE( + s.getAttribute("vecMixedString").get>() == + std::vector({"hi", "", "ho"})); REQUIRE(s.getAttribute("bool").get() == true); REQUIRE(s.getAttribute("boolF").get() == false); @@ -1691,8 +1661,7 @@ void test_complex(const std::string &backend) "../samples/serial_write_complex." + backend, Access::CREATE); o.setAttribute("lifeIsComplex", std::complex(4.56, 7.89)); o.setAttribute("butComplexFloats", std::complex(42.3, -99.3)); - if (o.backend() != "ADIOS2" && o.backend() != "ADIOS1" && - o.backend() != "MPI_ADIOS1") + if (o.backend() != "ADIOS2") o.setAttribute( "longDoublesYouSay", std::complex(5.5, -4.55)); @@ -1713,8 +1682,7 @@ void test_complex(const std::string &backend) Cdbl.storeChunk(cdoubles, {0}); std::vector> cldoubles(3); - if (o.backend() != "ADIOS2" && o.backend() != "ADIOS1" && - o.backend() != "MPI_ADIOS1") + if (o.backend() != "ADIOS2") { auto Cldbl = o.iterations[0].meshes["Cldbl"][RecordComponent::SCALAR]; @@ -1738,8 +1706,7 @@ void test_complex(const std::string &backend) REQUIRE( i.getAttribute("butComplexFloats").get>() == std::complex(42.3, -99.3)); - if (i.backend() != "ADIOS2" && i.backend() != "ADIOS1" && - i.backend() != "MPI_ADIOS1") + if (i.backend() != "ADIOS2") { REQUIRE( i.getAttribute("longDoublesYouSay") @@ -1758,8 +1725,7 @@ void test_complex(const std::string &backend) REQUIRE(rcflt.get()[1] == std::complex(-3., 4.)); REQUIRE(rcdbl.get()[2] == std::complex(6, -5.)); - if (i.backend() != "ADIOS2" && i.backend() != "ADIOS1" && - i.backend() != "MPI_ADIOS1") + if (i.backend() != "ADIOS2") { auto rcldbl = i.iterations[0] .meshes["Cldbl"][RecordComponent::SCALAR] @@ -1779,7 +1745,7 @@ void test_complex(const std::string &backend) TEST_CASE("test_complex", "[serial]") { // Notes: - // - ADIOS1 and ADIOS 2.7.0 have no complex long double + // - ADIOS 2.7.0 has no complex long double // - JSON read-back not distinguishable yet from N+1 shaped data set for (auto const &t : testedFileExtensions()) { @@ -2407,7 +2373,7 @@ TEST_CASE("deletion_test", "[serial]") { if (t == "bp" || t == "bp4" || t == "bp5") { - continue; // deletion not implemented in ADIOS1 backend + continue; // deletion not implemented in ADIOS2 backend } deletion_test(t); } @@ -3894,12 +3860,12 @@ TEST_CASE("no_serial_hdf5", "[serial][hdf5]") REQUIRE(true); } #endif -#if openPMD_HAVE_ADIOS1 +#if openPMD_HAVE_ADIOS2 -TEST_CASE("hzdr_adios1_sample_content_test", "[serial][adios1]") +TEST_CASE("hzdr_bp3_sample_content_test", "[serial][adios2][bp3]") { // since this file might not be publicly available, gracefully handle errors - /** @todo add bp example files to + /** @todo add bp3 example files to * https://github.com/openPMD/openPMD-example-datasets */ try { @@ -4070,108 +4036,6 @@ TEST_CASE("hzdr_adios1_sample_content_test", "[serial][adios1]") } } } - -#else -TEST_CASE("no_serial_adios1", "[serial][adios]") -{ - REQUIRE(true); -} -#endif - -#if openPMD_HAVE_ADIOS1 -TEST_CASE("serial_adios1_json_config", "[serial][adios1]") -{ - std::string globalConfig = R"END( -{ - "backend": "adios1", - "adios1": { - "dataset": { - "transform": "deliberately use a wrong configuration..." - } - } -})END"; - - std::string globalConfigWithoutCompression = R"END( -{ - "backend": "adios1" -})END"; - - std::string localConfig = R"END( -{ - "adios1": { - "dataset": { - "transform": "...so we can check for the resulting errors" - } - } -})END"; - - auto test1 = [&]() { - Series write( - "../samples/adios1_dataset_transform.bp", - Access::CREATE, - globalConfig); - auto meshes = write.writeIterations()[0].meshes; - - auto defaultConfiguredMesh = - meshes["defaultConfigured"][RecordComponent::SCALAR]; - - Dataset ds{Datatype::INT, {10}}; - - defaultConfiguredMesh.resetDataset(ds); - - std::vector data(10, 2345); - defaultConfiguredMesh.storeChunk(data, {0}, {10}); - - write.flush(); - }; - REQUIRE_THROWS_WITH( - test1(), - Catch::Equals("[ADIOS1] Internal error: Failed to set ADIOS transform " - "during Dataset creation")); - - auto test2 = [&]() { - Series write( - "../samples/adios1_dataset_transform.bp", - Access::CREATE, - globalConfig); - auto meshes = write.writeIterations()[0].meshes; - auto overridenTransformMesh = - meshes["overridenConfig"][RecordComponent::SCALAR]; - - Dataset ds{Datatype::INT, {10}}; - ds.options = localConfig; - overridenTransformMesh.resetDataset(ds); - - std::vector data(10, 2345); - overridenTransformMesh.storeChunk(data, {0}, {10}); - - write.flush(); - }; - REQUIRE_THROWS_WITH( - test2(), - Catch::Equals("[ADIOS1] Internal error: Failed to set ADIOS transform " - "during Dataset creation")); - - auto test3 = [&]() { - // use no dataset transform at all - Series write( - "../samples/adios1_dataset_transform.bp", - Access::CREATE, - globalConfigWithoutCompression); - auto meshes = write.writeIterations()[0].meshes; - auto defaultConfiguredMesh = - meshes["defaultConfigured"][RecordComponent::SCALAR]; - - Dataset ds{Datatype::INT, {10}}; - defaultConfiguredMesh.resetDataset(ds); - - std::vector data(10, 2345); - defaultConfiguredMesh.storeChunk(data, {0}, {10}); - - write.flush(); - }; - test3(); // should run without exception -} #endif #if openPMD_HAVE_ADIOS2 @@ -6791,17 +6655,6 @@ TEST_CASE("unfinished_iteration_test", "[serial]") unfinished_iteration_test( "bp", IterationEncoding::fileBased, R"({"backend": "adios2"})"); #endif -#if openPMD_HAVE_ADIOS1 - /* - * Catching errors from ADIOS1 is not generally supported - */ - // unfinished_iteration_test( - // "adios1.bp", IterationEncoding::groupBased, R"({"backend": - // "adios1"})"); - // unfinished_iteration_test( - // "adios1.bp", IterationEncoding::fileBased, R"({"backend": - // "adios1"})"); -#endif #if openPMD_HAVE_HDF5 unfinished_iteration_test("h5", IterationEncoding::groupBased); unfinished_iteration_test("h5", IterationEncoding::fileBased); @@ -6984,16 +6837,6 @@ void append_mode( { write.setIterationEncoding(IterationEncoding::variableBased); } - if (write.backend() == "ADIOS1") - { - REQUIRE_THROWS_WITH( - write.flush(), - Catch::Equals( - "Operation unsupported in ADIOS1: Appending to existing " - "file on disk (use Access::CREATE to overwrite)")); - // destructor will be noisy now - return; - } writeSomeIterations( write.writeIterations(), std::vector{3, 2}); @@ -7012,16 +6855,6 @@ void append_mode( { write.setIterationEncoding(IterationEncoding::variableBased); } - if (write.backend() == "ADIOS1") - { - REQUIRE_THROWS_WITH( - write.flush(), - Catch::Equals( - "Operation unsupported in ADIOS1: Appending to existing " - "file on disk (use Access::CREATE to overwrite)")); - // destructor will be noisy now - return; - } writeSomeIterations( write.writeIterations(), std::vector{4, 3, 10}); @@ -7033,13 +6866,6 @@ void append_mode( { write.setIterationEncoding(IterationEncoding::variableBased); } - if (write.backend() == "ADIOS1") - { - REQUIRE_THROWS_AS( - write.flush(), error::OperationUnsupportedInBackend); - // destructor will be noisy now - return; - } writeSomeIterations( write.writeIterations(), std::vector{7, 1, 11}); @@ -7172,17 +6998,6 @@ void append_mode( { write.setIterationEncoding(IterationEncoding::variableBased); } - if (write.backend() == "ADIOS1") - { - REQUIRE_THROWS_WITH( - write.flush(), - Catch::Equals( - "Operation unsupported in ADIOS1: Appending to " - "existing " - "file on disk (use Access::CREATE to overwrite)")); - // destructor will be noisy now - return; - } writeSomeIterations( write.writeIterations(), std::vector{4, 5});