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 eea485f2b8..3f6902e503 100644 --- a/openPMDConfig.cmake.in +++ b/openPMDConfig.cmake.in @@ -8,7 +8,7 @@ if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() -# locate the installed FindADIOS.cmake module for ADIOS1 +# locate the installed CMake modules list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/Modules") # optional dependencies @@ -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/share/openPMD/cmake/FindADIOS.cmake b/share/openPMD/cmake/FindADIOS.cmake deleted file mode 100644 index a7fc253a91..0000000000 --- a/share/openPMD/cmake/FindADIOS.cmake +++ /dev/null @@ -1,311 +0,0 @@ -# - Find ADIOS library, routines for scientific, parallel IO -# https://www.olcf.ornl.gov/center-projects/adios/ -# -# Use this module by invoking find_package with the form: -# find_package(ADIOS -# [version] [EXACT] # Minimum or EXACT version, e.g. 1.6.0 -# [REQUIRED] # Fail with an error if ADIOS or a required -# # component is not found -# [QUIET] # ... -# [COMPONENTS <...>] # Compiled in components: fortran, readonly, -# # sequential (all are case-insensitive) -# ) -# -# Module that finds the includes and libraries for a working ADIOS install. -# This module invokes the `adios_config` script that should be installed with -# the other ADIOS tools. -# -# To provide a hint to the module where to find the ADIOS installation, -# set the ADIOS_ROOT environment variable. -# -# If this variable is not set, make sure that at least the according `bin/` -# directory of ADIOS is in your PATH environment variable. -# -# Set the following CMake variables BEFORE calling find_packages to -# influence this module: -# ADIOS_USE_STATIC_LIBS - Set to ON to force the use of static -# libraries. Default: OFF -# -# This module will define the following variables: -# ADIOS_INCLUDE_DIRS - Include directories for the ADIOS headers. -# ADIOS_LIBRARIES - ADIOS libraries. -# ADIOS_DEFINITIONS - ADIOS compile definitions. -# ADIOS_FOUND - TRUE if FindADIOS found a working install -# ADIOS_VERSION - Version in format Major.Minor.Patch -# ADIOS_HAVE_SEQUENTIAL - TRUE if found library links as sequential only -# -# Not used for now: -# ADIOS_DEFINITIONS - Compiler definitions you should add with -# add_definitions(${ADIOS_DEFINITIONS}) -# -# Example to find ADIOS (default) -# find_package(ADIOS) -# if(ADIOS_FOUND) -# include_directories(${ADIOS_INCLUDE_DIRS}) -# add_executable(foo foo.c) -# target_link_libraries(foo ${ADIOS_LIBRARIES}) -# endif() - -# Example to find ADIOS using component -# find_package(ADIOS COMPONENTS fortran) -# if(ADIOS_FOUND) -# include_directories(${ADIOS_INCLUDE_DIRS}) -# add_executable(foo foo.c) -# target_link_libraries(foo ${ADIOS_LIBRARIES}) -# endif() -############################################################################### -#Copyright (c) 2014-2020, Axel Huebl and Felix Schmitt from http://picongpu.hzdr.de -#All rights reserved. - -#Redistribution and use in source and binary forms, with or without -#modification, are permitted provided that the following conditions are met: - -#1. Redistributions of source code must retain the above copyright notice, this -#list of conditions and the following disclaimer. - -#2. Redistributions in binary form must reproduce the above copyright notice, -#this list of conditions and the following disclaimer in the documentation -#and/or other materials provided with the distribution. - -#3. Neither the name of the copyright holder nor the names of its contributors -#may be used to endorse or promote products derived from this software without -#specific prior written permission. - -#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -#AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -#IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -#DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -#FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -#DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -#SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -#OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -#OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -############################################################################### - - -############################################################################### -# Required cmake version -############################################################################### - -cmake_minimum_required(VERSION 3.5) - - -############################################################################### -# ADIOS -############################################################################### -# get flags for adios_config, -l is the default -#-f for fortran, -r for readonly, -s for sequential (nompi) -set(OPTLIST "") -if(ADIOS_FIND_COMPONENTS) - foreach(COMP ${ADIOS_FIND_COMPONENTS}) - string(TOLOWER ${COMP} comp) - if(comp STREQUAL "fortran") - set(OPTLIST "${OPTLIST}f") - elseif(comp STREQUAL "readonly") - set(OPTLIST "${OPTLIST}r") - elseif(comp STREQUAL "sequential") - set(OPTLIST "${OPTLIST}s") - else() - if(NOT ADIOS_FIND_QUIETLY) - message("ADIOS component ${COMP} is not supported. Please use fortran, readonly, or sequential") - endif() - endif() - endforeach() -endif() -set(LINKOPTLIST "-l${OPTLIST}") -set(COMPILEOPTLIST "-c${OPTLIST}") - -# we start by assuming we found ADIOS and falsify it if some -# dependencies are missing (or if we did not find ADIOS at all) -set(ADIOS_FOUND TRUE) - - -# find `adios_config` program ################################################# -# check the ADIOS_ROOT hint and the normal PATH -find_file(ADIOS_CONFIG - NAME adios_config - PATHS $ENV{ADIOS_ROOT}/bin $ENV{ADIOS_DIR}/bin $ENV{INSTALL_PREFIX}/bin $ENV{PATH}) - -if(ADIOS_CONFIG) - if(NOT ADIOS_FIND_QUIETLY) - message(STATUS "Found 'adios_config': ${ADIOS_CONFIG}") - endif() -else(ADIOS_CONFIG) - set(ADIOS_FOUND FALSE) - if(NOT ADIOS_FIND_QUIETLY) - message(STATUS "Can NOT find 'adios_config' - set ADIOS_ROOT, ADIOS_DIR or INSTALL_PREFIX, or check your PATH") - endif() -endif(ADIOS_CONFIG) - -# check `adios_config` program ################################################ -if(ADIOS_FOUND) - execute_process(COMMAND ${ADIOS_CONFIG} ${LINKOPTLIST} - OUTPUT_VARIABLE ADIOS_LINKFLAGS - RESULT_VARIABLE ADIOS_CONFIG_RETURN - OUTPUT_STRIP_TRAILING_WHITESPACE) - if(NOT ADIOS_CONFIG_RETURN EQUAL 0) - set(ADIOS_FOUND FALSE) - if(NOT ADIOS_FIND_QUIETLY) - message(STATUS "Can NOT execute 'adios_config' - check file permissions") - endif() - endif() - - execute_process(COMMAND ${ADIOS_CONFIG} ${COMPILEOPTLIST} - OUTPUT_VARIABLE ADIOS_COMPILEFLAGS - RESULT_VARIABLE ADIOS_CONFIG_RETURN - OUTPUT_STRIP_TRAILING_WHITESPACE) - if(NOT ADIOS_CONFIG_RETURN EQUAL 0) - set(ADIOS_FOUND FALSE) - if(NOT ADIOS_FIND_QUIETLY) - message(STATUS "Can NOT execute 'adios_config' - check file permissions") - endif() - endif() - - # find ADIOS_ROOT_DIR - execute_process(COMMAND ${ADIOS_CONFIG} -d - OUTPUT_VARIABLE ADIOS_ROOT_DIR - OUTPUT_STRIP_TRAILING_WHITESPACE) - if(NOT IS_DIRECTORY "${ADIOS_ROOT_DIR}") - set(ADIOS_FOUND FALSE) - if(NOT ADIOS_FIND_QUIETLY) - message(STATUS "The directory provided by 'adios_config -d' does not exist: ${ADIOS_ROOT_DIR}") - endif() - endif() -endif(ADIOS_FOUND) - -# option: use only static libs ################################################ -if(ADIOS_USE_STATIC_LIBS) - # careful, we have to restore the original path in the end - set(_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX}) -endif() - - -# we found something in ADIOS_ROOT_DIR and adios_config works ################# -set(ADIOS_INCLUDE_DIRS) -set(ADIOS_DEFINITIONS) -set(ADIOS_LIBRARIES) -if(ADIOS_FOUND) - # ADIOS headers - list(APPEND ADIOS_INCLUDE_DIRS ${ADIOS_ROOT_DIR}/include) - - # check for compiled in dependencies, recomve ";" in ADIOS_LINKFLAGS (from cmake build) - string(REGEX REPLACE ";" " " ADIOS_LINKFLAGS "${ADIOS_LINKFLAGS}") - string(REGEX REPLACE ";" " " ADIOS_COMPILEFLAGS "${ADIOS_COMPILEFLAGS}") - if(NOT ADIOS_FIND_QUIETLY) - message(STATUS "ADIOS linker flags (unparsed): ${ADIOS_LINKFLAGS}") - message(STATUS "ADIOS compiler flags (unparsed): ${ADIOS_COMPILEFLAGS}") - endif() - - # find all library paths -L - # note: this can cause trouble if some libs are specified twice from - # different sources (quite unlikely) - # http://www.cmake.org/pipermail/cmake/2008-November/025128.html - set(ADIOS_LIBRARY_DIRS) - string(REGEX MATCHALL " -L([A-Za-z_0-9/\\.-]+)" _ADIOS_LIBDIRS " ${ADIOS_LINKFLAGS}") - foreach(_LIBDIR ${_ADIOS_LIBDIRS}) - string(REPLACE " -L" "" _LIBDIR ${_LIBDIR}) - list(APPEND ADIOS_LIBRARY_DIRS ${_LIBDIR}) - endforeach() - # we could append ${CMAKE_PREFIX_PATH} now but that is not really necessary - - # determine whether found library links as serial only - set(ADIOS_HAVE_SEQUENTIAL FALSE) - - if(NOT ADIOS_FIND_QUIETLY) - message(STATUS "ADIOS DIRS to look for libs: ${ADIOS_LIBRARY_DIRS}") - endif() - - # parse all -lname libraries and find an absolute path for them - string(REGEX MATCHALL " -l([A-Za-z_0-9\\.\\-\\+]+)" _ADIOS_LIBS " ${ADIOS_LINKFLAGS}") - foreach(_LIB ${_ADIOS_LIBS}) - string(REPLACE " -l" "" _LIB ${_LIB}) - - # find static lib: absolute path in -L then default - if(_LIB MATCHES "^glib") - find_library(_LIB_DIR NAMES ${_LIB} PATHS ${ADIOS_LIBRARY_DIRS} NAMES glib-2.0) - else() - find_library(_LIB_DIR NAMES ${_LIB} PATHS ${ADIOS_LIBRARY_DIRS}) - endif() - - # pthread should not be linked statically, allow fallback to shared - if(NOT _LIB_DIR AND _LIB MATCHES "pthread|m|rt") - if(ADIOS_USE_STATIC_LIBS) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) - find_library(_LIB_DIR NAMES ${_LIB} PATHS ${ADIOS_LIBRARY_DIRS}) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX}) - endif() - endif() - - if(_LIB MATCHES "^.*nompi.*$") - set(ADIOS_HAVE_SEQUENTIAL TRUE) - endif() - - # found? - if(_LIB_DIR) - if(NOT ADIOS_FIND_QUIETLY) - message(STATUS "Found ${_LIB} in ${_LIB_DIR}") - endif() - list(APPEND ADIOS_LIBRARIES "${_LIB_DIR}") - else(_LIB_DIR) - set(ADIOS_FOUND FALSE) - if(NOT ADIOS_FIND_QUIETLY) - message(STATUS "ADIOS: Could NOT find library '${_LIB}'") - endif() - endif(_LIB_DIR) - - # clean cached var - unset(_LIB_DIR CACHE) - unset(_LIB_DIR) - endforeach() - - #add libraries which are already using cmake format - string(REGEX MATCHALL "/([A-Za-z_0-9/\\.\\-\\+]+)\\.([a|so]+)" _ADIOS_LIBS_SUB "${ADIOS_LINKFLAGS}") - foreach(foo ${_ADIOS_LIBS_SUB}) - if (EXISTS ${foo}) - if(NOT ADIOS_FIND_QUIETLY) - message("Appending: ${foo}") - endif() - list(APPEND ADIOS_LIBRARIES "${foo}") - endif() - endforeach(foo) - - # find all compiler definitions _D - string(REGEX MATCHALL "(-D[A-Za-z_0-9/\\.-]+)" _ADIOS_DEFINES " ${ADIOS_COMPILEFLAGS}") - string(REGEX REPLACE ";" " " ADIOS_DEFINITIONS "${_ADIOS_DEFINES}") - - if(NOT ADIOS_FIND_QUIETLY) - message(STATUS "ADIOS compile definitions: ${ADIOS_DEFINITIONS}") - endif() - - # add the version string - execute_process(COMMAND ${ADIOS_CONFIG} -v - OUTPUT_VARIABLE ADIOS_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE) -endif(ADIOS_FOUND) - -# unset checked variables if not found -if(NOT ADIOS_FOUND) - unset(ADIOS_INCLUDE_DIRS) - unset(ADIOS_LIBRARIES) -endif(NOT ADIOS_FOUND) - - -# restore CMAKE_FIND_LIBRARY_SUFFIXES if manipulated by this module ########### -if(ADIOS_USE_STATIC_LIBS) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) -endif() - - -############################################################################### -# FindPackage Options -############################################################################### - -# handles the REQUIRED, QUIET and version-related arguments for find_package -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(ADIOS - FOUND_VAR ADIOS_FOUND - REQUIRED_VARS ADIOS_LIBRARIES ADIOS_INCLUDE_DIRS - VERSION_VAR ADIOS_VERSION -) 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});