From e237f38542b888707511450c199d55dae1d739dd Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Jan 2025 10:11:57 +0100 Subject: [PATCH 001/372] Add PDI deactivation option through CMake --- .github/pull_request_template.md | 3 +- AUTHORS | 3 + CHANGELOG.md | 2 + no-pdi/CMakeLists.txt | 422 +++++++++++++++++++++++++++++ no-pdi/exampleTargetCMakeLists.txt | 184 +++++++++++++ no-pdi/include/pdi.h | 309 +++++++++++++++++++++ no-pdi/scripts/env.sh.in | 87 ++++++ no-pdi/scripts/env.xsh | 41 +++ pdi/docs/Using_PDI.md | 5 + 9 files changed, 1055 insertions(+), 1 deletion(-) create mode 100644 no-pdi/CMakeLists.txt create mode 100644 no-pdi/exampleTargetCMakeLists.txt create mode 100644 no-pdi/include/pdi.h create mode 100644 no-pdi/scripts/env.sh.in create mode 100644 no-pdi/scripts/env.xsh diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index eb10fa34d..d523beb65 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,7 +6,8 @@ Before merging your code, please check the following: * [ ] you have added a line describing your changes to the Changelog; * [ ] you have added unit tests for any new or improved feature; -* [ ] In case you updated dependencies, you have checked pdi/docs/CheckList.md +* [ ] in case you updated dependencies, you have checked pdi/docs/CheckList.md; +* [ ] in case you added a new member to pdi.h, add the equivalent empty member to no-pdi/include/pdi.h * you have checked your code format: - [ ] you have checked that you respect all conventions specified in CONTRIBUTING.md; - [ ] you have checked that the indentation and formatting conforms to the `.clang-format`; diff --git a/AUTHORS b/AUTHORS index 3c80d1114..c71628195 100644 --- a/AUTHORS +++ b/AUTHORS @@ -7,6 +7,9 @@ each sub-project (including PDI itself) is located in the dedicated sub-project AUTHORS file. +Julian Auriac - CEA (julian.auriac@cea.fr) +* Maintainer (Nov. 2024 - ...) + Julien Bigot - CEA (julien.bigot@cea.fr) * Maintainer (Dec. 2014 - ...) * Design and initial implementation diff --git a/CHANGELOG.md b/CHANGELOG.md index 416a269af..04c3969c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Users can also write data in other format thanks to taking JSON as input for the dedicated tools. [#440](https://gitlab.maisondelasimulation.fr/pdidev/pdi/-/issues/440) +* Add "no-pdi", including the header no-pdi/include/pdi.h, which allows to + disable PDI effects while keeping code syntax unchanged. ### Changed diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt new file mode 100644 index 000000000..7ae9b90d8 --- /dev/null +++ b/no-pdi/CMakeLists.txt @@ -0,0 +1,422 @@ +#============================================================================= +# Copyright (C) 2015-2024 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * 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. +# * Neither the names of CEA, nor the names of the 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. +#============================================================================= + +cmake_minimum_required(VERSION 3.16...3.29) +project(PDI LANGUAGES CXX C) +list(APPEND CMAKE_MODULE_PATH "${PDI_SOURCE_DIR}/cmake") + +# ################# +include(CMakePrintHelpers) +# cmake_print_variables(CMAKE_MODULE_PATH) +# cmake_print_variables(PDI_SOURCE_DIR) +# ################# + + +# Version + +# file(READ VERSION PDI_VERSION) +string(STRIP "${PDI_VERSION}" PDI_VERSION) +string(REGEX MATCH "([0-9A-Za-z]+)\\.([0-9A-Za-z]+)\\.([0-9A-Za-z]+)(-([0-9A-Za-z]+))?" "\\1;\\2;\\3" "${PDI_VERSION}") +set(PDI_VERSION_MAJOR "${CMAKE_MATCH_1}") +set(PDI_VERSION_MINOR "${CMAKE_MATCH_2}") +set(PDI_VERSION_PATCH "${CMAKE_MATCH_3}") +set(PDI_VERSION_MODIF "${CMAKE_MATCH_5}") +if("git" STREQUAL "${PDI_VERSION_MODIF}" OR "alpha" STREQUAL "${PDI_VERSION_MODIF}") + execute_process(COMMAND "${PDI_SOURCE_DIR}/cmake/version-uid" "${PDI_VERSION_MODIF}" WORKING_DIRECTORY "${PDI_SOURCE_DIR}" OUTPUT_VARIABLE PDI_VERSION_MODIF OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() +set(PDI_VERSION "${PDI_VERSION_MAJOR}.${PDI_VERSION_MINOR}.${PDI_VERSION_PATCH}") +set(PDI_VERSION "${PDI_VERSION}${PDI_VERSION_MODIF}") + + +# Build options + +option(BUILD_BENCHMARKING "Build PDI benchmarks" ON) +option(BUILD_DOCUMENTATION "Build documentation" ON) +option(BUILD_SHARED_LIBS "Build shared libraries rather than static ones" ON) +option(BUILD_TESTING "Build tests" ON) +option(BUILD_FORTRAN "Enable Fortran support" ON) +option(BUILD_PYTHON "Enable Python support" "${BUILD_UNSTABLE}") + +if("${BUILD_TESTING}" AND "${CMAKE_VERSION}" VERSION_LESS "3.10") + message(FATAL_ERROR "Minimum CMake version to build tests is 3.10. Please update CMake or turn off testing by adding the flag `-DBUILD_TESTING=OFF` to the cmake command line.") +endif() +if("${BUILD_DOCUMENTATION}" AND "${CMAKE_VERSION}" VERSION_LESS "3.10") + message(FATAL_ERROR "Minimum CMake version to build documentation is 3.10. Please update CMake or turn off documentation generation by adding the flag `-DBUILD_DOCUMENTATION=OFF` to the cmake command line.") +endif() +if(NOT "${BUILD_SHARED_LIBS}") + message(FATAL_ERROR "Building PDI as a static lib is not supported currently") +endif() + + +# A little compatibility macro + +if("${CMAKE_VERSION}" VERSION_LESS "3.12") + set(LIBRARY_COMPONENT "COMPONENT" "Runtime") +else() + set(LIBRARY_COMPONENT "COMPONENT" "Runtime" "NAMELINK_COMPONENT" "Development") +endif() + + +# Language support + +# if("${BUILD_FORTRAN}") +# enable_language(Fortran) +# endif() + + +# Includes + +include(CTest) +include(CMakePackageConfigHelpers) +# if("${BUILD_FORTRAN}") +# include(DefaultKind) +# endif() +include(GenerateExportHeader) +set(_REAL_PROJECT_NAME "${PROJECT_NAME}") +set(PROJECT_NAME pdi) +include(GNUInstallDirs) +set(PROJECT_NAME "${_REAL_PROJECT_NAME}") +set(INSTALL_PDIDATADIR "${CMAKE_INSTALL_DATADIR}/pdi" CACHE PATH "PDI data directory (DATADIR/pdi)") +set(INSTALL_CMAKEDIR "${INSTALL_PDIDATADIR}/cmake" CACHE PATH "cmake modules (PDIDATADIR/cmake)") +set(INSTALL_PDIPLUGINDIR "${CMAKE_INSTALL_LIBDIR}/pdi/plugins_${PDI_VERSION}" CACHE PATH "cmake modules (LIBDIR/pdi/plugins_${PDI_VERSION})") + + +# Dependencies + +# set(PARACONF_COMPONENTS "C") +# if("${BUILD_FORTRAN}") +# list(APPEND PARACONF_COMPONENTS "f90") +# endif() +# find_package(paraconf 1.0.0 REQUIRED COMPONENTS ${PARACONF_COMPONENTS}) # must match PDIConfig.cmake.in +# find_package(spdlog 1.5.0 REQUIRED) # must match PDIConfig.cmake.in +# if("${BUILD_PYTHON}") +# find_package(Python3Path 3.8.2 REQUIRED COMPONENTS Interpreter Development) +# set(Python_ADDITIONAL_VERSIONS "${Python3_VERSION}" CACHE STRING "Python version found by FindPython3 for coherency" FORCE) +# set(PYBIND11_PYTHON_VERSION "${Python3_VERSION}" CACHE STRING "Python version to use for compiling modules" FORCE) +# find_package(pybind11 2.4.3 REQUIRED) # must match PDIConfig.cmake.in +# endif() +# if("${BUILD_FORTRAN}") +# add_subdirectory("../vendor/zpp-1.0.16/" "zpp") +# endif() + + +# Check for some portability stuff and generate config.h + +if(IS_ABSOLUTE "${INSTALL_PDIPLUGINDIR}") + set(PDI_DEFAULT_PLUGIN_PATH "${INSTALL_PDIPLUGINDIR}") +else() + file(RELATIVE_PATH PDI_DEFAULT_PLUGIN_PATH "/${CMAKE_INSTALL_LIBDIR}" "/${INSTALL_PDIPLUGINDIR}" ) +endif() + +# if("${BUILD_FORTRAN}") +# get_default_kind(INTEGER PDI_INTEGER_DEFAULT_KIND) +# get_default_kind(CHARACTER PDI_CHARACTER_DEFAULT_KIND) +# get_default_kind(REAL PDI_REAL_DEFAULT_KIND) +# get_default_kind(LOGICAL PDI_LOGICAL_DEFAULT_KIND) +# endif() +# configure_file(src/config.h.in config.h @ONLY) +# configure_file(src/version.h.in pdi/version.h @ONLY) + + +# C API library + +# set(PDI_C_SRC + # src/array_datatype.cxx + # src/callbacks.cxx + # src/context.cxx + # src/context_proxy.cxx + # src/data_descriptor.cxx + # src/data_descriptor_impl.cxx + # src/datatype.cxx + # src/datatype_template.cxx + # src/error.cxx + # src/expression.cxx + # src/expression/impl.cxx + # src/expression/impl/float_literal.cxx + # src/expression/impl/int_literal.cxx + # src/expression/impl/mapping.cxx + # src/expression/impl/operation.cxx + # src/expression/impl/reference_expression.cxx + # src/expression/impl/sequence.cxx + # src/expression/impl/string_literal.cxx + # src/global_context.cxx + # src/logger.cxx + # src/paraconf_wrapper.cxx + # src/pdi.cxx + # src/plugin.cxx + # src/plugin_store.cxx + # src/pointer_datatype.cxx + # src/record_datatype.cxx + # src/ref_any.cxx + # src/scalar_datatype.cxx + # src/string_tools.cxx + # src/tuple_datatype.cxx +# ) +# ################# +# include(CMakePrintHelpers) +# cmake_print_variables("${PDI_C}") +# ################# +add_library(PDI_C INTERFACE) +generate_export_header(PDI_C BASE_NAME pdi EXPORT_FILE_NAME no-pdi/export.h) +# target_include_directories(PDI_C +# INTERFACE paraconf::paraconf ${CMAKE_DL_LIBS} +# INTERFACE spdlog::spdlog) +target_include_directories(PDI_C + INTERFACE "$" "$" + INTERFACE "$") +# target_link_libraries(PDI_C +# PUBLIC paraconf::paraconf ${CMAKE_DL_LIBS} +# PRIVATE spdlog::spdlog) +target_link_libraries(PDI_C + INTERFACE paraconf::paraconf ${CMAKE_DL_LIBS} + INTERFACE spdlog::spdlog) +# target_link_libraries(PDI_C) +target_compile_features(PDI_C INTERFACE cxx_std_17 c_std_11) +set_property(TARGET PDI_C PROPERTY LIBRARY_OUTPUT_NAME "pdi") +set_property(TARGET PDI_C PROPERTY ENABLE_EXPORTS TRUE) +set_property(TARGET PDI_C PROPERTY C_VISIBILITY_PRESET hidden) +set_property(TARGET PDI_C PROPERTY CXX_VISIBILITY_PRESET hidden) +set_property(TARGET PDI_C PROPERTY POSITION_INDEPENDENT_CODE ON) +set_property(TARGET PDI_C PROPERTY VERSION ${PDI_VERSION}) +set_property(TARGET PDI_C PROPERTY SOVERSION ${PDI_VERSION_MAJOR}) +set_property(TARGET PDI_C PROPERTY PDI_MAJOR_VERSION ${PDI_VERSION_MAJOR}) +set_property(TARGET PDI_C APPEND PROPERTY COMPATIBLE_INTERFACE_STRING PDI_MAJOR_VERSION) +add_library(PDI::pdi ALIAS PDI_C) +add_library(PDI::PDI_C ALIAS PDI_C) +install(TARGETS PDI_C EXPORT PDI_C_EXPORT + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ${LIBRARY_COMPONENT} + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Development + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +) +install(FILES + "${PDI_SOURCE_DIR}/../no-pdi/include/pdi.h" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + COMPONENT Development +) +################# +# include(CMakePrintHelpers) +# # cmake_print_variables("${PDI_SOURCE_DIR}/../no-pdi/include/pdi.h") +# cmake_print_variables("${PDI_SOURCE_DIR}/include/pdi.h") +################# +install(FILES + "${PDI_BINARY_DIR}/no-pdi/export.h" + "${PDI_BINARY_DIR}/no-pdi/version.h" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/no-pdi" + COMPONENT Development +) +install(EXPORT PDI_C_EXPORT NAMESPACE "PDI::" DESTINATION "${INSTALL_CMAKEDIR}" FILE "PDI_C.cmake") + + +# C++ plugin API library + +# add_library(PDI_plugins INTERFACE) +# target_link_libraries(PDI_plugins INTERFACE PDI::PDI_C spdlog::spdlog) +# target_compile_features(PDI_plugins INTERFACE cxx_std_17 c_std_11) +# add_library(PDI::PDI_plugins ALIAS PDI_plugins) +# install(TARGETS PDI_plugins EXPORT PDI_plugins_EXPORT +# LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ${LIBRARY_COMPONENT} +# ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Development +# INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +# ) +# install(DIRECTORY "${PDI_SOURCE_DIR}/include/pdi" +# DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +# COMPONENT Development +# FILES_MATCHING PATTERN *.h PATTERN python/*.h EXCLUDE +# ) +# install(EXPORT PDI_plugins_EXPORT NAMESPACE "PDI::" DESTINATION "${INSTALL_CMAKEDIR}" FILE "PDI_plugins.cmake") + + +# pdirun + +# file(COPY scripts/pdirun_intree DESTINATION "${CMAKE_BINARY_DIR}/") +add_executable(pdirun IMPORTED) +add_executable(PDI::pdirun IMPORTED) +set_target_properties(pdirun PDI::pdirun PROPERTIES IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/pdirun_intree") +# install(PROGRAMS scripts/pdirun +# DESTINATION "${CMAKE_INSTALL_BINDIR}" +# COMPONENT Runtime +# ) + + +# if("${BUILD_PYTHON}") + +# # C++ python support library +# add_library(PDI_pysupport src/python/python_ref_wrapper.cxx src/python/tools.cxx) +# target_include_directories(PDI_pysupport PUBLIC +# "$" +# PRIVATE "$" +# ) +# # We should link to PDI::PDI_plugins, but since it imposes C++17 which fails with +# # pybind11 <= 2.4.5 , we use its dependants, cross fingers and hope for C++-14 to work +# if(2.4.5 VERSION_LESS_EQUAL "${pybind11_VERSION}") +# target_link_libraries(PDI_pysupport PUBLIC PDI::PDI_plugins) +# else() +# target_link_libraries(PDI_pysupport PUBLIC PDI::PDI_C spdlog::spdlog) +# endif() +# target_link_libraries(PDI_pysupport PUBLIC pybind11::pybind11) +# target_compile_features(PDI_pysupport PUBLIC cxx_std_14 c_std_11) +# set_property(TARGET PDI_pysupport PROPERTY LIBRARY_OUTPUT_NAME "pdi_pysupport") +# set_property(TARGET PDI_pysupport PROPERTY ENABLE_EXPORTS TRUE) +# set_property(TARGET PDI_pysupport PROPERTY C_VISIBILITY_PRESET hidden) +# set_property(TARGET PDI_pysupport PROPERTY CXX_VISIBILITY_PRESET hidden) +# set_property(TARGET PDI_pysupport PROPERTY POSITION_INDEPENDENT_CODE ON) +# set_property(TARGET PDI_pysupport PROPERTY VERSION ${PDI_VERSION}) +# set_property(TARGET PDI_pysupport PROPERTY SOVERSION ${PDI_VERSION_MAJOR}) +# set_property(TARGET PDI_pysupport PROPERTY PDI_MAJOR_VERSION ${PDI_VERSION_MAJOR}) +# set_property(TARGET PDI_pysupport APPEND PROPERTY COMPATIBLE_INTERFACE_STRING PDI_MAJOR_VERSION) +# add_library(PDI::PDI_pysupport ALIAS PDI_pysupport) +# install(TARGETS PDI_pysupport EXPORT PDI_pysupport_EXPORT +# LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ${LIBRARY_COMPONENT} +# ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Development +# INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +# ) +# install(DIRECTORY "${PDI_SOURCE_DIR}/include/pdi/python" +# DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/pdi" +# COMPONENT Development +# ) +# install(EXPORT PDI_pysupport_EXPORT NAMESPACE "PDI::" DESTINATION "${INSTALL_CMAKEDIR}" FILE "PDI_pysupport.cmake") + + +# # Python API module + +# pybind11_add_module(PDI_python MODULE src/python/pdi.cxx) +# target_link_libraries(PDI_python PRIVATE PDI::PDI_pysupport) +# target_include_directories(PDI_python PRIVATE +# "${PDI_SOURCE_DIR}/include" +# "${PDI_SOURCE_DIR}/src" +# ) +# set_property(TARGET PDI_python PROPERTY LIBRARY_OUTPUT_NAME "_pdi") +# set_property(TARGET PDI_python PROPERTY ENABLE_EXPORTS TRUE) +# set_property(TARGET PDI_python PROPERTY C_VISIBILITY_PRESET hidden) +# set_property(TARGET PDI_python PROPERTY CXX_VISIBILITY_PRESET hidden) +# set_property(TARGET PDI_python PROPERTY POSITION_INDEPENDENT_CODE ON) +# set_property(TARGET PDI_python PROPERTY LIBRARY_OUTPUT_DIRECTORY pdi) +# install(TARGETS PDI_python +# LIBRARY DESTINATION "${Python3Path_INSTALL_SITEARCHDIR}/pdi" COMPONENT Runtime +# ) +# install(DIRECTORY src/python/pdi +# DESTINATION "${Python3Path_INSTALL_SITEARCHDIR}" +# COMPONENT Runtime +# ) +# configure_file("src/python/pdi/__init__.py" "pdi" COPYONLY) + +# endif() + + +# Fortran API library + +# if("${BUILD_FORTRAN}") +# zpp_preprocess(OUTPUT PDIF_H SOURCES src/fortran/pdif.h.zpp) +# zpp_preprocess(OUTPUT PDI_F90 SOURCES src/fortran/pdi.f90.zpp) +# file(MAKE_DIRECTORY "${PDI_BINARY_DIR}/fmoddir") +# add_custom_target(mv_zpp_files # we put in in fmoddir because pdif.h is compiler dependant +# COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${PDIF_H}" "${PDI_BINARY_DIR}/fmoddir/pdif.h" +# DEPENDS "${PDIF_H}" +# VERBATIM +# ) +# add_library(PDI_f90 ${PDI_F90} src/fortran/pdi_c.f90) +# target_link_libraries(PDI_f90 PUBLIC PDI::PDI_C paraconf::paraconf_f90 PRIVATE PDI::PDI_plugins) +# add_dependencies(PDI_f90 mv_zpp_files) +# target_include_directories(PDI_f90 PUBLIC +# "$" +# PRIVATE "$" +# ) +# set_property(TARGET PDI_f90 PROPERTY LIBRARY_OUTPUT_NAME "pdi_f90") +# set_property(TARGET PDI_f90 PROPERTY VERSION ${PDI_VERSION}) +# set_property(TARGET PDI_f90 PROPERTY SOVERSION ${PDI_VERSION_MAJOR}) +# set_property(TARGET PDI_f90 PROPERTY PDI_MAJOR_VERSION ${PDI_VERSION_MAJOR}) +# set_property(TARGET PDI_f90 APPEND PROPERTY COMPATIBLE_INTERFACE_STRING PDI_MAJOR_VERSION) +# set_property(TARGET PDI_f90 PROPERTY Fortran_MODULE_DIRECTORY "${PDI_BINARY_DIR}/fmoddir/") +# # Expect compilers to provide compatible modules at the minor release level at least +# string(REGEX REPLACE "^([0-9]*\\.[0-9]*)\\..*$" "\\1" Fortran_COMPILER_MINOR_VERSION "${CMAKE_Fortran_COMPILER_VERSION}") +# set(INSTALL_FMODDIR +# "${CMAKE_INSTALL_LIBDIR}/pdi/finclude/${CMAKE_Fortran_COMPILER_ID}-${Fortran_COMPILER_MINOR_VERSION}" +# CACHE PATH +# "Fortran module directory (LIBDIR/pdi/finclude/${CMAKE_Fortran_COMPILER_ID}-${Fortran_COMPILER_MINOR_VERSION})") +# install(TARGETS PDI_f90 EXPORT pdi_f90_EXPORT +# LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT ${LIBRARY_COMPONENT} +# ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Development +# INCLUDES DESTINATION "${INSTALL_FMODDIR}" +# ) +# install(DIRECTORY "${PDI_BINARY_DIR}/fmoddir/" +# DESTINATION "${INSTALL_FMODDIR}" +# COMPONENT Development +# ) +# install(EXPORT pdi_f90_EXPORT NAMESPACE "PDI::" DESTINATION "${INSTALL_CMAKEDIR}" FILE "PDI_f90.cmake") +# add_library(PDI::pdi_f90 ALIAS PDI_f90) +# add_library(PDI::PDI_f90 ALIAS PDI_f90) +# add_library(PDI::PDI_Fortran ALIAS PDI_f90) +# endif() + + +# Documentation + +# if("${BUILD_DOCUMENTATION}") +# add_subdirectory(docs docs) +# endif() + + +# Tests + +# if("${BUILD_TESTING}") +# add_subdirectory(tests tests) +# endif() + +# if("${BUILD_BENCHMARKING}") +# add_subdirectory(benchmarks) +# endif() + +# Installable config + +configure_file(scripts/env.sh.in env.sh @ONLY) +configure_file(scripts/env.xsh env.bash @ONLY) +configure_file(scripts/env.xsh env.zsh @ONLY) +install(FILES + "${PDI_BINARY_DIR}/env.bash" + "${PDI_BINARY_DIR}/env.sh" + "${PDI_BINARY_DIR}/env.zsh" + DESTINATION "${INSTALL_PDIDATADIR}" + COMPONENT Runtime +) + + +configure_file(cmake/PDIConfig.cmake.in PDIConfig.cmake @ONLY) +write_basic_package_version_file("${PDI_BINARY_DIR}/PDIConfigVersion.cmake" + VERSION "${PDI_VERSION}" + COMPATIBILITY AnyNewerVersion +) +install(FILES + cmake/CMakeFindDependencyMacro.cmake + cmake/FindPackageHandleStandardArgs.cmake + cmake/FindPackageMessage.cmake + "${PDI_BINARY_DIR}/PDIConfig.cmake" + "${PDI_BINARY_DIR}/PDIConfigVersion.cmake" + DESTINATION "${INSTALL_CMAKEDIR}" + COMPONENT Development +) diff --git a/no-pdi/exampleTargetCMakeLists.txt b/no-pdi/exampleTargetCMakeLists.txt new file mode 100644 index 000000000..5bad89537 --- /dev/null +++ b/no-pdi/exampleTargetCMakeLists.txt @@ -0,0 +1,184 @@ +#============================================================================= +# Copyright (C) 2015-2023 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +#============================================================================= + +cmake_minimum_required(VERSION 3.9) +project(pdi_examples LANGUAGES C) + +find_package(MPI REQUIRED COMPONENTS C) +find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +# find_package(PDI 1.6.0 REQUIRED COMPONENTS C) + +option(WITHOUT_PDI "Disable PDI" OFF) +# if(WITHOUT_PDI) +# # include(no-pdi.cmake) # Defines PDI::pdi to only include no-pdi/ +# # include(PDI_C.cmake) # Defines PDI::pdi to only include no-pdi/ +# # # include(CMakePrintHelpers) +# # # cmake_print_variables("${INSTALL_CMAKEDIR}") # is empty +# # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +# # include("../no-pdi/build/CMakeFiles/Export/share/pdi/cmake/PDI_C.cmake") # Defines PDI::pdi to only include no-pdi/ +# # include("../no-pdi/") # Defines PDI::pdi to only include no-pdi/ +# # find_package(PDI 1.6.0 REQUIRED COMPONENTS C PATHS "../no-pdi/build/CMakeFiles/Export/share/pdi") +# # find_package(PDI 1.6.0 REQUIRED COMPONENTS C) +# # include_directories(include) +# # add_executable(include/no-pdi.h) +# else() +# # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +# find_package(PDI 1.6.0 REQUIRED COMPONENTS C) +# endif() +if(WITHOUT_PDI) + # # ################# + # include(CMakePrintHelpers) + # cmake_print_variables("PDI is disabled.") + # # ################# + message(WARNING "PDI is disabled.") + # find_package(PDI 1.6.0 REQUIRED COMPONENTS C) +else() + find_package(PDI 1.6.0 REQUIRED COMPONENTS C) +endif() + +set(CMAKE_C_STANDARD 99) + +# set( CMAKE_CXX_FLAGS_DEBUG_INIT "-fstack-protector" ) + +if(WITHOUT_PDI) + + add_library(test_lib INTERFACE) + target_include_directories(test_lib INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) + # add_library(test_lib_bis INTERFACE) + # target_include_directories(test_lib_bis INTERFACE ${CMAKE_SOURCE_DIR}/../no-paraconf/include) + + add_executable(ex1 ex1.c) + target_link_libraries(ex1 m MPI::MPI_C paraconf::paraconf test_lib) + # target_link_libraries(ex1 m MPI::MPI_C test_lib_bis test_lib) + + add_executable(ex2 ex2.c) + target_link_libraries(ex2 m MPI::MPI_C paraconf::paraconf test_lib) + + add_executable(ex3 ex3.c) + target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf test_lib) + + add_executable(ex4 ex4.c) + target_link_libraries(ex4 m MPI::MPI_C paraconf::paraconf test_lib) + + add_executable(ex5 ex5.c) + target_link_libraries(ex5 m MPI::MPI_C paraconf::paraconf test_lib) + + add_executable(ex6 ex6.c) + target_link_libraries(ex6 m MPI::MPI_C paraconf::paraconf test_lib) + + add_executable(ex7 ex7.c) + target_link_libraries(ex7 m MPI::MPI_C paraconf::paraconf test_lib) + + add_executable(ex8 ex8.c) + target_link_libraries(ex8 m MPI::MPI_C paraconf::paraconf test_lib) + + add_executable(ex9 ex9.c) + target_link_libraries(ex9 m MPI::MPI_C paraconf::paraconf test_lib) + + add_executable(ex10 ex10.c) + target_link_libraries(ex10 m MPI::MPI_C paraconf::paraconf test_lib) + + add_executable(ex11 ex11.c) + target_link_libraries(ex11 m MPI::MPI_C paraconf::paraconf test_lib) + + add_executable(ex12 ex12.c) + target_link_libraries(ex12 m MPI::MPI_C paraconf::paraconf test_lib) + +else() + + ## comment ex0 + ##add_executable(ex0 ex0.c) + ##target_link_libraries(ex0 m MPI::MPI_C paraconf::paraconf PDI::pdi) + + add_executable(ex1 ex1.c) + target_link_libraries(ex1 m MPI::MPI_C paraconf::paraconf PDI::pdi) + + add_executable(ex2 ex2.c) + target_link_libraries(ex2 m MPI::MPI_C paraconf::paraconf PDI::pdi) + + add_executable(ex3 ex3.c) + target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf PDI::pdi) + + # add_executable(ex3 ex3.c) + # # target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf PDI::pdi) + # target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf) + # # ################# + # include(CMakePrintHelpers) + # cmake_print_variables(../no-pdi/include) + # # ################# + # # target_link_directories(ex3 INTERFACE ../no-pdi/build/CMakeFiles/Export/share/pdi) + # link_directories(ex3 INTERFACE ../no-pdi/include) + # # link_directories ? + + # # # ################# + # include(CMakePrintHelpers) + # cmake_print_variables("${CMAKE_SOURCE_DIR}/../no-pdi/include/pdi.h") + # # # ################# + # # add_library(test_lib SHARED pdi.h) + # add_library(test_lib SHARED ${CMAKE_SOURCE_DIR}/../no-pdi/include/pdi.h) + # # target_sources(test_lib INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include/pdi.h) + # add_executable(ex3 ex3.c) + # target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf test_lib) + + # add_library(test_lib INTERFACE) + # target_include_directories(test_lib INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) + # add_executable(ex3 ex3.c) + # target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf test_lib) + + # add_library(test_lib INTERFACE) + # target_include_directories(test_lib INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) + # add_library(test_lib_bis INTERFACE) + # target_include_directories(test_lib_bis INTERFACE ${CMAKE_SOURCE_DIR}/../no-paraconf/include) + # add_executable(ex3 ex3.c) + # target_link_libraries(ex3 m MPI::MPI_C test_lib_bis test_lib) + + add_executable(ex4 ex4.c) + target_link_libraries(ex4 m MPI::MPI_C paraconf::paraconf PDI::pdi) + + add_executable(ex5 ex5.c) + target_link_libraries(ex5 m MPI::MPI_C paraconf::paraconf PDI::pdi) + + add_executable(ex6 ex6.c) + target_link_libraries(ex6 m MPI::MPI_C paraconf::paraconf PDI::pdi) + + add_executable(ex7 ex7.c) + target_link_libraries(ex7 m MPI::MPI_C paraconf::paraconf PDI::pdi) + + add_executable(ex8 ex8.c) + target_link_libraries(ex8 m MPI::MPI_C paraconf::paraconf PDI::pdi) + + add_executable(ex9 ex9.c) + target_link_libraries(ex9 m MPI::MPI_C paraconf::paraconf PDI::pdi) + + add_executable(ex10 ex10.c) + target_link_libraries(ex10 m MPI::MPI_C paraconf::paraconf PDI::pdi) + + add_executable(ex11 ex11.c) + set_target_properties(ex11 PROPERTIES ENABLE_EXPORTS TRUE) + target_link_libraries(ex11 m MPI::MPI_C paraconf::paraconf PDI::pdi) + + add_executable(ex12 ex12.c) + target_link_libraries(ex12 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +endif() + +add_subdirectory(ex_deisa/) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h new file mode 100644 index 000000000..5d1345960 --- /dev/null +++ b/no-pdi/include/pdi.h @@ -0,0 +1,309 @@ +/******************************************************************************* +* Copyright (C) 2015-2024 Commissariat a l'energie atomique et aux energies alternatives (CEA) +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * 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. +* * Neither the name of CEA nor the names of its contributors may be used to +* endorse or promote products derived from this software without specific +* prior written permission. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +* THE SOFTWARE. +******************************************************************************/ + +/** \file pdi.h for deactivation + * + * C user API + * + * The user facing API is the interface offered by PDI to C application + * developers. + * + * \defgroup init_final Initialization and finalization + * + * The initialization and finalization part of the API is used to setup PDI, + * release its resources and check version information. + * + * \defgroup annotation Code annotation + * + * The code annotation API is the main interface to use in the code. + * + * It offers functions that can be called from code with no side effect by + * default and that can therefore be considered as annotations. + * + * \defgroup error Error handling + * + * The error handling API supports checking the error status of PDI. + * + * By default, errors in PDI C API are signaled by a return code of type + * PDI_status_t and an error message can be retrieved with the PDI_errmsg + * function. This default behavior can be changed by replacing the error handler + * with the PDI_errhandler function. + * + */ + +#ifndef PDI_H_ +#define PDI_H_ + +#include + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** \addtogroup error + * \{ + */ + +/** Error codes of PDI + */ +typedef enum PDI_status_e { + /// everything went well + PDI_OK = 0, + /// on an input call, no such data is available + PDI_UNAVAILABLE, + /// The configuration file is invalid + PDI_ERR_CONFIG, + /// A value expression is invalid + PDI_ERR_VALUE, + /// Tried to load a non-existing plugin + PDI_ERR_PLUGIN, + /// Implementation limitation (typically an unimplemented feature) + PDI_ERR_IMPL, + /// A system error occured (OS, etc.) + PDI_ERR_SYSTEM, + /** A call to a function has been made at a wrong time (e.g. closing an + * unopened transaction) + */ + PDI_ERR_STATE, + /// A conflict of onwership over a content has been raised + PDI_ERR_RIGHT, + /// Invalid type error + PDI_ERR_TYPE + +} PDI_status_t; + +/** Type of a callback function used when an error occurs + * \param status the error code + * \param message the human-readable error message + * \param context a user-provided context + */ +typedef void (*PDI_errfunc_f)(PDI_status_t status, const char* message, void* context); + +/** Definition of an error handler + */ +typedef struct PDI_errhandler_s { + /// The function to handle the error (none if NULL) + PDI_errfunc_f func; + + /// the context that will be provided to the function + void* context; + +} PDI_errhandler_t; + +/** Prints the error message and aborts if the status is invalid + */ +extern const PDI_errhandler_t PDI_EXPORT PDI_ASSERT_HANDLER; + +/** Prints the error message and continue if the status is invalid + */ +extern const PDI_errhandler_t PDI_EXPORT PDI_WARN_HANDLER; + +/** Does nothing + */ +extern const PDI_errhandler_t PDI_EXPORT PDI_NULL_HANDLER; + + +/** Return a human-readabe message describing the last error that occured in PDI + */ +const char PDI_EXPORT * PDI_errmsg(void){}; + +/** Sets the error handler to use + * + * PDI_asserthandler is the default handler before this function is called + * + * \param handler the new handler to set + * \return the previous handler + */ +PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t handler){}; + +/// \} + +/** \addtogroup init_final Initialization and finalization + * + * The initialization and finalization part of the API is used to setup PDI, + * release its resources and check version information. + * \{ + */ + +/** Initializes PDI + * \param[in] conf the configuration + * \return an error status + */ +PDI_status_t PDI_EXPORT PDI_init(PC_tree_t conf){}; +// PDI_status_t PDI_EXPORT PDI_init(void* conf){}; + +/** Finalizes PDI + * \return an error status + */ +PDI_status_t PDI_EXPORT PDI_finalize(void){}; + +/** Checks PDI API version + * + * \param[out] provided version if non-null it is filled with the provided API version + * \param[in] expected if non-zero the expected API version + * \return an error status if the expected version is incompatible with the + * provided one + */ +PDI_status_t PDI_EXPORT PDI_version(unsigned long* provided, unsigned long expected){}; + +/// \} + +/** \addtogroup annotation + * \{ + */ + +/** + * Access directions + */ +typedef enum PDI_inout_e { + /// No data transfert + PDI_NONE = 0, + /// data tranfer from PDI to the main code + PDI_IN = 1, + /// data transfer from the main code to PDI + PDI_OUT = 2, + /// data transfer in both direction + PDI_INOUT = 3 + +} PDI_inout_t; + +/** Shares some data with PDI. The user code should not modify it before + * a call to either PDI_release or PDI_reclaim. + * \param[in] name the data name + * \param[in,out] data the accessed data + * \param[in] access whether the data can be accessed for read or write + * by PDI + * \return an error status + * \pre the user code owns the data buffer + * \post ownership of the data buffer is shared between PDI and the user code + * + * the access parameter is a binary OR of PDI_IN & PDI_OUT. + * * PDI_IN means PDI can set the buffer content + * * PDI_OUT means the buffer contains data that can be accessed by PDI + */ +PDI_status_t PDI_EXPORT PDI_share(const char* name, void* data, PDI_inout_t access){}; + +/** Requests for PDI to access a data buffer. + * \param[in] name the data name + * \param[in,out] buffer a pointer to the accessed data buffer + * \param[in] inout the access properties (PDI_IN, PDI_OUT, PDI_INOUT) + * \return an error status + * \pre PDI owns the data buffer + * \post ownership of the data buffer is shared between PDI and the user code + */ +PDI_status_t PDI_EXPORT PDI_access(const char* name, void** buffer, PDI_inout_t inout){}; + +/** Releases ownership of a data shared with PDI. PDI is then responsible to + * free the associated memory whenever necessary. + * \param[in] name name of the data to release + * \return an error status + * \pre ownership of the data buffer is shared between PDI and the user code + * \pre PDI owns the data buffer + */ +PDI_status_t PDI_EXPORT PDI_release(const char* name){}; + +/** Reclaims ownership of a data buffer shared with PDI. PDI does not manage + * the buffer memory anymore. + * \param[in] name name of the data to reclaim + * \return an error status + * \pre ownership of the data buffer is shared between PDI and the user code + * \post the user code owns the data buffer + */ +PDI_status_t PDI_EXPORT PDI_reclaim(const char* name){}; + +/** Triggers a PDI "event" + * \param[in] event the event name + * \return an error status + */ +PDI_status_t PDI_EXPORT PDI_event(const char* event){}; + +/** Shortly exposes some data to PDI. Equivalent to PDI_share + PDI_reclaim. + * \param[in] name the data name + * \param[in] data the exposed data + * \param[in] access whether the data can be accessed for read or write + * by PDI + * \return an error status + */ +PDI_status_t PDI_EXPORT PDI_expose(const char* name, void* data, PDI_inout_t access){}; + +/** Performs multiple exposes at once. All the data is shared in order they were specified + * and reclaimed in reversed order after an event is triggered. + * + * NULL argument indicates an end of the list. + * + * \param[in] event_name the name of the event that will be triggered when + * all data become available + * \param[in] name the data name + * \param[in] data the exposed data + * \param[in] access whether the data can be accessed for read or write by PDI + * \param[in] ... (additional arguments) additional list of data to expose, + * each should contain name, data and access, NULL argument + * inidactes an end of the list. + * \return an error status + */ +PDI_status_t PDI_EXPORT PDI_multi_expose(const char* event_name, const char* name, void* data, PDI_inout_t access, ...){}; + +#ifdef PDI_WITH_DEPRECATED + +/** Begin a transaction in which all PDI_expose calls are grouped. + * + * This requires a call to PDI_transaction_end to close the transaction. + * + * \deprecated the transaction part of the API is deprecated, the + * PDI_multi_expose function should be used instead. + * + * \see PDI_expose the function used to expose data inside the transaction + * \see PDI_transaction_end the function used to end the transaction + * + * \param[in] name the name of the transaction (an event thus named will be + * triggered when all data become available) + * \return an error status + */ +PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char* name){}; + +/** Ends the previously opened transaction. + * + * \deprecated the transaction part of the API is deprecated, the + * PDI_multi_expose function should be used instead. + * + * \see PDI_transaction_begin the function used to start the transaction + * \see PDI_expose the function used to expose data inside the transaction + * + * \return an error status + */ +PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_end(void){}; + +#endif // PDI_WITH_DEPRECATED + +/// \} + +#ifdef __cplusplus +} // extern C +#endif + + +#endif // PDI_H_ diff --git a/no-pdi/scripts/env.sh.in b/no-pdi/scripts/env.sh.in new file mode 100644 index 000000000..4b0adca50 --- /dev/null +++ b/no-pdi/scripts/env.sh.in @@ -0,0 +1,87 @@ +#!/bin/echo 'please source this file, do not run it' + +#============================================================================= +# Copyright (C) 2019-2023 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * 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. +# * Neither the names of CEA, nor the names of the 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. +#============================================================================= + +if [ -z "$PDI_DIR" ]; then + +# this file in in INSTALL_PDIDATADIR, go up as many directories as it contains +PDI_DATADIR="@INSTALL_PDIDATADIR@" + +if [ -n "$ZSH_VERSION" ]; then + PDI_DIR="$(readlink -f "$(dirname "${(%):-%x}")")" +elif [ -n "$BASH_VERSION" ]; then + PDI_DIR="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")" +else + echo "This script only supports Bash and Zsh." >&2 + return +fi + +while [ "$(readlink -f "/${PDI_DATADIR}")" != "/" ] +do + PDI_DATADIR="$(dirname "${PDI_DATADIR}")" + PDI_DIR="$(dirname "${PDI_DIR}")" +done +export PDI_DIR + +if [ -n "$PATH" ]; then + export PATH="${PDI_DIR}/@CMAKE_INSTALL_BINDIR@/:$PATH" +else + export PATH="${PDI_DIR}/@CMAKE_INSTALL_BINDIR@/" +fi + +if [ -n "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="${PDI_DIR}/@CMAKE_INSTALL_LIBDIR@/:$LD_LIBRARY_PATH" +else + export LD_LIBRARY_PATH="${PDI_DIR}/@CMAKE_INSTALL_LIBDIR@/" +fi + +if [ -n "$PYTHONPATH" ]; then + export PYTHONPATH="${PDI_DIR}/@Python3Path_INSTALL_SITEARCHDIR@/:$PYTHONPATH" +else + export PYTHONPATH="${PDI_DIR}/@Python3Path_INSTALL_SITEARCHDIR@/" +fi + +if [ -n "$LIBRARY_PATH" ]; then + export LIBRARY_PATH="${PDI_DIR}/@CMAKE_INSTALL_LIBDIR@/:$LIBRARY_PATH" +else + export LIBRARY_PATH="${PDI_DIR}/@CMAKE_INSTALL_LIBDIR@/" +fi + +if [ -n "$CPATH" ]; then + export CPATH="${PDI_DIR}/@CMAKE_INSTALL_INCLUDEDIR@/:${PDI_DIR}/@INSTALL_FMODDIR@:$CPATH" +else + export CPATH="${PDI_DIR}/@CMAKE_INSTALL_INCLUDEDIR@/:${PDI_DIR}/@INSTALL_FMODDIR@" +fi + +if [ -n "$PDI_VERBOSE_ENV" ]; then + echo "Environment loaded for PDI version @PDI_VERSION@" >&2 +fi + +fi # [ -z "$PDI_DIR" ] diff --git a/no-pdi/scripts/env.xsh b/no-pdi/scripts/env.xsh new file mode 100644 index 000000000..2c602a5f2 --- /dev/null +++ b/no-pdi/scripts/env.xsh @@ -0,0 +1,41 @@ +#!/bin/echo 'please source this file, do not run it' + +#============================================================================= +# Copyright (C) 2019-2023 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * 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. +# * Neither the names of CEA, nor the names of the 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. +#============================================================================= + +if [ -n "$ZSH_VERSION" ]; then + PDI_DIR_TMP="$(readlink -f "$(dirname "${(%):-%x}")")" +elif [ -n "$BASH_VERSION" ]; then + PDI_DIR_TMP="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")" +else + echo "This script only supports Bash and Zsh." >&2 + return +fi + +. "${PDI_DIR_TMP}/env.sh" diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 000fc3865..b1d25cd28 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -38,6 +38,11 @@ If source files (of application that uses %PDI) and specification tree file are For C make sure that source files that use %PDI API are including `pdi.h` header file. For Fortran make sure that source files that use %PDI API are using `%PDI` module file (`USE %PDI`). +%PDI can be disabled by using the `no-pdi` directory instead of the `pdi` directory. +Make sure to modify your target application `CMakeLists.txt` following +the file `exampleTargetCMakeLists.txt` included in the no-pdi directory. +%PDI can be re-enabled by reversing those modifications. + ### Compiling by hand {#compiling_by_hand} To compile application, linker flag `-lpdi` must be used. From 219c8582c1661deb76af07c1ded2f68c1b066812 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Jan 2025 10:29:40 +0100 Subject: [PATCH 002/372] Fix #438, cleaning and refactoring, following pull request template --- CHANGELOG.md | 1 + no-pdi/CMakeLists.txt | 2 +- no-pdi/exampleTargetCMakeLists.txt | 2 +- no-pdi/include/pdi.h | 2 +- pdi/docs/Using_PDI.md | 3 ++- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04c3969c5..35c361326 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). [#440](https://gitlab.maisondelasimulation.fr/pdidev/pdi/-/issues/440) * Add "no-pdi", including the header no-pdi/include/pdi.h, which allows to disable PDI effects while keeping code syntax unchanged. + [#438](https://github.com/pdidev/pdi/issues/438) ### Changed diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index 7ae9b90d8..2b5ecfd71 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (C) 2015-2024 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# Copyright (C) 2015-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) # # All rights reserved. # diff --git a/no-pdi/exampleTargetCMakeLists.txt b/no-pdi/exampleTargetCMakeLists.txt index 5bad89537..5bbcfe7e1 100644 --- a/no-pdi/exampleTargetCMakeLists.txt +++ b/no-pdi/exampleTargetCMakeLists.txt @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (C) 2015-2023 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# Copyright (C) 2015-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 5d1345960..00377f2f3 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (C) 2015-2024 Commissariat a l'energie atomique et aux energies alternatives (CEA) +* Copyright (C) 2015-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index b1d25cd28..7623d3222 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -40,7 +40,8 @@ For Fortran make sure that source files that use %PDI API are using `%PDI` modul %PDI can be disabled by using the `no-pdi` directory instead of the `pdi` directory. Make sure to modify your target application `CMakeLists.txt` following -the file `exampleTargetCMakeLists.txt` included in the no-pdi directory. +the file `exampleTargetCMakeLists.txt` included in the no-pdi directory, +adding the CMake option `WITHOUT_PDI`. %PDI can be re-enabled by reversing those modifications. ### Compiling by hand {#compiling_by_hand} From daf9f6b7f36fd68fdebe8e1c37f6405f67f9cac4 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Jan 2025 14:01:48 +0100 Subject: [PATCH 003/372] Fix #438, cleaning --- no-pdi/CMakeLists.txt | 273 ----------------------------- no-pdi/exampleTargetCMakeLists.txt | 94 ++-------- 2 files changed, 15 insertions(+), 352 deletions(-) diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index 2b5ecfd71..1b783d7d8 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -31,16 +31,8 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES CXX C) list(APPEND CMAKE_MODULE_PATH "${PDI_SOURCE_DIR}/cmake") -# ################# -include(CMakePrintHelpers) -# cmake_print_variables(CMAKE_MODULE_PATH) -# cmake_print_variables(PDI_SOURCE_DIR) -# ################# - - # Version -# file(READ VERSION PDI_VERSION) string(STRIP "${PDI_VERSION}" PDI_VERSION) string(REGEX MATCH "([0-9A-Za-z]+)\\.([0-9A-Za-z]+)\\.([0-9A-Za-z]+)(-([0-9A-Za-z]+))?" "\\1;\\2;\\3" "${PDI_VERSION}") set(PDI_VERSION_MAJOR "${CMAKE_MATCH_1}") @@ -53,27 +45,6 @@ endif() set(PDI_VERSION "${PDI_VERSION_MAJOR}.${PDI_VERSION_MINOR}.${PDI_VERSION_PATCH}") set(PDI_VERSION "${PDI_VERSION}${PDI_VERSION_MODIF}") - -# Build options - -option(BUILD_BENCHMARKING "Build PDI benchmarks" ON) -option(BUILD_DOCUMENTATION "Build documentation" ON) -option(BUILD_SHARED_LIBS "Build shared libraries rather than static ones" ON) -option(BUILD_TESTING "Build tests" ON) -option(BUILD_FORTRAN "Enable Fortran support" ON) -option(BUILD_PYTHON "Enable Python support" "${BUILD_UNSTABLE}") - -if("${BUILD_TESTING}" AND "${CMAKE_VERSION}" VERSION_LESS "3.10") - message(FATAL_ERROR "Minimum CMake version to build tests is 3.10. Please update CMake or turn off testing by adding the flag `-DBUILD_TESTING=OFF` to the cmake command line.") -endif() -if("${BUILD_DOCUMENTATION}" AND "${CMAKE_VERSION}" VERSION_LESS "3.10") - message(FATAL_ERROR "Minimum CMake version to build documentation is 3.10. Please update CMake or turn off documentation generation by adding the flag `-DBUILD_DOCUMENTATION=OFF` to the cmake command line.") -endif() -if(NOT "${BUILD_SHARED_LIBS}") - message(FATAL_ERROR "Building PDI as a static lib is not supported currently") -endif() - - # A little compatibility macro if("${CMAKE_VERSION}" VERSION_LESS "3.12") @@ -83,20 +54,10 @@ else() endif() -# Language support - -# if("${BUILD_FORTRAN}") -# enable_language(Fortran) -# endif() - - # Includes include(CTest) include(CMakePackageConfigHelpers) -# if("${BUILD_FORTRAN}") -# include(DefaultKind) -# endif() include(GenerateExportHeader) set(_REAL_PROJECT_NAME "${PROJECT_NAME}") set(PROJECT_NAME pdi) @@ -107,25 +68,6 @@ set(INSTALL_CMAKEDIR "${INSTALL_PDIDATADIR}/cmake" CACHE PATH "cmake modules set(INSTALL_PDIPLUGINDIR "${CMAKE_INSTALL_LIBDIR}/pdi/plugins_${PDI_VERSION}" CACHE PATH "cmake modules (LIBDIR/pdi/plugins_${PDI_VERSION})") -# Dependencies - -# set(PARACONF_COMPONENTS "C") -# if("${BUILD_FORTRAN}") -# list(APPEND PARACONF_COMPONENTS "f90") -# endif() -# find_package(paraconf 1.0.0 REQUIRED COMPONENTS ${PARACONF_COMPONENTS}) # must match PDIConfig.cmake.in -# find_package(spdlog 1.5.0 REQUIRED) # must match PDIConfig.cmake.in -# if("${BUILD_PYTHON}") -# find_package(Python3Path 3.8.2 REQUIRED COMPONENTS Interpreter Development) -# set(Python_ADDITIONAL_VERSIONS "${Python3_VERSION}" CACHE STRING "Python version found by FindPython3 for coherency" FORCE) -# set(PYBIND11_PYTHON_VERSION "${Python3_VERSION}" CACHE STRING "Python version to use for compiling modules" FORCE) -# find_package(pybind11 2.4.3 REQUIRED) # must match PDIConfig.cmake.in -# endif() -# if("${BUILD_FORTRAN}") -# add_subdirectory("../vendor/zpp-1.0.16/" "zpp") -# endif() - - # Check for some portability stuff and generate config.h if(IS_ABSOLUTE "${INSTALL_PDIPLUGINDIR}") @@ -134,69 +76,14 @@ else() file(RELATIVE_PATH PDI_DEFAULT_PLUGIN_PATH "/${CMAKE_INSTALL_LIBDIR}" "/${INSTALL_PDIPLUGINDIR}" ) endif() -# if("${BUILD_FORTRAN}") -# get_default_kind(INTEGER PDI_INTEGER_DEFAULT_KIND) -# get_default_kind(CHARACTER PDI_CHARACTER_DEFAULT_KIND) -# get_default_kind(REAL PDI_REAL_DEFAULT_KIND) -# get_default_kind(LOGICAL PDI_LOGICAL_DEFAULT_KIND) -# endif() -# configure_file(src/config.h.in config.h @ONLY) -# configure_file(src/version.h.in pdi/version.h @ONLY) - - -# C API library - -# set(PDI_C_SRC - # src/array_datatype.cxx - # src/callbacks.cxx - # src/context.cxx - # src/context_proxy.cxx - # src/data_descriptor.cxx - # src/data_descriptor_impl.cxx - # src/datatype.cxx - # src/datatype_template.cxx - # src/error.cxx - # src/expression.cxx - # src/expression/impl.cxx - # src/expression/impl/float_literal.cxx - # src/expression/impl/int_literal.cxx - # src/expression/impl/mapping.cxx - # src/expression/impl/operation.cxx - # src/expression/impl/reference_expression.cxx - # src/expression/impl/sequence.cxx - # src/expression/impl/string_literal.cxx - # src/global_context.cxx - # src/logger.cxx - # src/paraconf_wrapper.cxx - # src/pdi.cxx - # src/plugin.cxx - # src/plugin_store.cxx - # src/pointer_datatype.cxx - # src/record_datatype.cxx - # src/ref_any.cxx - # src/scalar_datatype.cxx - # src/string_tools.cxx - # src/tuple_datatype.cxx -# ) -# ################# -# include(CMakePrintHelpers) -# cmake_print_variables("${PDI_C}") -# ################# add_library(PDI_C INTERFACE) generate_export_header(PDI_C BASE_NAME pdi EXPORT_FILE_NAME no-pdi/export.h) -# target_include_directories(PDI_C -# INTERFACE paraconf::paraconf ${CMAKE_DL_LIBS} -# INTERFACE spdlog::spdlog) target_include_directories(PDI_C INTERFACE "$" "$" INTERFACE "$") -# target_link_libraries(PDI_C -# PUBLIC paraconf::paraconf ${CMAKE_DL_LIBS} -# PRIVATE spdlog::spdlog) target_link_libraries(PDI_C INTERFACE paraconf::paraconf ${CMAKE_DL_LIBS} INTERFACE spdlog::spdlog) -# target_link_libraries(PDI_C) target_compile_features(PDI_C INTERFACE cxx_std_17 c_std_11) set_property(TARGET PDI_C PROPERTY LIBRARY_OUTPUT_NAME "pdi") set_property(TARGET PDI_C PROPERTY ENABLE_EXPORTS TRUE) @@ -219,11 +106,6 @@ install(FILES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT Development ) -################# -# include(CMakePrintHelpers) -# # cmake_print_variables("${PDI_SOURCE_DIR}/../no-pdi/include/pdi.h") -# cmake_print_variables("${PDI_SOURCE_DIR}/include/pdi.h") -################# install(FILES "${PDI_BINARY_DIR}/no-pdi/export.h" "${PDI_BINARY_DIR}/no-pdi/version.h" @@ -232,165 +114,10 @@ install(FILES ) install(EXPORT PDI_C_EXPORT NAMESPACE "PDI::" DESTINATION "${INSTALL_CMAKEDIR}" FILE "PDI_C.cmake") - -# C++ plugin API library - -# add_library(PDI_plugins INTERFACE) -# target_link_libraries(PDI_plugins INTERFACE PDI::PDI_C spdlog::spdlog) -# target_compile_features(PDI_plugins INTERFACE cxx_std_17 c_std_11) -# add_library(PDI::PDI_plugins ALIAS PDI_plugins) -# install(TARGETS PDI_plugins EXPORT PDI_plugins_EXPORT -# LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ${LIBRARY_COMPONENT} -# ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Development -# INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -# ) -# install(DIRECTORY "${PDI_SOURCE_DIR}/include/pdi" -# DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -# COMPONENT Development -# FILES_MATCHING PATTERN *.h PATTERN python/*.h EXCLUDE -# ) -# install(EXPORT PDI_plugins_EXPORT NAMESPACE "PDI::" DESTINATION "${INSTALL_CMAKEDIR}" FILE "PDI_plugins.cmake") - - -# pdirun - -# file(COPY scripts/pdirun_intree DESTINATION "${CMAKE_BINARY_DIR}/") add_executable(pdirun IMPORTED) add_executable(PDI::pdirun IMPORTED) set_target_properties(pdirun PDI::pdirun PROPERTIES IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/pdirun_intree") -# install(PROGRAMS scripts/pdirun -# DESTINATION "${CMAKE_INSTALL_BINDIR}" -# COMPONENT Runtime -# ) - - -# if("${BUILD_PYTHON}") - -# # C++ python support library -# add_library(PDI_pysupport src/python/python_ref_wrapper.cxx src/python/tools.cxx) -# target_include_directories(PDI_pysupport PUBLIC -# "$" -# PRIVATE "$" -# ) -# # We should link to PDI::PDI_plugins, but since it imposes C++17 which fails with -# # pybind11 <= 2.4.5 , we use its dependants, cross fingers and hope for C++-14 to work -# if(2.4.5 VERSION_LESS_EQUAL "${pybind11_VERSION}") -# target_link_libraries(PDI_pysupport PUBLIC PDI::PDI_plugins) -# else() -# target_link_libraries(PDI_pysupport PUBLIC PDI::PDI_C spdlog::spdlog) -# endif() -# target_link_libraries(PDI_pysupport PUBLIC pybind11::pybind11) -# target_compile_features(PDI_pysupport PUBLIC cxx_std_14 c_std_11) -# set_property(TARGET PDI_pysupport PROPERTY LIBRARY_OUTPUT_NAME "pdi_pysupport") -# set_property(TARGET PDI_pysupport PROPERTY ENABLE_EXPORTS TRUE) -# set_property(TARGET PDI_pysupport PROPERTY C_VISIBILITY_PRESET hidden) -# set_property(TARGET PDI_pysupport PROPERTY CXX_VISIBILITY_PRESET hidden) -# set_property(TARGET PDI_pysupport PROPERTY POSITION_INDEPENDENT_CODE ON) -# set_property(TARGET PDI_pysupport PROPERTY VERSION ${PDI_VERSION}) -# set_property(TARGET PDI_pysupport PROPERTY SOVERSION ${PDI_VERSION_MAJOR}) -# set_property(TARGET PDI_pysupport PROPERTY PDI_MAJOR_VERSION ${PDI_VERSION_MAJOR}) -# set_property(TARGET PDI_pysupport APPEND PROPERTY COMPATIBLE_INTERFACE_STRING PDI_MAJOR_VERSION) -# add_library(PDI::PDI_pysupport ALIAS PDI_pysupport) -# install(TARGETS PDI_pysupport EXPORT PDI_pysupport_EXPORT -# LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ${LIBRARY_COMPONENT} -# ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Development -# INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -# ) -# install(DIRECTORY "${PDI_SOURCE_DIR}/include/pdi/python" -# DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/pdi" -# COMPONENT Development -# ) -# install(EXPORT PDI_pysupport_EXPORT NAMESPACE "PDI::" DESTINATION "${INSTALL_CMAKEDIR}" FILE "PDI_pysupport.cmake") - - -# # Python API module - -# pybind11_add_module(PDI_python MODULE src/python/pdi.cxx) -# target_link_libraries(PDI_python PRIVATE PDI::PDI_pysupport) -# target_include_directories(PDI_python PRIVATE -# "${PDI_SOURCE_DIR}/include" -# "${PDI_SOURCE_DIR}/src" -# ) -# set_property(TARGET PDI_python PROPERTY LIBRARY_OUTPUT_NAME "_pdi") -# set_property(TARGET PDI_python PROPERTY ENABLE_EXPORTS TRUE) -# set_property(TARGET PDI_python PROPERTY C_VISIBILITY_PRESET hidden) -# set_property(TARGET PDI_python PROPERTY CXX_VISIBILITY_PRESET hidden) -# set_property(TARGET PDI_python PROPERTY POSITION_INDEPENDENT_CODE ON) -# set_property(TARGET PDI_python PROPERTY LIBRARY_OUTPUT_DIRECTORY pdi) -# install(TARGETS PDI_python -# LIBRARY DESTINATION "${Python3Path_INSTALL_SITEARCHDIR}/pdi" COMPONENT Runtime -# ) -# install(DIRECTORY src/python/pdi -# DESTINATION "${Python3Path_INSTALL_SITEARCHDIR}" -# COMPONENT Runtime -# ) -# configure_file("src/python/pdi/__init__.py" "pdi" COPYONLY) - -# endif() - - -# Fortran API library - -# if("${BUILD_FORTRAN}") -# zpp_preprocess(OUTPUT PDIF_H SOURCES src/fortran/pdif.h.zpp) -# zpp_preprocess(OUTPUT PDI_F90 SOURCES src/fortran/pdi.f90.zpp) -# file(MAKE_DIRECTORY "${PDI_BINARY_DIR}/fmoddir") -# add_custom_target(mv_zpp_files # we put in in fmoddir because pdif.h is compiler dependant -# COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${PDIF_H}" "${PDI_BINARY_DIR}/fmoddir/pdif.h" -# DEPENDS "${PDIF_H}" -# VERBATIM -# ) -# add_library(PDI_f90 ${PDI_F90} src/fortran/pdi_c.f90) -# target_link_libraries(PDI_f90 PUBLIC PDI::PDI_C paraconf::paraconf_f90 PRIVATE PDI::PDI_plugins) -# add_dependencies(PDI_f90 mv_zpp_files) -# target_include_directories(PDI_f90 PUBLIC -# "$" -# PRIVATE "$" -# ) -# set_property(TARGET PDI_f90 PROPERTY LIBRARY_OUTPUT_NAME "pdi_f90") -# set_property(TARGET PDI_f90 PROPERTY VERSION ${PDI_VERSION}) -# set_property(TARGET PDI_f90 PROPERTY SOVERSION ${PDI_VERSION_MAJOR}) -# set_property(TARGET PDI_f90 PROPERTY PDI_MAJOR_VERSION ${PDI_VERSION_MAJOR}) -# set_property(TARGET PDI_f90 APPEND PROPERTY COMPATIBLE_INTERFACE_STRING PDI_MAJOR_VERSION) -# set_property(TARGET PDI_f90 PROPERTY Fortran_MODULE_DIRECTORY "${PDI_BINARY_DIR}/fmoddir/") -# # Expect compilers to provide compatible modules at the minor release level at least -# string(REGEX REPLACE "^([0-9]*\\.[0-9]*)\\..*$" "\\1" Fortran_COMPILER_MINOR_VERSION "${CMAKE_Fortran_COMPILER_VERSION}") -# set(INSTALL_FMODDIR -# "${CMAKE_INSTALL_LIBDIR}/pdi/finclude/${CMAKE_Fortran_COMPILER_ID}-${Fortran_COMPILER_MINOR_VERSION}" -# CACHE PATH -# "Fortran module directory (LIBDIR/pdi/finclude/${CMAKE_Fortran_COMPILER_ID}-${Fortran_COMPILER_MINOR_VERSION})") -# install(TARGETS PDI_f90 EXPORT pdi_f90_EXPORT -# LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT ${LIBRARY_COMPONENT} -# ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Development -# INCLUDES DESTINATION "${INSTALL_FMODDIR}" -# ) -# install(DIRECTORY "${PDI_BINARY_DIR}/fmoddir/" -# DESTINATION "${INSTALL_FMODDIR}" -# COMPONENT Development -# ) -# install(EXPORT pdi_f90_EXPORT NAMESPACE "PDI::" DESTINATION "${INSTALL_CMAKEDIR}" FILE "PDI_f90.cmake") -# add_library(PDI::pdi_f90 ALIAS PDI_f90) -# add_library(PDI::PDI_f90 ALIAS PDI_f90) -# add_library(PDI::PDI_Fortran ALIAS PDI_f90) -# endif() - - -# Documentation - -# if("${BUILD_DOCUMENTATION}") -# add_subdirectory(docs docs) -# endif() - - -# Tests - -# if("${BUILD_TESTING}") -# add_subdirectory(tests tests) -# endif() -# if("${BUILD_BENCHMARKING}") -# add_subdirectory(benchmarks) -# endif() # Installable config diff --git a/no-pdi/exampleTargetCMakeLists.txt b/no-pdi/exampleTargetCMakeLists.txt index 5bbcfe7e1..4fca882fc 100644 --- a/no-pdi/exampleTargetCMakeLists.txt +++ b/no-pdi/exampleTargetCMakeLists.txt @@ -25,90 +25,59 @@ project(pdi_examples LANGUAGES C) find_package(MPI REQUIRED COMPONENTS C) find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -# find_package(PDI 1.6.0 REQUIRED COMPONENTS C) option(WITHOUT_PDI "Disable PDI" OFF) -# if(WITHOUT_PDI) -# # include(no-pdi.cmake) # Defines PDI::pdi to only include no-pdi/ -# # include(PDI_C.cmake) # Defines PDI::pdi to only include no-pdi/ -# # # include(CMakePrintHelpers) -# # # cmake_print_variables("${INSTALL_CMAKEDIR}") # is empty -# # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -# # include("../no-pdi/build/CMakeFiles/Export/share/pdi/cmake/PDI_C.cmake") # Defines PDI::pdi to only include no-pdi/ -# # include("../no-pdi/") # Defines PDI::pdi to only include no-pdi/ -# # find_package(PDI 1.6.0 REQUIRED COMPONENTS C PATHS "../no-pdi/build/CMakeFiles/Export/share/pdi") -# # find_package(PDI 1.6.0 REQUIRED COMPONENTS C) -# # include_directories(include) -# # add_executable(include/no-pdi.h) -# else() -# # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -# find_package(PDI 1.6.0 REQUIRED COMPONENTS C) -# endif() + if(WITHOUT_PDI) - # # ################# - # include(CMakePrintHelpers) - # cmake_print_variables("PDI is disabled.") - # # ################# message(WARNING "PDI is disabled.") - # find_package(PDI 1.6.0 REQUIRED COMPONENTS C) else() find_package(PDI 1.6.0 REQUIRED COMPONENTS C) endif() set(CMAKE_C_STANDARD 99) -# set( CMAKE_CXX_FLAGS_DEBUG_INIT "-fstack-protector" ) - if(WITHOUT_PDI) - add_library(test_lib INTERFACE) - target_include_directories(test_lib INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) - # add_library(test_lib_bis INTERFACE) - # target_include_directories(test_lib_bis INTERFACE ${CMAKE_SOURCE_DIR}/../no-paraconf/include) + add_library(no_pdi_lib INTERFACE) + target_include_directories(no_pdi_lib INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) add_executable(ex1 ex1.c) - target_link_libraries(ex1 m MPI::MPI_C paraconf::paraconf test_lib) - # target_link_libraries(ex1 m MPI::MPI_C test_lib_bis test_lib) + target_link_libraries(ex1 m MPI::MPI_C paraconf::paraconf no_pdi_lib) add_executable(ex2 ex2.c) - target_link_libraries(ex2 m MPI::MPI_C paraconf::paraconf test_lib) + target_link_libraries(ex2 m MPI::MPI_C paraconf::paraconf no_pdi_lib) add_executable(ex3 ex3.c) - target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf test_lib) + target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf no_pdi_lib) add_executable(ex4 ex4.c) - target_link_libraries(ex4 m MPI::MPI_C paraconf::paraconf test_lib) + target_link_libraries(ex4 m MPI::MPI_C paraconf::paraconf no_pdi_lib) add_executable(ex5 ex5.c) - target_link_libraries(ex5 m MPI::MPI_C paraconf::paraconf test_lib) + target_link_libraries(ex5 m MPI::MPI_C paraconf::paraconf no_pdi_lib) add_executable(ex6 ex6.c) - target_link_libraries(ex6 m MPI::MPI_C paraconf::paraconf test_lib) + target_link_libraries(ex6 m MPI::MPI_C paraconf::paraconf no_pdi_lib) add_executable(ex7 ex7.c) - target_link_libraries(ex7 m MPI::MPI_C paraconf::paraconf test_lib) + target_link_libraries(ex7 m MPI::MPI_C paraconf::paraconf no_pdi_lib) add_executable(ex8 ex8.c) - target_link_libraries(ex8 m MPI::MPI_C paraconf::paraconf test_lib) + target_link_libraries(ex8 m MPI::MPI_C paraconf::paraconf no_pdi_lib) add_executable(ex9 ex9.c) - target_link_libraries(ex9 m MPI::MPI_C paraconf::paraconf test_lib) + target_link_libraries(ex9 m MPI::MPI_C paraconf::paraconf no_pdi_lib) add_executable(ex10 ex10.c) - target_link_libraries(ex10 m MPI::MPI_C paraconf::paraconf test_lib) + target_link_libraries(ex10 m MPI::MPI_C paraconf::paraconf no_pdi_lib) add_executable(ex11 ex11.c) - target_link_libraries(ex11 m MPI::MPI_C paraconf::paraconf test_lib) + target_link_libraries(ex11 m MPI::MPI_C paraconf::paraconf no_pdi_lib) add_executable(ex12 ex12.c) - target_link_libraries(ex12 m MPI::MPI_C paraconf::paraconf test_lib) + target_link_libraries(ex12 m MPI::MPI_C paraconf::paraconf no_pdi_lib) else() - - ## comment ex0 - ##add_executable(ex0 ex0.c) - ##target_link_libraries(ex0 m MPI::MPI_C paraconf::paraconf PDI::pdi) - add_executable(ex1 ex1.c) target_link_libraries(ex1 m MPI::MPI_C paraconf::paraconf PDI::pdi) @@ -118,39 +87,6 @@ else() add_executable(ex3 ex3.c) target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf PDI::pdi) - # add_executable(ex3 ex3.c) - # # target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf PDI::pdi) - # target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf) - # # ################# - # include(CMakePrintHelpers) - # cmake_print_variables(../no-pdi/include) - # # ################# - # # target_link_directories(ex3 INTERFACE ../no-pdi/build/CMakeFiles/Export/share/pdi) - # link_directories(ex3 INTERFACE ../no-pdi/include) - # # link_directories ? - - # # # ################# - # include(CMakePrintHelpers) - # cmake_print_variables("${CMAKE_SOURCE_DIR}/../no-pdi/include/pdi.h") - # # # ################# - # # add_library(test_lib SHARED pdi.h) - # add_library(test_lib SHARED ${CMAKE_SOURCE_DIR}/../no-pdi/include/pdi.h) - # # target_sources(test_lib INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include/pdi.h) - # add_executable(ex3 ex3.c) - # target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf test_lib) - - # add_library(test_lib INTERFACE) - # target_include_directories(test_lib INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) - # add_executable(ex3 ex3.c) - # target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf test_lib) - - # add_library(test_lib INTERFACE) - # target_include_directories(test_lib INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) - # add_library(test_lib_bis INTERFACE) - # target_include_directories(test_lib_bis INTERFACE ${CMAKE_SOURCE_DIR}/../no-paraconf/include) - # add_executable(ex3 ex3.c) - # target_link_libraries(ex3 m MPI::MPI_C test_lib_bis test_lib) - add_executable(ex4 ex4.c) target_link_libraries(ex4 m MPI::MPI_C paraconf::paraconf PDI::pdi) From b791820294353ed41bfa6194607bdedad2074c25 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 3 Feb 2025 10:15:52 +0100 Subject: [PATCH 004/372] Modify return status, fonctions to inline, and library call through namespace ('::') --- no-pdi/exampleTargetCMakeLists.txt | 120 ---------------------- no-pdi/include/pdi.h | 28 ++--- no-pdi/no-pdi_exampleTargetCMakeLists.txt | 78 ++++++++++++++ 3 files changed, 92 insertions(+), 134 deletions(-) delete mode 100644 no-pdi/exampleTargetCMakeLists.txt create mode 100644 no-pdi/no-pdi_exampleTargetCMakeLists.txt diff --git a/no-pdi/exampleTargetCMakeLists.txt b/no-pdi/exampleTargetCMakeLists.txt deleted file mode 100644 index 4fca882fc..000000000 --- a/no-pdi/exampleTargetCMakeLists.txt +++ /dev/null @@ -1,120 +0,0 @@ -#============================================================================= -# Copyright (C) 2015-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -#============================================================================= - -cmake_minimum_required(VERSION 3.9) -project(pdi_examples LANGUAGES C) - -find_package(MPI REQUIRED COMPONENTS C) -find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - -option(WITHOUT_PDI "Disable PDI" OFF) - -if(WITHOUT_PDI) - message(WARNING "PDI is disabled.") -else() - find_package(PDI 1.6.0 REQUIRED COMPONENTS C) -endif() - -set(CMAKE_C_STANDARD 99) - -if(WITHOUT_PDI) - - add_library(no_pdi_lib INTERFACE) - target_include_directories(no_pdi_lib INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) - - add_executable(ex1 ex1.c) - target_link_libraries(ex1 m MPI::MPI_C paraconf::paraconf no_pdi_lib) - - add_executable(ex2 ex2.c) - target_link_libraries(ex2 m MPI::MPI_C paraconf::paraconf no_pdi_lib) - - add_executable(ex3 ex3.c) - target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf no_pdi_lib) - - add_executable(ex4 ex4.c) - target_link_libraries(ex4 m MPI::MPI_C paraconf::paraconf no_pdi_lib) - - add_executable(ex5 ex5.c) - target_link_libraries(ex5 m MPI::MPI_C paraconf::paraconf no_pdi_lib) - - add_executable(ex6 ex6.c) - target_link_libraries(ex6 m MPI::MPI_C paraconf::paraconf no_pdi_lib) - - add_executable(ex7 ex7.c) - target_link_libraries(ex7 m MPI::MPI_C paraconf::paraconf no_pdi_lib) - - add_executable(ex8 ex8.c) - target_link_libraries(ex8 m MPI::MPI_C paraconf::paraconf no_pdi_lib) - - add_executable(ex9 ex9.c) - target_link_libraries(ex9 m MPI::MPI_C paraconf::paraconf no_pdi_lib) - - add_executable(ex10 ex10.c) - target_link_libraries(ex10 m MPI::MPI_C paraconf::paraconf no_pdi_lib) - - add_executable(ex11 ex11.c) - target_link_libraries(ex11 m MPI::MPI_C paraconf::paraconf no_pdi_lib) - - add_executable(ex12 ex12.c) - target_link_libraries(ex12 m MPI::MPI_C paraconf::paraconf no_pdi_lib) - -else() - add_executable(ex1 ex1.c) - target_link_libraries(ex1 m MPI::MPI_C paraconf::paraconf PDI::pdi) - - add_executable(ex2 ex2.c) - target_link_libraries(ex2 m MPI::MPI_C paraconf::paraconf PDI::pdi) - - add_executable(ex3 ex3.c) - target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf PDI::pdi) - - add_executable(ex4 ex4.c) - target_link_libraries(ex4 m MPI::MPI_C paraconf::paraconf PDI::pdi) - - add_executable(ex5 ex5.c) - target_link_libraries(ex5 m MPI::MPI_C paraconf::paraconf PDI::pdi) - - add_executable(ex6 ex6.c) - target_link_libraries(ex6 m MPI::MPI_C paraconf::paraconf PDI::pdi) - - add_executable(ex7 ex7.c) - target_link_libraries(ex7 m MPI::MPI_C paraconf::paraconf PDI::pdi) - - add_executable(ex8 ex8.c) - target_link_libraries(ex8 m MPI::MPI_C paraconf::paraconf PDI::pdi) - - add_executable(ex9 ex9.c) - target_link_libraries(ex9 m MPI::MPI_C paraconf::paraconf PDI::pdi) - - add_executable(ex10 ex10.c) - target_link_libraries(ex10 m MPI::MPI_C paraconf::paraconf PDI::pdi) - - add_executable(ex11 ex11.c) - set_target_properties(ex11 PROPERTIES ENABLE_EXPORTS TRUE) - target_link_libraries(ex11 m MPI::MPI_C paraconf::paraconf PDI::pdi) - - add_executable(ex12 ex12.c) - target_link_libraries(ex12 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -endif() - -add_subdirectory(ex_deisa/) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 00377f2f3..99d508de1 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -129,7 +129,7 @@ extern const PDI_errhandler_t PDI_EXPORT PDI_NULL_HANDLER; /** Return a human-readabe message describing the last error that occured in PDI */ -const char PDI_EXPORT * PDI_errmsg(void){}; +inline const char PDI_EXPORT * PDI_errmsg(void){}; /** Sets the error handler to use * @@ -138,7 +138,7 @@ const char PDI_EXPORT * PDI_errmsg(void){}; * \param handler the new handler to set * \return the previous handler */ -PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t handler){}; +inline PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t handler){}; /// \} @@ -153,13 +153,13 @@ PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t handler){}; * \param[in] conf the configuration * \return an error status */ -PDI_status_t PDI_EXPORT PDI_init(PC_tree_t conf){}; +inline PDI_status_t PDI_EXPORT PDI_init(PC_tree_t conf){}; // PDI_status_t PDI_EXPORT PDI_init(void* conf){}; /** Finalizes PDI * \return an error status */ -PDI_status_t PDI_EXPORT PDI_finalize(void){}; +inline PDI_status_t PDI_EXPORT PDI_finalize(void){return PDI_OK;}; /** Checks PDI API version * @@ -168,7 +168,7 @@ PDI_status_t PDI_EXPORT PDI_finalize(void){}; * \return an error status if the expected version is incompatible with the * provided one */ -PDI_status_t PDI_EXPORT PDI_version(unsigned long* provided, unsigned long expected){}; +inline PDI_status_t PDI_EXPORT PDI_version(unsigned long* provided, unsigned long expected){return PDI_OK;}; /// \} @@ -205,7 +205,7 @@ typedef enum PDI_inout_e { * * PDI_IN means PDI can set the buffer content * * PDI_OUT means the buffer contains data that can be accessed by PDI */ -PDI_status_t PDI_EXPORT PDI_share(const char* name, void* data, PDI_inout_t access){}; +inline PDI_status_t PDI_EXPORT PDI_share(const char* name, void* data, PDI_inout_t access){return PDI_OK;}; /** Requests for PDI to access a data buffer. * \param[in] name the data name @@ -215,7 +215,7 @@ PDI_status_t PDI_EXPORT PDI_share(const char* name, void* data, PDI_inout_t acce * \pre PDI owns the data buffer * \post ownership of the data buffer is shared between PDI and the user code */ -PDI_status_t PDI_EXPORT PDI_access(const char* name, void** buffer, PDI_inout_t inout){}; +inline PDI_status_t PDI_EXPORT PDI_access(const char* name, void** buffer, PDI_inout_t inout){return PDI_OK;}; /** Releases ownership of a data shared with PDI. PDI is then responsible to * free the associated memory whenever necessary. @@ -224,7 +224,7 @@ PDI_status_t PDI_EXPORT PDI_access(const char* name, void** buffer, PDI_inout_t * \pre ownership of the data buffer is shared between PDI and the user code * \pre PDI owns the data buffer */ -PDI_status_t PDI_EXPORT PDI_release(const char* name){}; +inline PDI_status_t PDI_EXPORT PDI_release(const char* name){return PDI_OK;}; /** Reclaims ownership of a data buffer shared with PDI. PDI does not manage * the buffer memory anymore. @@ -233,13 +233,13 @@ PDI_status_t PDI_EXPORT PDI_release(const char* name){}; * \pre ownership of the data buffer is shared between PDI and the user code * \post the user code owns the data buffer */ -PDI_status_t PDI_EXPORT PDI_reclaim(const char* name){}; +inline PDI_status_t PDI_EXPORT PDI_reclaim(const char* name){return PDI_OK;}; /** Triggers a PDI "event" * \param[in] event the event name * \return an error status */ -PDI_status_t PDI_EXPORT PDI_event(const char* event){}; +inline PDI_status_t PDI_EXPORT PDI_event(const char* event){return PDI_OK;}; /** Shortly exposes some data to PDI. Equivalent to PDI_share + PDI_reclaim. * \param[in] name the data name @@ -248,7 +248,7 @@ PDI_status_t PDI_EXPORT PDI_event(const char* event){}; * by PDI * \return an error status */ -PDI_status_t PDI_EXPORT PDI_expose(const char* name, void* data, PDI_inout_t access){}; +inline PDI_status_t PDI_EXPORT PDI_expose(const char* name, void* data, PDI_inout_t access){return PDI_OK;}; /** Performs multiple exposes at once. All the data is shared in order they were specified * and reclaimed in reversed order after an event is triggered. @@ -265,7 +265,7 @@ PDI_status_t PDI_EXPORT PDI_expose(const char* name, void* data, PDI_inout_t acc * inidactes an end of the list. * \return an error status */ -PDI_status_t PDI_EXPORT PDI_multi_expose(const char* event_name, const char* name, void* data, PDI_inout_t access, ...){}; +inline PDI_status_t PDI_EXPORT PDI_multi_expose(const char* event_name, const char* name, void* data, PDI_inout_t access, ...){return PDI_OK;}; #ifdef PDI_WITH_DEPRECATED @@ -283,7 +283,7 @@ PDI_status_t PDI_EXPORT PDI_multi_expose(const char* event_name, const char* nam * triggered when all data become available) * \return an error status */ -PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char* name){}; +inline PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char* name){return PDI_OK;}; /** Ends the previously opened transaction. * @@ -295,7 +295,7 @@ PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char* name){}; * * \return an error status */ -PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_end(void){}; +inline PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_end(void){return PDI_OK;}; #endif // PDI_WITH_DEPRECATED diff --git a/no-pdi/no-pdi_exampleTargetCMakeLists.txt b/no-pdi/no-pdi_exampleTargetCMakeLists.txt new file mode 100644 index 000000000..a9c3806aa --- /dev/null +++ b/no-pdi/no-pdi_exampleTargetCMakeLists.txt @@ -0,0 +1,78 @@ +#============================================================================= +# Copyright (C) 2015-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +#============================================================================= + +cmake_minimum_required(VERSION 3.9) +project(pdi_examples LANGUAGES C) + +find_package(MPI REQUIRED COMPONENTS C) +find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) + +option(WITHOUT_PDI "Disable PDI" OFF) + +if(WITHOUT_PDI) + message(WARNING "PDI is disabled.") + add_library(PDI::pdi INTERFACE) + target_include_directories(PDI::pdi INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) +else() + find_package(PDI 1.6.0 REQUIRED COMPONENTS C) +endif() + +set(CMAKE_C_STANDARD 99) + +add_executable(ex1 ex1.c) +target_link_libraries(ex1 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex2 ex2.c) +target_link_libraries(ex2 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex3 ex3.c) +target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex4 ex4.c) +target_link_libraries(ex4 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex5 ex5.c) +target_link_libraries(ex5 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex6 ex6.c) +target_link_libraries(ex6 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex7 ex7.c) +target_link_libraries(ex7 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex8 ex8.c) +target_link_libraries(ex8 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex9 ex9.c) +target_link_libraries(ex9 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex10 ex10.c) +target_link_libraries(ex10 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex11 ex11.c) +set_target_properties(ex11 PROPERTIES ENABLE_EXPORTS TRUE) +target_link_libraries(ex11 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex12 ex12.c) +target_link_libraries(ex12 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_subdirectory(ex_deisa/) From f05ca4bef5c7cf2709c4b4a77190c9ff3e4dad87 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 3 Feb 2025 10:24:38 +0100 Subject: [PATCH 005/372] Move target example, and trim CMakeLists --- .../no-pdi_exampleTargetCMakeLists.txt | 0 no-pdi/CMakeLists.txt | 78 +++++++++---------- 2 files changed, 39 insertions(+), 39 deletions(-) rename {no-pdi => example}/no-pdi_exampleTargetCMakeLists.txt (100%) diff --git a/no-pdi/no-pdi_exampleTargetCMakeLists.txt b/example/no-pdi_exampleTargetCMakeLists.txt similarity index 100% rename from no-pdi/no-pdi_exampleTargetCMakeLists.txt rename to example/no-pdi_exampleTargetCMakeLists.txt diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index 1b783d7d8..6cf20dbc7 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -56,12 +56,12 @@ endif() # Includes -include(CTest) -include(CMakePackageConfigHelpers) -include(GenerateExportHeader) +# include(CTest) +# include(CMakePackageConfigHelpers) +# include(GenerateExportHeader) set(_REAL_PROJECT_NAME "${PROJECT_NAME}") set(PROJECT_NAME pdi) -include(GNUInstallDirs) +# include(GNUInstallDirs) set(PROJECT_NAME "${_REAL_PROJECT_NAME}") set(INSTALL_PDIDATADIR "${CMAKE_INSTALL_DATADIR}/pdi" CACHE PATH "PDI data directory (DATADIR/pdi)") set(INSTALL_CMAKEDIR "${INSTALL_PDIDATADIR}/cmake" CACHE PATH "cmake modules (PDIDATADIR/cmake)") @@ -76,31 +76,31 @@ else() file(RELATIVE_PATH PDI_DEFAULT_PLUGIN_PATH "/${CMAKE_INSTALL_LIBDIR}" "/${INSTALL_PDIPLUGINDIR}" ) endif() -add_library(PDI_C INTERFACE) -generate_export_header(PDI_C BASE_NAME pdi EXPORT_FILE_NAME no-pdi/export.h) -target_include_directories(PDI_C - INTERFACE "$" "$" - INTERFACE "$") -target_link_libraries(PDI_C - INTERFACE paraconf::paraconf ${CMAKE_DL_LIBS} - INTERFACE spdlog::spdlog) -target_compile_features(PDI_C INTERFACE cxx_std_17 c_std_11) -set_property(TARGET PDI_C PROPERTY LIBRARY_OUTPUT_NAME "pdi") -set_property(TARGET PDI_C PROPERTY ENABLE_EXPORTS TRUE) -set_property(TARGET PDI_C PROPERTY C_VISIBILITY_PRESET hidden) -set_property(TARGET PDI_C PROPERTY CXX_VISIBILITY_PRESET hidden) -set_property(TARGET PDI_C PROPERTY POSITION_INDEPENDENT_CODE ON) -set_property(TARGET PDI_C PROPERTY VERSION ${PDI_VERSION}) -set_property(TARGET PDI_C PROPERTY SOVERSION ${PDI_VERSION_MAJOR}) -set_property(TARGET PDI_C PROPERTY PDI_MAJOR_VERSION ${PDI_VERSION_MAJOR}) -set_property(TARGET PDI_C APPEND PROPERTY COMPATIBLE_INTERFACE_STRING PDI_MAJOR_VERSION) -add_library(PDI::pdi ALIAS PDI_C) -add_library(PDI::PDI_C ALIAS PDI_C) -install(TARGETS PDI_C EXPORT PDI_C_EXPORT - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ${LIBRARY_COMPONENT} - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Development - INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -) +# add_library(PDI_C INTERFACE) +# generate_export_header(PDI_C BASE_NAME pdi EXPORT_FILE_NAME no-pdi/export.h) +# target_include_directories(PDI_C +# INTERFACE "$" "$" +# INTERFACE "$") +# target_link_libraries(PDI_C +# INTERFACE paraconf::paraconf ${CMAKE_DL_LIBS} +# INTERFACE spdlog::spdlog) +# target_compile_features(PDI_C INTERFACE cxx_std_17 c_std_11) +# set_property(TARGET PDI_C PROPERTY LIBRARY_OUTPUT_NAME "pdi") +# set_property(TARGET PDI_C PROPERTY ENABLE_EXPORTS TRUE) +# set_property(TARGET PDI_C PROPERTY C_VISIBILITY_PRESET hidden) +# set_property(TARGET PDI_C PROPERTY CXX_VISIBILITY_PRESET hidden) +# set_property(TARGET PDI_C PROPERTY POSITION_INDEPENDENT_CODE ON) +# set_property(TARGET PDI_C PROPERTY VERSION ${PDI_VERSION}) +# set_property(TARGET PDI_C PROPERTY SOVERSION ${PDI_VERSION_MAJOR}) +# set_property(TARGET PDI_C PROPERTY PDI_MAJOR_VERSION ${PDI_VERSION_MAJOR}) +# set_property(TARGET PDI_C APPEND PROPERTY COMPATIBLE_INTERFACE_STRING PDI_MAJOR_VERSION) +# add_library(PDI::pdi ALIAS PDI_C) +# add_library(PDI::PDI_C ALIAS PDI_C) +# install(TARGETS PDI_C EXPORT PDI_C_EXPORT +# LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ${LIBRARY_COMPONENT} +# ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Development +# INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +# ) install(FILES "${PDI_SOURCE_DIR}/../no-pdi/include/pdi.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" @@ -121,16 +121,16 @@ set_target_properties(pdirun PDI::pdirun PROPERTIES IMPORTED_LOCATION "${CMAKE_B # Installable config -configure_file(scripts/env.sh.in env.sh @ONLY) -configure_file(scripts/env.xsh env.bash @ONLY) -configure_file(scripts/env.xsh env.zsh @ONLY) -install(FILES - "${PDI_BINARY_DIR}/env.bash" - "${PDI_BINARY_DIR}/env.sh" - "${PDI_BINARY_DIR}/env.zsh" - DESTINATION "${INSTALL_PDIDATADIR}" - COMPONENT Runtime -) +# configure_file(scripts/env.sh.in env.sh @ONLY) +# configure_file(scripts/env.xsh env.bash @ONLY) +# configure_file(scripts/env.xsh env.zsh @ONLY) +# install(FILES +# "${PDI_BINARY_DIR}/env.bash" +# "${PDI_BINARY_DIR}/env.sh" +# "${PDI_BINARY_DIR}/env.zsh" +# DESTINATION "${INSTALL_PDIDATADIR}" +# COMPONENT Runtime +# ) configure_file(cmake/PDIConfig.cmake.in PDIConfig.cmake @ONLY) From 3f472e28b8bf9d49724c09c81dccd8b370a078fe Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 4 Feb 2025 14:15:54 +0100 Subject: [PATCH 006/372] Done no-pdi with local paraconf; To do unit test --- example/no-pdi_exampleTargetCMakeLists.txt | 3 +- no-pdi/CMakeLists.txt | 166 ++++++++++++--------- no-pdi/include/pdi.h | 33 ++-- no-pdi/no-pdi.cmake | 34 +++++ tests/CMakeLists.txt | 53 ++++--- 5 files changed, 177 insertions(+), 112 deletions(-) create mode 100644 no-pdi/no-pdi.cmake diff --git a/example/no-pdi_exampleTargetCMakeLists.txt b/example/no-pdi_exampleTargetCMakeLists.txt index a9c3806aa..6cfb2b22d 100644 --- a/example/no-pdi_exampleTargetCMakeLists.txt +++ b/example/no-pdi_exampleTargetCMakeLists.txt @@ -30,8 +30,7 @@ option(WITHOUT_PDI "Disable PDI" OFF) if(WITHOUT_PDI) message(WARNING "PDI is disabled.") - add_library(PDI::pdi INTERFACE) - target_include_directories(PDI::pdi INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) + include(${CMAKE_SOURCE_DIR}/../no-pdi/no-pdi.cmake) else() find_package(PDI 1.6.0 REQUIRED COMPONENTS C) endif() diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index 6cf20dbc7..a51ae0c8d 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -29,29 +29,49 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES CXX C) -list(APPEND CMAKE_MODULE_PATH "${PDI_SOURCE_DIR}/cmake") +# list(APPEND CMAKE_MODULE_PATH "${PDI_SOURCE_DIR}/cmake") + +include(no-pdi.cmake) + +# add_library(PDI_C INTERFACE) +# add_library(PDI::pdi ALIAS PDI_C) +# add_library(PDI::PDI_C ALIAS PDI_C) + +# # target_include_directories(PDI_C +# # INTERFACE "$" "$" +# # INTERFACE "$") + +# # set_property(TARGET PDI_C PROPERTY LIBRARY_OUTPUT_NAME "pdi") + +# # add_library(PDI::pdi INTERFACE) +# # add_library(no-pdi INTERFACE) +# # add_library(PDI::pdi ALIAS PDI_C) +# target_include_directories(PDI_C INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) +# # target_include_directories(PDI::pdi INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) +# # include_directories(PDI::pdi INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) +# # include_directories(no-pdi INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) # Version -string(STRIP "${PDI_VERSION}" PDI_VERSION) -string(REGEX MATCH "([0-9A-Za-z]+)\\.([0-9A-Za-z]+)\\.([0-9A-Za-z]+)(-([0-9A-Za-z]+))?" "\\1;\\2;\\3" "${PDI_VERSION}") -set(PDI_VERSION_MAJOR "${CMAKE_MATCH_1}") -set(PDI_VERSION_MINOR "${CMAKE_MATCH_2}") -set(PDI_VERSION_PATCH "${CMAKE_MATCH_3}") -set(PDI_VERSION_MODIF "${CMAKE_MATCH_5}") -if("git" STREQUAL "${PDI_VERSION_MODIF}" OR "alpha" STREQUAL "${PDI_VERSION_MODIF}") - execute_process(COMMAND "${PDI_SOURCE_DIR}/cmake/version-uid" "${PDI_VERSION_MODIF}" WORKING_DIRECTORY "${PDI_SOURCE_DIR}" OUTPUT_VARIABLE PDI_VERSION_MODIF OUTPUT_STRIP_TRAILING_WHITESPACE) -endif() -set(PDI_VERSION "${PDI_VERSION_MAJOR}.${PDI_VERSION_MINOR}.${PDI_VERSION_PATCH}") -set(PDI_VERSION "${PDI_VERSION}${PDI_VERSION_MODIF}") +# string(STRIP "${PDI_VERSION}" PDI_VERSION) +# string(REGEX MATCH "([0-9A-Za-z]+)\\.([0-9A-Za-z]+)\\.([0-9A-Za-z]+)(-([0-9A-Za-z]+))?" "\\1;\\2;\\3" "${PDI_VERSION}") +# set(PDI_VERSION_MAJOR "${CMAKE_MATCH_1}") +# set(PDI_VERSION_MINOR "${CMAKE_MATCH_2}") +# set(PDI_VERSION_PATCH "${CMAKE_MATCH_3}") +# set(PDI_VERSION_MODIF "${CMAKE_MATCH_5}") +# if("git" STREQUAL "${PDI_VERSION_MODIF}" OR "alpha" STREQUAL "${PDI_VERSION_MODIF}") +# execute_process(COMMAND "${PDI_SOURCE_DIR}/cmake/version-uid" "${PDI_VERSION_MODIF}" WORKING_DIRECTORY "${PDI_SOURCE_DIR}" OUTPUT_VARIABLE PDI_VERSION_MODIF OUTPUT_STRIP_TRAILING_WHITESPACE) +# endif() +# set(PDI_VERSION "${PDI_VERSION_MAJOR}.${PDI_VERSION_MINOR}.${PDI_VERSION_PATCH}") +# set(PDI_VERSION "${PDI_VERSION}${PDI_VERSION_MODIF}") -# A little compatibility macro +# # A little compatibility macro -if("${CMAKE_VERSION}" VERSION_LESS "3.12") - set(LIBRARY_COMPONENT "COMPONENT" "Runtime") -else() - set(LIBRARY_COMPONENT "COMPONENT" "Runtime" "NAMELINK_COMPONENT" "Development") -endif() +# if("${CMAKE_VERSION}" VERSION_LESS "3.12") +# set(LIBRARY_COMPONENT "COMPONENT" "Runtime") +# else() +# set(LIBRARY_COMPONENT "COMPONENT" "Runtime" "NAMELINK_COMPONENT" "Development") +# endif() # Includes @@ -59,22 +79,22 @@ endif() # include(CTest) # include(CMakePackageConfigHelpers) # include(GenerateExportHeader) -set(_REAL_PROJECT_NAME "${PROJECT_NAME}") -set(PROJECT_NAME pdi) -# include(GNUInstallDirs) -set(PROJECT_NAME "${_REAL_PROJECT_NAME}") -set(INSTALL_PDIDATADIR "${CMAKE_INSTALL_DATADIR}/pdi" CACHE PATH "PDI data directory (DATADIR/pdi)") -set(INSTALL_CMAKEDIR "${INSTALL_PDIDATADIR}/cmake" CACHE PATH "cmake modules (PDIDATADIR/cmake)") -set(INSTALL_PDIPLUGINDIR "${CMAKE_INSTALL_LIBDIR}/pdi/plugins_${PDI_VERSION}" CACHE PATH "cmake modules (LIBDIR/pdi/plugins_${PDI_VERSION})") +# # # set(_REAL_PROJECT_NAME "${PROJECT_NAME}") +# # # set(PROJECT_NAME pdi) +# # # # include(GNUInstallDirs) +# # # set(PROJECT_NAME "${_REAL_PROJECT_NAME}") +# # # set(INSTALL_PDIDATADIR "${CMAKE_INSTALL_DATADIR}/pdi" CACHE PATH "PDI data directory (DATADIR/pdi)") +# # # set(INSTALL_CMAKEDIR "${INSTALL_PDIDATADIR}/cmake" CACHE PATH "cmake modules (PDIDATADIR/cmake)") +# # # set(INSTALL_PDIPLUGINDIR "${CMAKE_INSTALL_LIBDIR}/pdi/plugins_${PDI_VERSION}" CACHE PATH "cmake modules (LIBDIR/pdi/plugins_${PDI_VERSION})") -# Check for some portability stuff and generate config.h +# # # # Check for some portability stuff and generate config.h -if(IS_ABSOLUTE "${INSTALL_PDIPLUGINDIR}") - set(PDI_DEFAULT_PLUGIN_PATH "${INSTALL_PDIPLUGINDIR}") -else() - file(RELATIVE_PATH PDI_DEFAULT_PLUGIN_PATH "/${CMAKE_INSTALL_LIBDIR}" "/${INSTALL_PDIPLUGINDIR}" ) -endif() +# # # if(IS_ABSOLUTE "${INSTALL_PDIPLUGINDIR}") +# # # set(PDI_DEFAULT_PLUGIN_PATH "${INSTALL_PDIPLUGINDIR}") +# # # else() +# # # file(RELATIVE_PATH PDI_DEFAULT_PLUGIN_PATH "/${CMAKE_INSTALL_LIBDIR}" "/${INSTALL_PDIPLUGINDIR}" ) +# # # endif() # add_library(PDI_C INTERFACE) # generate_export_header(PDI_C BASE_NAME pdi EXPORT_FILE_NAME no-pdi/export.h) @@ -101,49 +121,49 @@ endif() # ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Development # INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" # ) -install(FILES - "${PDI_SOURCE_DIR}/../no-pdi/include/pdi.h" - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" - COMPONENT Development -) -install(FILES - "${PDI_BINARY_DIR}/no-pdi/export.h" - "${PDI_BINARY_DIR}/no-pdi/version.h" - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/no-pdi" - COMPONENT Development -) -install(EXPORT PDI_C_EXPORT NAMESPACE "PDI::" DESTINATION "${INSTALL_CMAKEDIR}" FILE "PDI_C.cmake") - -add_executable(pdirun IMPORTED) -add_executable(PDI::pdirun IMPORTED) -set_target_properties(pdirun PDI::pdirun PROPERTIES IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/pdirun_intree") - - -# Installable config - -# configure_file(scripts/env.sh.in env.sh @ONLY) -# configure_file(scripts/env.xsh env.bash @ONLY) -# configure_file(scripts/env.xsh env.zsh @ONLY) # install(FILES -# "${PDI_BINARY_DIR}/env.bash" -# "${PDI_BINARY_DIR}/env.sh" -# "${PDI_BINARY_DIR}/env.zsh" -# DESTINATION "${INSTALL_PDIDATADIR}" -# COMPONENT Runtime +# "${PDI_SOURCE_DIR}/../no-pdi/include/pdi.h" +# DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +# COMPONENT Development # ) +# install(FILES +# "${PDI_BINARY_DIR}/no-pdi/export.h" +# "${PDI_BINARY_DIR}/no-pdi/version.h" +# DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/no-pdi" +# COMPONENT Development +# ) +# install(EXPORT PDI_C_EXPORT NAMESPACE "PDI::" DESTINATION "${INSTALL_CMAKEDIR}" FILE "PDI_C.cmake") + +# add_executable(pdirun IMPORTED) +# add_executable(PDI::pdirun IMPORTED) +# set_target_properties(pdirun PDI::pdirun PROPERTIES IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/pdirun_intree") + + +# # Installable config +# # configure_file(scripts/env.sh.in env.sh @ONLY) +# # configure_file(scripts/env.xsh env.bash @ONLY) +# # configure_file(scripts/env.xsh env.zsh @ONLY) +# # install(FILES +# # "${PDI_BINARY_DIR}/env.bash" +# # "${PDI_BINARY_DIR}/env.sh" +# # "${PDI_BINARY_DIR}/env.zsh" +# # DESTINATION "${INSTALL_PDIDATADIR}" +# # COMPONENT Runtime +# # ) -configure_file(cmake/PDIConfig.cmake.in PDIConfig.cmake @ONLY) -write_basic_package_version_file("${PDI_BINARY_DIR}/PDIConfigVersion.cmake" - VERSION "${PDI_VERSION}" - COMPATIBILITY AnyNewerVersion -) -install(FILES - cmake/CMakeFindDependencyMacro.cmake - cmake/FindPackageHandleStandardArgs.cmake - cmake/FindPackageMessage.cmake - "${PDI_BINARY_DIR}/PDIConfig.cmake" - "${PDI_BINARY_DIR}/PDIConfigVersion.cmake" - DESTINATION "${INSTALL_CMAKEDIR}" - COMPONENT Development -) + +# configure_file(cmake/PDIConfig.cmake.in PDIConfig.cmake @ONLY) +# write_basic_package_version_file("${PDI_BINARY_DIR}/PDIConfigVersion.cmake" +# VERSION "${PDI_VERSION}" +# COMPATIBILITY AnyNewerVersion +# ) +# install(FILES +# cmake/CMakeFindDependencyMacro.cmake +# cmake/FindPackageHandleStandardArgs.cmake +# cmake/FindPackageMessage.cmake +# "${PDI_BINARY_DIR}/PDIConfig.cmake" +# "${PDI_BINARY_DIR}/PDIConfigVersion.cmake" +# DESTINATION "${INSTALL_CMAKEDIR}" +# COMPONENT Development +# ) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 99d508de1..e52aad70e 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -57,8 +57,8 @@ #include -#include -#include + +#define PDI_EXPORT __attribute__((visibility("default"))) #ifdef __cplusplus extern "C" { @@ -114,6 +114,7 @@ typedef struct PDI_errhandler_s { } PDI_errhandler_t; + /** Prints the error message and aborts if the status is invalid */ extern const PDI_errhandler_t PDI_EXPORT PDI_ASSERT_HANDLER; @@ -129,7 +130,7 @@ extern const PDI_errhandler_t PDI_EXPORT PDI_NULL_HANDLER; /** Return a human-readabe message describing the last error that occured in PDI */ -inline const char PDI_EXPORT * PDI_errmsg(void){}; +const char PDI_EXPORT * PDI_errmsg(void){}; /** Sets the error handler to use * @@ -138,7 +139,7 @@ inline const char PDI_EXPORT * PDI_errmsg(void){}; * \param handler the new handler to set * \return the previous handler */ -inline PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t handler){}; +PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t handler){}; /// \} @@ -153,13 +154,13 @@ inline PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t handler){}; * \param[in] conf the configuration * \return an error status */ -inline PDI_status_t PDI_EXPORT PDI_init(PC_tree_t conf){}; +PDI_status_t PDI_EXPORT PDI_init(PC_tree_t conf){}; // PDI_status_t PDI_EXPORT PDI_init(void* conf){}; /** Finalizes PDI * \return an error status */ -inline PDI_status_t PDI_EXPORT PDI_finalize(void){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_finalize(void){return PDI_OK;}; /** Checks PDI API version * @@ -168,7 +169,7 @@ inline PDI_status_t PDI_EXPORT PDI_finalize(void){return PDI_OK;}; * \return an error status if the expected version is incompatible with the * provided one */ -inline PDI_status_t PDI_EXPORT PDI_version(unsigned long* provided, unsigned long expected){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_version(unsigned long* provided, unsigned long expected){return PDI_OK;}; /// \} @@ -205,7 +206,7 @@ typedef enum PDI_inout_e { * * PDI_IN means PDI can set the buffer content * * PDI_OUT means the buffer contains data that can be accessed by PDI */ -inline PDI_status_t PDI_EXPORT PDI_share(const char* name, void* data, PDI_inout_t access){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_share(const char* name, void* data, PDI_inout_t access){return PDI_OK;}; /** Requests for PDI to access a data buffer. * \param[in] name the data name @@ -215,7 +216,7 @@ inline PDI_status_t PDI_EXPORT PDI_share(const char* name, void* data, PDI_inout * \pre PDI owns the data buffer * \post ownership of the data buffer is shared between PDI and the user code */ -inline PDI_status_t PDI_EXPORT PDI_access(const char* name, void** buffer, PDI_inout_t inout){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_access(const char* name, void** buffer, PDI_inout_t inout){return PDI_OK;}; /** Releases ownership of a data shared with PDI. PDI is then responsible to * free the associated memory whenever necessary. @@ -224,7 +225,7 @@ inline PDI_status_t PDI_EXPORT PDI_access(const char* name, void** buffer, PDI_i * \pre ownership of the data buffer is shared between PDI and the user code * \pre PDI owns the data buffer */ -inline PDI_status_t PDI_EXPORT PDI_release(const char* name){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_release(const char* name){return PDI_OK;}; /** Reclaims ownership of a data buffer shared with PDI. PDI does not manage * the buffer memory anymore. @@ -233,13 +234,13 @@ inline PDI_status_t PDI_EXPORT PDI_release(const char* name){return PDI_OK;}; * \pre ownership of the data buffer is shared between PDI and the user code * \post the user code owns the data buffer */ -inline PDI_status_t PDI_EXPORT PDI_reclaim(const char* name){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_reclaim(const char* name){return PDI_OK;}; /** Triggers a PDI "event" * \param[in] event the event name * \return an error status */ -inline PDI_status_t PDI_EXPORT PDI_event(const char* event){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_event(const char* event){return PDI_OK;}; /** Shortly exposes some data to PDI. Equivalent to PDI_share + PDI_reclaim. * \param[in] name the data name @@ -248,7 +249,7 @@ inline PDI_status_t PDI_EXPORT PDI_event(const char* event){return PDI_OK;}; * by PDI * \return an error status */ -inline PDI_status_t PDI_EXPORT PDI_expose(const char* name, void* data, PDI_inout_t access){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_expose(const char* name, void* data, PDI_inout_t access){return PDI_OK;}; /** Performs multiple exposes at once. All the data is shared in order they were specified * and reclaimed in reversed order after an event is triggered. @@ -265,7 +266,7 @@ inline PDI_status_t PDI_EXPORT PDI_expose(const char* name, void* data, PDI_inou * inidactes an end of the list. * \return an error status */ -inline PDI_status_t PDI_EXPORT PDI_multi_expose(const char* event_name, const char* name, void* data, PDI_inout_t access, ...){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_multi_expose(const char* event_name, const char* name, void* data, PDI_inout_t access, ...){return PDI_OK;}; #ifdef PDI_WITH_DEPRECATED @@ -283,7 +284,7 @@ inline PDI_status_t PDI_EXPORT PDI_multi_expose(const char* event_name, const ch * triggered when all data become available) * \return an error status */ -inline PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char* name){return PDI_OK;}; +PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char* name){return PDI_OK;}; /** Ends the previously opened transaction. * @@ -295,7 +296,7 @@ inline PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char* name * * \return an error status */ -inline PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_end(void){return PDI_OK;}; +PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_end(void){return PDI_OK;}; #endif // PDI_WITH_DEPRECATED diff --git a/no-pdi/no-pdi.cmake b/no-pdi/no-pdi.cmake new file mode 100644 index 000000000..ab6ad4242 --- /dev/null +++ b/no-pdi/no-pdi.cmake @@ -0,0 +1,34 @@ +#============================================================================= +# Copyright (C) 2015-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * 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. +# * Neither the names of CEA, nor the names of the 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. +#============================================================================= + +add_library(PDI_C INTERFACE) +add_library(PDI::pdi ALIAS PDI_C) +add_library(PDI::PDI_C ALIAS PDI_C) + +target_include_directories(PDI_C INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1706d200b..d2ffa0329 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -31,36 +31,47 @@ set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" ON) option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) +option(WITHOUT_PDI "Disable PDI" OFF) # Includes include(CTest) -# PDI -find_package(PDI REQUIRED COMPONENTS C) +if(WITHOUT_PDI) + find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) + message(WARNING "PDI is disabled for unit testing.") + include(${CMAKE_SOURCE_DIR}/../no-pdi/no-pdi.cmake) -if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") + add_executable(test_07_no-pdi_C test_07_no-pdi.c) + target_link_libraries(test_07_no-pdi_C paraconf::paraconf PDI::PDI_C) + add_test(NAME test_07_no-pdi_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_no-pdi.yml") +else() + # PDI + find_package(PDI REQUIRED COMPONENTS C) -add_executable(test_01_C test_01.c) -target_link_libraries(test_01_C PDI::PDI_C) -add_test(NAME test_01_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_01.yml") + if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") -add_executable(test_02_C test_02.c) -target_link_libraries(test_02_C PDI::PDI_C) -add_test(NAME test_02_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_02.yml") + add_executable(test_01_C test_01.c) + target_link_libraries(test_01_C PDI::PDI_C) + add_test(NAME test_01_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_01.yml") -add_executable(test_03_C test_03.c) -target_link_libraries(test_03_C PDI::PDI_C) -add_test(NAME test_03_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_03.yml") + add_executable(test_02_C test_02.c) + target_link_libraries(test_02_C PDI::PDI_C) + add_test(NAME test_02_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_02.yml") -add_executable(test_04_C test_04.c) -target_link_libraries(test_04_C PDI::PDI_C) -add_test(NAME test_04_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_04.yml") + add_executable(test_03_C test_03.c) + target_link_libraries(test_03_C PDI::PDI_C) + add_test(NAME test_03_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_03.yml") -endif("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") -if("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") + add_executable(test_04_C test_04.c) + target_link_libraries(test_04_C PDI::PDI_C) + add_test(NAME test_04_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_04.yml") -add_executable(test_05_C test_05.c) -target_link_libraries(test_05_C PDI::PDI_C) -add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_05.yml") + endif("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") + if("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") -endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") + add_executable(test_05_C test_05.c) + target_link_libraries(test_05_C PDI::PDI_C) + add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_05.yml") + + endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") +endif() From 3eacd3d30a15526b1a84c3f89b1e63e199f583b9 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 5 Feb 2025 11:01:32 +0100 Subject: [PATCH 007/372] Done C unit test; To do CPP unit test --- no-pdi/CMakeLists.txt | 2 +- no-pdi/include/pdi.h | 82 ++++----------------------- no-pdi/no-pdi.cmake | 2 + tests/CMakeLists.txt | 20 ++++++- tests/test_07_no-pdi.c | 119 +++++++++++++++++++++++++++++++++++++++ tests/test_07_no-pdi.yml | 80 ++++++++++++++++++++++++++ 6 files changed, 233 insertions(+), 72 deletions(-) create mode 100644 tests/test_07_no-pdi.c create mode 100644 tests/test_07_no-pdi.yml diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index a51ae0c8d..e261dac91 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -28,7 +28,7 @@ #============================================================================= cmake_minimum_required(VERSION 3.16...3.29) -project(PDI LANGUAGES CXX C) +project(PDI LANGUAGES C CXX) # list(APPEND CMAKE_MODULE_PATH "${PDI_SOURCE_DIR}/cmake") include(no-pdi.cmake) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index e52aad70e..e3235eb09 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -55,8 +55,7 @@ #ifndef PDI_H_ #define PDI_H_ -#include - +struct PC_tree_t; #define PDI_EXPORT __attribute__((visibility("default"))) @@ -133,13 +132,8 @@ extern const PDI_errhandler_t PDI_EXPORT PDI_NULL_HANDLER; const char PDI_EXPORT * PDI_errmsg(void){}; /** Sets the error handler to use - * - * PDI_asserthandler is the default handler before this function is called - * - * \param handler the new handler to set - * \return the previous handler */ -PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t handler){}; +PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t){}; /// \} @@ -151,11 +145,8 @@ PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t handler){}; */ /** Initializes PDI - * \param[in] conf the configuration - * \return an error status */ -PDI_status_t PDI_EXPORT PDI_init(PC_tree_t conf){}; -// PDI_status_t PDI_EXPORT PDI_init(void* conf){}; +PDI_status_t PDI_EXPORT PDI_init(PC_tree_t){return PDI_OK;}; /** Finalizes PDI * \return an error status @@ -163,13 +154,8 @@ PDI_status_t PDI_EXPORT PDI_init(PC_tree_t conf){}; PDI_status_t PDI_EXPORT PDI_finalize(void){return PDI_OK;}; /** Checks PDI API version - * - * \param[out] provided version if non-null it is filled with the provided API version - * \param[in] expected if non-zero the expected API version - * \return an error status if the expected version is incompatible with the - * provided one */ -PDI_status_t PDI_EXPORT PDI_version(unsigned long* provided, unsigned long expected){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_version(unsigned long*, unsigned long){return PDI_OK;}; /// \} @@ -194,79 +180,37 @@ typedef enum PDI_inout_e { /** Shares some data with PDI. The user code should not modify it before * a call to either PDI_release or PDI_reclaim. - * \param[in] name the data name - * \param[in,out] data the accessed data - * \param[in] access whether the data can be accessed for read or write - * by PDI - * \return an error status - * \pre the user code owns the data buffer - * \post ownership of the data buffer is shared between PDI and the user code - * - * the access parameter is a binary OR of PDI_IN & PDI_OUT. - * * PDI_IN means PDI can set the buffer content - * * PDI_OUT means the buffer contains data that can be accessed by PDI */ -PDI_status_t PDI_EXPORT PDI_share(const char* name, void* data, PDI_inout_t access){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_share(const char*, void*, PDI_inout_t){return PDI_OK;}; /** Requests for PDI to access a data buffer. - * \param[in] name the data name - * \param[in,out] buffer a pointer to the accessed data buffer - * \param[in] inout the access properties (PDI_IN, PDI_OUT, PDI_INOUT) - * \return an error status - * \pre PDI owns the data buffer - * \post ownership of the data buffer is shared between PDI and the user code */ -PDI_status_t PDI_EXPORT PDI_access(const char* name, void** buffer, PDI_inout_t inout){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_access(const char*, void**, PDI_inout_t){return PDI_OK;}; /** Releases ownership of a data shared with PDI. PDI is then responsible to * free the associated memory whenever necessary. - * \param[in] name name of the data to release - * \return an error status - * \pre ownership of the data buffer is shared between PDI and the user code - * \pre PDI owns the data buffer */ -PDI_status_t PDI_EXPORT PDI_release(const char* name){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_release(const char*){return PDI_OK;}; /** Reclaims ownership of a data buffer shared with PDI. PDI does not manage * the buffer memory anymore. - * \param[in] name name of the data to reclaim - * \return an error status - * \pre ownership of the data buffer is shared between PDI and the user code - * \post the user code owns the data buffer */ -PDI_status_t PDI_EXPORT PDI_reclaim(const char* name){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_reclaim(const char*){return PDI_OK;}; /** Triggers a PDI "event" - * \param[in] event the event name - * \return an error status */ -PDI_status_t PDI_EXPORT PDI_event(const char* event){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_event(const char*){return PDI_OK;}; /** Shortly exposes some data to PDI. Equivalent to PDI_share + PDI_reclaim. - * \param[in] name the data name - * \param[in] data the exposed data - * \param[in] access whether the data can be accessed for read or write - * by PDI - * \return an error status */ -PDI_status_t PDI_EXPORT PDI_expose(const char* name, void* data, PDI_inout_t access){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_expose(const char*, void*, PDI_inout_t){return PDI_OK;}; /** Performs multiple exposes at once. All the data is shared in order they were specified * and reclaimed in reversed order after an event is triggered. * * NULL argument indicates an end of the list. - * - * \param[in] event_name the name of the event that will be triggered when - * all data become available - * \param[in] name the data name - * \param[in] data the exposed data - * \param[in] access whether the data can be accessed for read or write by PDI - * \param[in] ... (additional arguments) additional list of data to expose, - * each should contain name, data and access, NULL argument - * inidactes an end of the list. - * \return an error status */ -PDI_status_t PDI_EXPORT PDI_multi_expose(const char* event_name, const char* name, void* data, PDI_inout_t access, ...){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_multi_expose(const char*, const char*, void*, PDI_inout_t, ...){return PDI_OK;}; #ifdef PDI_WITH_DEPRECATED @@ -280,11 +224,9 @@ PDI_status_t PDI_EXPORT PDI_multi_expose(const char* event_name, const char* nam * \see PDI_expose the function used to expose data inside the transaction * \see PDI_transaction_end the function used to end the transaction * - * \param[in] name the name of the transaction (an event thus named will be - * triggered when all data become available) * \return an error status */ -PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char* name){return PDI_OK;}; +PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char*){return PDI_OK;}; /** Ends the previously opened transaction. * diff --git a/no-pdi/no-pdi.cmake b/no-pdi/no-pdi.cmake index ab6ad4242..91a83735f 100644 --- a/no-pdi/no-pdi.cmake +++ b/no-pdi/no-pdi.cmake @@ -27,6 +27,8 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= +project(PDI LANGUAGES C CXX) + add_library(PDI_C INTERFACE) add_library(PDI::pdi ALIAS PDI_C) add_library(PDI::PDI_C ALIAS PDI_C) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d2ffa0329..8c95d9c41 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -24,8 +24,11 @@ #============================================================================= cmake_minimum_required(VERSION 3.16...3.29) -project(pdi_tests LANGUAGES C) +project(pdi_tests LANGUAGES C CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +#list(APPEND CMAKE_MODULE_PATH "/local/home/ja281254/.local/share/paraconf/cmake") + +message("CMAKE_MODULE_PATH=" ${CMAKE_MODULE_PATH}) set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") @@ -44,6 +47,21 @@ if(WITHOUT_PDI) add_executable(test_07_no-pdi_C test_07_no-pdi.c) target_link_libraries(test_07_no-pdi_C paraconf::paraconf PDI::PDI_C) add_test(NAME test_07_no-pdi_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_no-pdi.yml") + + add_executable(test_07_no-pdi_CXX test_07_no-pdi.cpp) + # set_target_properties(test_07_no-pdi_CXX PROPERTIES CXX_STANDARD 11) + # set_target_properties(test_07_no-pdi_CXX PROPERTIES LANGUAGE CXX) + # set_target_properties(test_07_no-pdi_CXX PROPERTIES LINKER_LANGUAGE CXX) + + set(BUILD_FLAGS_FOR_CXX "-Wall") + target_compile_options(test_07_no-pdi_CXX PRIVATE + $<$:${BUILD_FLAGS_FOR_CXX}>) + + target_link_libraries(test_07_no-pdi_CXX paraconf::paraconf PDI::PDI_C) + add_test(NAME test_07_no-pdi_CXX COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_no-pdi.yml") + + + else() # PDI find_package(PDI REQUIRED COMPONENTS C) diff --git a/tests/test_07_no-pdi.c b/tests/test_07_no-pdi.c new file mode 100644 index 000000000..8b6438876 --- /dev/null +++ b/tests/test_07_no-pdi.c @@ -0,0 +1,119 @@ +/******************************************************************************* + * Copyright (C) 2020 Institute of Bioorganic Chemistry Polish Academy of Science (PSNC) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of CEA nor the names of its contributors may be used to + * endorse or promote products derived from this software without specific + * prior written permission. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + ******************************************************************************/ + +#include + +#include +#include + +// #include "test.h" + +void share() +{ + int to_share[2] = {1, 1}; + assert(PDI_OK == PDI_share("to_share", to_share, PDI_OUT)); +} + +void access() //access +{ + int to_access[2] = {1, 1}; + assert(PDI_OK == PDI_access("to_access", (void **)&to_access, PDI_IN)); +} + +void release() //access/release +{ + int to_release[2] = {1, 1}; + PDI_access("to_access", (void **)&to_release, PDI_IN); + assert(PDI_OK == PDI_release("to_release")); +} + +void reclaim() //share/reclaim +{ + int to_reclaim[2] = {1, 1}; + PDI_share("to_release", to_reclaim, PDI_OUT); + assert(PDI_OK == PDI_reclaim("to_reclaim")); +} + +void event() +{ + int to_event[2] = {1, 1}; + assert(PDI_OK == PDI_event("event_one")); +} + +void expose() +{ + int to_expose[2] = {1, 1}; + assert(PDI_OK == PDI_expose("to_expose", to_expose, PDI_OUT)); +} + +void multi_expose() +{ + int to_multi_expose[2] = {1, 1}; + int to_multi_expose_two[2] = {2, 2}; + assert(PDI_OK == PDI_multi_expose("event_two", + "to_multi_expose", &to_multi_expose, PDI_OUT, + "to_multi_expose_two", to_multi_expose_two, PDI_OUT, + NULL)); +} + +void mock_errfunc(PDI_status_t status, const char* message, void* context){} + +void errhandler() +{ + PDI_errhandler_t new_handler = {mock_errfunc, NULL}; + PDI_errhandler_t current_handler = PDI_errhandler(new_handler); + assert(current_handler.func == mock_errfunc && current_handler.context == NULL); +} + +// #ifdef __cplusplus +// #include +// #endif + +int main(int argc, char* argv[]) +{ +// #ifdef __cplusplus +// std::cout << "C++" << std::endl; +// #else +// printf("C\n"); +// #endif + + PC_tree_t t; + t.status; + + assert(PDI_OK == PDI_init(PC_parse_path(argv[1]))); + + assert(NULL == PDI_errmsg()); + errhandler(); + + share(); + access(); + release(); + reclaim(); + event(); + expose(); + multi_expose(); + + assert(PDI_OK == PDI_finalize()); + return 0; +} diff --git a/tests/test_07_no-pdi.yml b/tests/test_07_no-pdi.yml new file mode 100644 index 000000000..035ba3cb3 --- /dev/null +++ b/tests/test_07_no-pdi.yml @@ -0,0 +1,80 @@ +.types: + - &Subregion + type: record + buffersize: 56 + members: + ix: {disp: 0, type: int} + iy: {disp: 4, type: int} + iz: {disp: 8, type: int} + nx: {disp: 12, type: int} + ny: {disp: 16, type: int} + nz: {disp: 20, type: int} + sx: {disp: 24, type: int} + sy: {disp: 28, type: int} + sz: {disp: 32, type: int} + rx: {disp: 36, type: int} + ry: {disp: 40, type: int} + rz: {disp: 44, type: int} + level: {disp: 48, type: int} + process: {disp: 52, type: int} + - &SubregionArray + type: record + buffersize: 16 + members: + subregions: + disp: 0 + type: pointer + subtype: + type: array + size: 64 + subtype: + type: pointer + subtype: *Subregion + size: + disp: 8 + type: int + - &Grid + type: record + buffersize: 32 + members: + subgrids: + disp: 0 + type: pointer + subtype: + type: array + size: 32 + subtype: *SubregionArray + all_subgrids: + disp: 8 + type: pointer + subtype: + type: array + size: 32 + subtype: *SubregionArray + neighbors: + disp: 16 + type: pointer + subtype: + type: array + size: 32 + subtype: *SubregionArray + size: + disp: 24 + type: int + +logging: trace +metadata: + input: int +data: + grid_data: *Grid +plugins: + serialize: + grid_data: grid_data_serialized + decl_hdf5: + - file: serialize_test_08.h5 + when: $input=0 + write: [grid_data_serialized] + - file: serialize_test_08.h5 + when: $input=1 + read: [grid_data_serialized] + From 81519f826ae23d4895683a994586ae12d1c87aaa Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 6 Feb 2025 09:40:54 +0100 Subject: [PATCH 008/372] Done CPP unit test; To do Add PDI-config.cmake and check for conflict on forward declaration of Paraconf --- no-pdi/CMakeLists.txt | 140 +------------------ no-pdi/include/pdi.h | 18 ++- no-pdi/no-pdi.cmake | 2 +- tests/CMakeLists.txt | 36 ++--- tests/test_07_main.c | 41 ++++++ tests/test_07_main.cpp | 41 ++++++ tests/test_07_main_C | Bin 0 -> 24216 bytes tests/test_07_main_CXX | Bin 0 -> 40848 bytes tests/{test_07_no-pdi.c => test_07_no-pdi.h} | 23 +-- 9 files changed, 120 insertions(+), 181 deletions(-) create mode 100644 tests/test_07_main.c create mode 100644 tests/test_07_main.cpp create mode 100755 tests/test_07_main_C create mode 100755 tests/test_07_main_CXX rename tests/{test_07_no-pdi.c => test_07_no-pdi.h} (87%) diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index e261dac91..8ef8f2d86 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (C) 2015-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) # # All rights reserved. # @@ -29,141 +29,5 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES C CXX) -# list(APPEND CMAKE_MODULE_PATH "${PDI_SOURCE_DIR}/cmake") -include(no-pdi.cmake) - -# add_library(PDI_C INTERFACE) -# add_library(PDI::pdi ALIAS PDI_C) -# add_library(PDI::PDI_C ALIAS PDI_C) - -# # target_include_directories(PDI_C -# # INTERFACE "$" "$" -# # INTERFACE "$") - -# # set_property(TARGET PDI_C PROPERTY LIBRARY_OUTPUT_NAME "pdi") - -# # add_library(PDI::pdi INTERFACE) -# # add_library(no-pdi INTERFACE) -# # add_library(PDI::pdi ALIAS PDI_C) -# target_include_directories(PDI_C INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) -# # target_include_directories(PDI::pdi INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) -# # include_directories(PDI::pdi INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) -# # include_directories(no-pdi INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) - -# Version - -# string(STRIP "${PDI_VERSION}" PDI_VERSION) -# string(REGEX MATCH "([0-9A-Za-z]+)\\.([0-9A-Za-z]+)\\.([0-9A-Za-z]+)(-([0-9A-Za-z]+))?" "\\1;\\2;\\3" "${PDI_VERSION}") -# set(PDI_VERSION_MAJOR "${CMAKE_MATCH_1}") -# set(PDI_VERSION_MINOR "${CMAKE_MATCH_2}") -# set(PDI_VERSION_PATCH "${CMAKE_MATCH_3}") -# set(PDI_VERSION_MODIF "${CMAKE_MATCH_5}") -# if("git" STREQUAL "${PDI_VERSION_MODIF}" OR "alpha" STREQUAL "${PDI_VERSION_MODIF}") -# execute_process(COMMAND "${PDI_SOURCE_DIR}/cmake/version-uid" "${PDI_VERSION_MODIF}" WORKING_DIRECTORY "${PDI_SOURCE_DIR}" OUTPUT_VARIABLE PDI_VERSION_MODIF OUTPUT_STRIP_TRAILING_WHITESPACE) -# endif() -# set(PDI_VERSION "${PDI_VERSION_MAJOR}.${PDI_VERSION_MINOR}.${PDI_VERSION_PATCH}") -# set(PDI_VERSION "${PDI_VERSION}${PDI_VERSION_MODIF}") - -# # A little compatibility macro - -# if("${CMAKE_VERSION}" VERSION_LESS "3.12") -# set(LIBRARY_COMPONENT "COMPONENT" "Runtime") -# else() -# set(LIBRARY_COMPONENT "COMPONENT" "Runtime" "NAMELINK_COMPONENT" "Development") -# endif() - - -# Includes - -# include(CTest) -# include(CMakePackageConfigHelpers) -# include(GenerateExportHeader) -# # # set(_REAL_PROJECT_NAME "${PROJECT_NAME}") -# # # set(PROJECT_NAME pdi) -# # # # include(GNUInstallDirs) -# # # set(PROJECT_NAME "${_REAL_PROJECT_NAME}") -# # # set(INSTALL_PDIDATADIR "${CMAKE_INSTALL_DATADIR}/pdi" CACHE PATH "PDI data directory (DATADIR/pdi)") -# # # set(INSTALL_CMAKEDIR "${INSTALL_PDIDATADIR}/cmake" CACHE PATH "cmake modules (PDIDATADIR/cmake)") -# # # set(INSTALL_PDIPLUGINDIR "${CMAKE_INSTALL_LIBDIR}/pdi/plugins_${PDI_VERSION}" CACHE PATH "cmake modules (LIBDIR/pdi/plugins_${PDI_VERSION})") - - -# # # # Check for some portability stuff and generate config.h - -# # # if(IS_ABSOLUTE "${INSTALL_PDIPLUGINDIR}") -# # # set(PDI_DEFAULT_PLUGIN_PATH "${INSTALL_PDIPLUGINDIR}") -# # # else() -# # # file(RELATIVE_PATH PDI_DEFAULT_PLUGIN_PATH "/${CMAKE_INSTALL_LIBDIR}" "/${INSTALL_PDIPLUGINDIR}" ) -# # # endif() - -# add_library(PDI_C INTERFACE) -# generate_export_header(PDI_C BASE_NAME pdi EXPORT_FILE_NAME no-pdi/export.h) -# target_include_directories(PDI_C -# INTERFACE "$" "$" -# INTERFACE "$") -# target_link_libraries(PDI_C -# INTERFACE paraconf::paraconf ${CMAKE_DL_LIBS} -# INTERFACE spdlog::spdlog) -# target_compile_features(PDI_C INTERFACE cxx_std_17 c_std_11) -# set_property(TARGET PDI_C PROPERTY LIBRARY_OUTPUT_NAME "pdi") -# set_property(TARGET PDI_C PROPERTY ENABLE_EXPORTS TRUE) -# set_property(TARGET PDI_C PROPERTY C_VISIBILITY_PRESET hidden) -# set_property(TARGET PDI_C PROPERTY CXX_VISIBILITY_PRESET hidden) -# set_property(TARGET PDI_C PROPERTY POSITION_INDEPENDENT_CODE ON) -# set_property(TARGET PDI_C PROPERTY VERSION ${PDI_VERSION}) -# set_property(TARGET PDI_C PROPERTY SOVERSION ${PDI_VERSION_MAJOR}) -# set_property(TARGET PDI_C PROPERTY PDI_MAJOR_VERSION ${PDI_VERSION_MAJOR}) -# set_property(TARGET PDI_C APPEND PROPERTY COMPATIBLE_INTERFACE_STRING PDI_MAJOR_VERSION) -# add_library(PDI::pdi ALIAS PDI_C) -# add_library(PDI::PDI_C ALIAS PDI_C) -# install(TARGETS PDI_C EXPORT PDI_C_EXPORT -# LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ${LIBRARY_COMPONENT} -# ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Development -# INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -# ) -# install(FILES -# "${PDI_SOURCE_DIR}/../no-pdi/include/pdi.h" -# DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -# COMPONENT Development -# ) -# install(FILES -# "${PDI_BINARY_DIR}/no-pdi/export.h" -# "${PDI_BINARY_DIR}/no-pdi/version.h" -# DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/no-pdi" -# COMPONENT Development -# ) -# install(EXPORT PDI_C_EXPORT NAMESPACE "PDI::" DESTINATION "${INSTALL_CMAKEDIR}" FILE "PDI_C.cmake") - -# add_executable(pdirun IMPORTED) -# add_executable(PDI::pdirun IMPORTED) -# set_target_properties(pdirun PDI::pdirun PROPERTIES IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/pdirun_intree") - - -# # Installable config - -# # configure_file(scripts/env.sh.in env.sh @ONLY) -# # configure_file(scripts/env.xsh env.bash @ONLY) -# # configure_file(scripts/env.xsh env.zsh @ONLY) -# # install(FILES -# # "${PDI_BINARY_DIR}/env.bash" -# # "${PDI_BINARY_DIR}/env.sh" -# # "${PDI_BINARY_DIR}/env.zsh" -# # DESTINATION "${INSTALL_PDIDATADIR}" -# # COMPONENT Runtime -# # ) - - -# configure_file(cmake/PDIConfig.cmake.in PDIConfig.cmake @ONLY) -# write_basic_package_version_file("${PDI_BINARY_DIR}/PDIConfigVersion.cmake" -# VERSION "${PDI_VERSION}" -# COMPATIBILITY AnyNewerVersion -# ) -# install(FILES -# cmake/CMakeFindDependencyMacro.cmake -# cmake/FindPackageHandleStandardArgs.cmake -# cmake/FindPackageMessage.cmake -# "${PDI_BINARY_DIR}/PDIConfig.cmake" -# "${PDI_BINARY_DIR}/PDIConfigVersion.cmake" -# DESTINATION "${INSTALL_CMAKEDIR}" -# COMPONENT Development -# ) +include(no-pdi.cmake) \ No newline at end of file diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index e3235eb09..f35479936 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (C) 2015-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) +* Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,13 +49,13 @@ * PDI_status_t and an error message can be retrieved with the PDI_errmsg * function. This default behavior can be changed by replacing the error handler * with the PDI_errhandler function. - * + * */ #ifndef PDI_H_ #define PDI_H_ -struct PC_tree_t; +// struct PC_tree_t; #define PDI_EXPORT __attribute__((visibility("default"))) @@ -129,11 +129,19 @@ extern const PDI_errhandler_t PDI_EXPORT PDI_NULL_HANDLER; /** Return a human-readabe message describing the last error that occured in PDI */ -const char PDI_EXPORT * PDI_errmsg(void){}; +const char PDI_EXPORT * PDI_errmsg(void){return 0;}; + +/** A mock error function used as a default error handler. + * This function does nothing and is used to provide a default + * behavior, as no error handler is set in the following function. + */ +void mock_errfunc(PDI_status_t, const char*, void*){} /** Sets the error handler to use */ -PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t){}; +PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t){ + PDI_errhandler_t new_handler = {mock_errfunc, 0}; + return new_handler;}; /// \} diff --git a/no-pdi/no-pdi.cmake b/no-pdi/no-pdi.cmake index 91a83735f..a98c6f319 100644 --- a/no-pdi/no-pdi.cmake +++ b/no-pdi/no-pdi.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (C) 2015-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) # # All rights reserved. # diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8c95d9c41..c815c0c42 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,6 +1,6 @@ #============================================================================= # Copyright (C) 2020 Institute of Bioorganic Chemistry Polish Academy of Science (PSNC) -# Copyright (C) 2020-2024 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# Copyright (C) 2020-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -40,30 +40,31 @@ option(WITHOUT_PDI "Disable PDI" OFF) include(CTest) if(WITHOUT_PDI) + find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - message(WARNING "PDI is disabled for unit testing.") + message(WARNING "PDI is disabled for unit testing (use test 07 for no pdi).") include(${CMAKE_SOURCE_DIR}/../no-pdi/no-pdi.cmake) + include_directories(${CMAKE_SOURCE_DIR}) - add_executable(test_07_no-pdi_C test_07_no-pdi.c) - target_link_libraries(test_07_no-pdi_C paraconf::paraconf PDI::PDI_C) - add_test(NAME test_07_no-pdi_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_no-pdi.yml") - - add_executable(test_07_no-pdi_CXX test_07_no-pdi.cpp) - # set_target_properties(test_07_no-pdi_CXX PROPERTIES CXX_STANDARD 11) - # set_target_properties(test_07_no-pdi_CXX PROPERTIES LANGUAGE CXX) - # set_target_properties(test_07_no-pdi_CXX PROPERTIES LINKER_LANGUAGE CXX) + add_executable(test_07_main_C test_07_main.c) + set(BUILD_FLAGS_FOR_C "-Wall") + target_compile_options(test_07_main_C PRIVATE + $<$:${BUILD_FLAGS_FOR_C}>) + target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) + add_test(NAME test_07_main_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_main.yml") + add_executable(test_07_main_CXX test_07_main.cpp) set(BUILD_FLAGS_FOR_CXX "-Wall") - target_compile_options(test_07_no-pdi_CXX PRIVATE + target_compile_options(test_07_main_CXX PRIVATE $<$:${BUILD_FLAGS_FOR_CXX}>) - - target_link_libraries(test_07_no-pdi_CXX paraconf::paraconf PDI::PDI_C) - add_test(NAME test_07_no-pdi_CXX COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_no-pdi.yml") - - + set_target_properties(test_07_main_CXX PROPERTIES CXX_STANDARD 11) + set_target_properties(test_07_main_CXX PROPERTIES LANGUAGE CXX) + set_target_properties(test_07_main_CXX PROPERTIES LINKER_LANGUAGE CXX) + target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) + add_test(NAME test_07_main_CXX COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_main.yml") else() - # PDI + find_package(PDI REQUIRED COMPONENTS C) if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") @@ -92,4 +93,5 @@ else() add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_05.yml") endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") + endif() diff --git a/tests/test_07_main.c b/tests/test_07_main.c new file mode 100644 index 000000000..e97b584d4 --- /dev/null +++ b/tests/test_07_main.c @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of CEA nor the names of its contributors may be used to + * endorse or promote products derived from this software without specific + * prior written permission. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + ******************************************************************************/ + +#include + +#ifdef __cplusplus +#include +#endif + +int main(int argc, char* argv[]) +{ + #ifdef __cplusplus + std::cout << "C++" << std::endl; + #else + printf("C\n"); + #endif + + assert(tests(argc, argv) == 0); + printf("Disabled PDI ok for C.\n"); +} \ No newline at end of file diff --git a/tests/test_07_main.cpp b/tests/test_07_main.cpp new file mode 100644 index 000000000..84370d925 --- /dev/null +++ b/tests/test_07_main.cpp @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of CEA nor the names of its contributors may be used to + * endorse or promote products derived from this software without specific + * prior written permission. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + ******************************************************************************/ + +#include + +#ifdef __cplusplus +#include +#endif + +int main(int argc, char* argv[]) +{ + #ifdef __cplusplus + std::cout << "C++" << std::endl; + #else + printf("C\n"); + #endif + + assert(tests(argc, argv) == 0); + printf("Disabled PDI ok for C++.\n"); +} \ No newline at end of file diff --git a/tests/test_07_main_C b/tests/test_07_main_C new file mode 100755 index 0000000000000000000000000000000000000000..8e1f7bea1da18460af9b3d41ba795965576f4e2b GIT binary patch literal 24216 zcmeHPdwf*Yoj>>9xygjQ2ErqNk_jLtN+tvXA~uqkOqgg$A|y4abTTB9WF(nM=fT4j zO2t>I*+N}i+tQXk*4j_)uGVhXVr_$3(bigQKPuhU7G3=qR>XkTvh|Vu{?21^=Q5$X z-9L6epPYQ={?7Tm&hPxrYGA&Uue^c%JROhvc6C_v8`;|$`xfRDm}4?XDO$XU2goSO|5Ba zV^A|pIO#^F?-FUHk7&~+o%qkY(6>IZamQPmzq(|_6-P?{^v*ZmE+HPWn`DTG0_l?` z@-)S%sS=Oy$7gwha8vMmF8FN!tpB|FB%*1Y4E#&OUHlP1o+Mg@aF>W z#?KxW1L3wKk*>!tUB0cr&rieuMb7VH-!2fuTNRJLp>?glD;N#-gktevv~_K5UnCrC z4Q%QQGQYp4KN9xG;(=(~?`NDfEn`cqe;^Qz1@VmcLacLJz~3DT2l_(Sla@d%7KDcG zK&THXw46?CGW~^ULM)Oe=Gk^NHz;Wjy5DSU^- zJF5j<;Z^#`YJsP=tZXC9Q48MM{zoi$(f)<}s0A-y0i1B!f|o-)$3HCb#H;!&5r!>z z>W?ZsWx@0Jh$I}g;8od_%p{!jz@!HzJuvBkNe@hVVA2Es7d`NH{=C2Vb{}{8Za05h z&Y17!;kZ6_*th!$=i}VmvE?@ceQNBy-2nMTjQD$ra_ZR2V`F1`c$y||r;a_BOw)wz z)UkufG)=Hh9eYrvp=}4(R>!zLq|0pS^K9vJZRr`-bj6zugU@}+H~5Ng_p75Vt=@{^ zil==;RnK5B89Q{<0r1(6iBLGEF)ZsX%B zIk@9}-(X_YH`q3^XB_JrJnb7i=^OmHZ_s;`XejT`p#;fM-y!d5(&4)u@!Q)@k4xE9 z+mgP)9Z;GWod7-9cKl;e(lCEC6xom_v)#wreS?qscp?9_nuEJm0t^mS;@LQO^8g1! z+W>AFj=S?qy}R;D*Y3$LZQGw;y77Vh(%^7@Y5(E;(!|mH(jB6hPbdA1KH}=~-R?NA zgj_f1JzX(;$U906|B&|`0=^;d=mBc@zQHHq?fY{mc4*{zR4y7;2~ab!*76M=JW$NJ z%`b5d;yo;RT_2!Bp;}IN`7RV0#m$j7-X9zLxMpyBxEc3J)xG0p+?6lPIA54ikThdZ z@(v=$GtB7vo6IPds$WJ4QQ%L>oU(&dEGmt4RcAwD=MnpF_ zF2E=`7@dOqd8lm^9b@D=cAbtfx^c){g}iI7b41Rn!N7Qt$~gIv<` zd};X_VR;7@@}e5%Ny}gOuQZlF2xO||$mR(YhYyN}yd%(tQLybOy4;9w@I|N`c|?$D zJUz_^$e|fuAk@W&6Is+V=_NsZd5E{lg9ok@7Cnolzp!Ybw5X0OO38i6;Evy8>^f|7 zAGG3iJB$~w3!Xaa8+?I=jTsQ9*Ya3mbSyD4mN+_c6`8U73AZ$0mNej#!hp3&1K!}( zdT8YF(|D^KA~jOtHE!9#1MNa$Zc^e^DX|w4!u?NSv=FfmkgJGYkM<~He@@1BqnZRR zA1zzNu1Ln7LTuz;V1YECOBz61gmB@P@OlpA3^8nDoG;2PQo*>4E>}9?<0JVm#uH^#-CrRh;t3K)gH}9Eik1@klfjjFrcO zv3M(fEp-j$16?7W7Fhq1i~Qk88IYb{B@Zrt^A+x@DmTTr>XP{?llhC?D!Q1{o7-AT z8Bp?23`$bv1)eJqQD`XH5(#y=FSwv|QBqJSYiQ!SqQSmkAf^hGs!!6mLK&Ygg*y8J zp?-V*(I7`lejW#Za7!>8_ea8%N2-2KDVd*S5Xytw;7)0fjh|Dvdch<-B;u(q>QD5= zLw-T=$G1kvZC0GLiYOFP^RY52^T3JRsBWxOpvbRQRML(!xycY=vQ>bv7NMrL#>P@^ z6ds+4Xq3Fy8whvx1*4wsM7Wb$OMe81q`_#Erxz`9+xc)%8V_!Z6D#Snl`j+y#Y<8S zYfA#ro-Nl@Y%DEh#IG78a_Eosl$6@!)tN2`wZhVm+Yji(*VD z3V0bH-9Om?xCAf;*aA2NH~_dGa1Y=^fDZsZ33wRrDBvhy^;?j~p5P(CC4fz%kOzDf zZ~*Z7laL1-27CZ;%_+zOYHvdx@H2oe2V=i@2l9Xv=xzlC?fP|0+vd{d=43jl41}jU zL`U8j8(TySb(#Fgdm*Bg__={^A$*>zKCkfd{OqmHU2OH7RTnH? z?;och2fpzv`g2h3OU^=H4EhD2&$8-o8rR3yKjJq!H~&}V?ouVSe3 zUp_8>Kj_Z0(4PVQJ@|DZ`QxCU0DU6+a?r*`K<}{HuV2LtApb80y#)E+nnK^1q&I^8 z`LodbKz|qXyHn(clJa+e-iN+35&eG9Uje<|D!*ggKhJ>fL|>W6zT==rKtEuW*B?yg zpMySUreOP_Xz_DHyI{9FzJCw4@`RC zZ}xz?H>d8&(U44GKYwCABjJM*(mhHFzZZbzNT@FIVW*r2_iOfX0q;SxC+t(LGw!Vc>s)h=|Fw6j_e*VNXo za+kDiN`&JHcSVJ#(zB$jBEgdtJC`o?EU7G&Xto#(vmG@nO(0MM!-Q*(yE0?y3@baMl$F5d@%efYUZzs5|iz?u0=C~#blwr#e|+6qd+ zRVa+pT>m@7GyVe>nQd7l$}(;trmJ|u!5jl%Guw?HkVrk)T;?@-P?hmAvNShNqd3dB zf#m%>;bi80Ksl}kJogZ=nGP=b13j+-W@tLk=?kPry9+$J_AoRUZ2AfC{zNxSFil^E$3gv^27sC8 z=-;v*pspQ=ydJSYUMZ(9X z{}c>Q=($v{GtUQ`^N{YMIe7Nw;CA-3E-G9v2Idzc;b7BOg6|pK_!f{;3xB6)Wl>(l z@{&G>*S3BOIR2GP?23)wukc|5Gpeavd5&%rp0c$Y?8g7zt;_Jw$HLCx@YT{~hsN zZG3>#H1b9VW#=0NkG2}Bnf7yvYHJbIwQJxSL%Wjauj6TIH|}YZn%xAHfPzPFKQrnk-&nN{=5O2L+8{6=NQ^C2A1$7Fe=Cilmv^|deaJtD^V zQl4jV1Id0L552j7szcw~l9dln>Mb)xQk3ToVl$pf$%1e^izzIR)a0HIjkV{?EDj(+ zLEHC7k{u!4-i$kd(f77zO@}ply-bQM-Xb>R;gl>0$Fs;`d88(H6G z%bbvXoSMPv6rHt%H~u+AC*iox43*><<(MWeNyK(&@Aq~PbtY=4;w0;pwR+> zZ^{5_`~Hpc8lqw@OR?b);f?)DoYxNFxDA;skK}S!Ld6B1GjwL-YD(7k$XAQg=)6bi z%zX?Ea-scym9%}AlXwG}v?xVfxaIbw_yLq?p4;}XPTIaf62Ay;*WD@NqP^X$#HUc? zrPw9~-FghBS)%RY@rtCru{+dhPDJ5lDU_hlsl1*tw9?x>lU1xB9DuuHW z`994#`_JIKErs(ZaQ+jVbNv~1KW5=HC}FkRBri<)Axs+P;uoJGu3^11aj^#>elM4t zFD2D-20el#=|K*oNhvaBCPijvqCI_sYO6p>fjHG@LW7I;c{#Xrum#nW)8{fCmQr%KfYb?+BD*lA%0hR@ zx^8E)Uqv0?L=8#J?#HcWS_w1q&Y{BQBC@L3yu`dXyP;quDKuF_fsSF^F_TEymt+$K zBXT~=E_PBZgUd()iDWKh+1Zz78yK0Ll@MwusGLn2vM8Z65Mqi)TRofd(@5+2vl|Mg zYSS{S3$LH8L2ownI#X=PAzRSdm6#5(;tU~k1DDBL#5wXct)YN)xQdZ3hfPxpwCrrD zj0n>lnvr*Dab|Y0qoIJ?RGdfnf&$>dNyRC45oS6sw{i*IC#J0wGo^@NA(2_*UM%L$ zDwGy;t>$<^h0(J;Y}^gSv&YHTW4B<=RPDUHf^4H`ZV?sKg%&zj`WNHgIj9Ac?p$7) z>}+HP%Tae^#k^TmfflnpifvuZh_P zP4YBNdoM4S09qT?aTF^;{}jOwK>rx}7=FLPPuGg{d}j+{+J}^U8xKZFOxe)#a`A9X z$HS!cl*24#S-NVx#%@hBD{eHGwVRcd=5nXUtg1E(oV(2|XSq4!Msu-|>oF^DG%sm4 zFI;9WyU|?LZq_a}uQ+9{L&TWlF|U9O;@+j^TEtr0&5C8_#Rtr4OQd|MdC>v$(sr|M zso4mo_3h@h%gru*!!&bqyF)iM1#;JJT653m!2`;169YJ_TjQ9us#AU@OdAjWX%4iB#n@ zV5al$J@VYZ=WZKHp^_sTYJQ?1wE)LiFfU6Ia2KaRYG zmRRu9iD0-hh<^*--WT)-(_-TcXW0!+pR8$YsPnhftgBh;ZS}5W_}_4MZN)`$AI4qQ zA5VmXRXxFQFdFJaG7#xLFD&hoE|M1@=Hn;YxAb*WAyrPOE}*0wa-FIF(@ zD)>YF1AU>+kjRZV*SFTRqD2Pc0c(c!&Fj|Iv~nAXsim=PO+ynCew6JK|8E|MCfh7p zXFM8I1?7r2tZ((MTkWpx4{&}_44II^vLkom z))cJnN1Ke2ukam!ad+49_K!!azrMMxsg4X&<4$T*5IKl8xqToxAgDnDIgoqgurtmk z9dub^bL|!5SMrQeb0v8iCtMu^^l04GZRP)K2 zhQ^x9pk8{2t^)bH?R82zdE<)-O-;>~v4-249Daqdsh?@!y2X7g>LI)gaX6l5sxI9S z6SZm#z-?ZZ9FeHX@tp?T`yvK07|DvLY1&|~2Hx(H^%#TGFyM1ZaqUNR4vwJS#+{zb zin@RpEX0K#zrSUjx3zVHzrL-hwzZ+T37@UtwNuyJ2A8F6!<^0yvyQx|DUpAYtm;Cz zi<^DMz^2;GnS_*L=0w${XYRAbjI~}WdOotup4y+F;xcL+74Zw8#bS|c2 z&vDdtenfJFcgxiuk~}QKlkn=?QleP{A{tH=UDX0Z_EBiVPh&Ha=ZqYQ#|`+Ap8Yoc zw{iX%$#YA^|7}Fl+5bb%KaHtP4z&h&M&i}p3D&keydv>xO9pEj9!^WV+Wt{^+SAwY zMH;oMr1US8c(rAv^skb5wLPZJWm_a(?aW~@#Y4Bmt4%?r{|1RyJCj&#^Dt38@>3Mt zT3b>g87&~4-}ZC;vzYyy@jJj%Yf;~4Qfhw8`3sZhwF*z?b8-Vhp*W;nV0Q{eBxn&g z4fSr{RiINpH^Vx#I#p;$^4qul3OPQNmr|vY-@ehZT;lC}MD)EZvd6yRS_6I;>{0Dm z<>Vth`c$UQ*%iKt>sP697@7c2#}<^YeJ_~~mI!a(wj7jr`@Y$oz>}SRL&ZXQd0JR^KUJU2oYkrP&r5#$?$aNLA0<$kVDpKGHzohDw5LPj zKLp-|aig$WA|&{t;+NynB8guh>&w1}Y5-4q?Da)kMSL=MWNk!*G#Bbjr zyj$Y!TiO>$ynRd1Bk}gl+DeJH@5P;z<+bn1Uo7$VE$3S3p?a~Gw;6bMsw;Ua#PdCq zuod|EXQCM$^G(xna&LPte1Yq6v3q4bs-0i9zB3xH@I>gVSertAI*$b+7Eg3{<689i zcewoVet##X`dC%_{aq1%PhVtHpwHih6==*KNNmH*5sQ{!JlN$~lAeP;z!mZbqS3&1 zKbFk$ z=KA{e-d2ArO~N5z|Daj5`Y;(jL3XyUtEFtL&_~dcg7h6TnmVi95{j#3kw3_nrMz~L zH`WT4ucjq6kh?5jT}$FgGrxP!^^0u@v@a}lNmEp;J=OHy_W3umBDsQuP%I*6sazLd zZ2B9Tp{FYp_9tS&E{;#xS3*PVf@PaxF_|5|g-?ntyBBJa1+18XOS-zh@Au;)b*j4P z>vbRdlXNNW;M(PXo_J#0`?2xEJlNzBuvf*f(g;Qem?w;VAP=Uv9_$DW;H!4qEvQY2 z5I%?)>XN9M%Nnqa)WbM?FSd!8r)zr{SqK=93W};_&ZZU)prOVCBp_o0eR1aDUiKjB z>4_jokyx;kdFX#Wn1^~ixFfuUc!IsMkN0*#n@R~CqO%JL6-QQq{t%Q2aa0oXV3gr| za-Oc>rbG`o1K}PFNirDQ8dPgH|+ZKAL7A{g|k^;MefO@XJFX z##;&so+FaUC-GXt0wicIs^n>YLqWkMBAI-ud9Fgx*^pJ<{$0?8icv!KephH(2Uz9R zIz&OYVwBJ>e--fW;%=R?U)?`cP)%>uJlSr40P-}qR`N$=`4x0ZhmnmGRq}NBKp})5 zi75G_(m(~@Cnig<`~TCR(cM8MukH&fs7}$8{fbXPI`F5vh$>CjM<^&*%~Qh1R{JHI z4Ix4%D|vN4Qo&)#sPea${~x9NWs>i-WK^)jB2PZE%YPj>vPN~!6dsSM&laQskypmVlWA$BTmvjt`9~6|Fs{ii-N99-Y>VEV7a^hyJgFnX~N?ySX2wUY@wd7qQpvp&S zP;x4r17X6c{MGuvCFSk>l$SM3mHA8dBuU9%n8b*Pl2>q!l((_5OQb@(UL~jaODB-u zECsW%B(Vm&{PGFpw|qiK(TziEu*=s@Apg*%LMs2S$Tv%QdpRGg7V{RL@`bvPh^{kobx_%>FnvS$39nvN=Z9m?I zL79t4EtOV80V@KcpcVy0z&cQ55@iwrQPdZFL5m_*1my)@`~7}v?{lZ7hP9L|ola=^oDKlg8S{*6+$S0nj7-Ec z1gFyL6hNxFUa(T3PvdPs@)a>K3>>G>h6`N{3CVY&>y9jy;zA=&#mVPkP{-5Z*&`I4 z3*Gd1egTzkq`_x(fn1o(N88Msq4?%4N`C& z^RzwF;Y_6Qa$!1OkLF8<%N3j9LgvA%_0?F{f0AE|=Bu5cp^h0&4H&2`Oo!f4CmsXG|C?PB}^Qzr$bNnjlR~uOvR4BuK+6lc(l=W0(==V8jil|1o$NMUnc<(NJk<*{RH@{fFI5d`N*Jr7&$)RM;c>|x;mAZ zhqzq9#%_L#)3gZNQWhCSr!~< zAB=`@kM$VAjjgfTP=8l%V`pouy1KKceJ~gsY!Anxjh*%NYk`~9(H;$V1|!kfV5q&X zu`Sp(Gg#j`2U%=f(;Ax>jzoi?2-P$eF$(i^RBS+TY?(i*InJbI&zA5MN} z8>G(;wyf$LE`wz%1L)it8H%CMojclt-QoWB-tfn0gZ5}Ngz|T{hkFr2JM7dJ>1z-7 zYx4G3Xh%3^3=GAhz`$UgTZ5fFTNM*nV4e2PNPjmQY_$PIG}hHQZ5pF<80}P{l}(LH zm#tqPoK;zCNH|!N6q=Pl)>O_$mk{Y}@2%>I^o6R)cDh>NcsOX-HukcNLrkNdtlNj6-1H~!;O6`p;M z+vgDTbP}F@lzY99glGTeUN0r#9Ty3BBnj_N!XHh-!yxhNog{ot9Bahe9s6f@EMW2# zn%;}BHW|^zz9hWchZBEo5?NXQgx6CSVL6HvI^6IPaKX}$DVH3^^osD zk$r6TTA<%NHn9~Tx6~kg4^!TJ?d4;~j_s2;2hulR`&m5B3Ba4LJrIv`Kz;MIJL7Rq z1m1k@rg)qK>zl9bkHSXJEvjy?;3W!awsz4>-h}9{C8rbVfr%|hUv48y_8#eG3g%E5cFZ8pWQ)F@y~|cM;jh^ z-;7Cpm-aKr9bWB!Ic zi!#A>>fJWuzTH+ zeF-c)YG%XkcN%v8wPE*98g|z|jr13~8unyNoFci`zf*k}Cb$=Jk@`}@qxDB9wqXy# zd)6Ik*t7bbu7+uTp^kZuY=MT4#j{M)AT8Rk`vT-Ubo2!1-RoZew^D{7{%|PjFid8< zUSHp^`v(nD@bA&}5}XOthjJ?@H*=Bl*LrvFQIwjZ3xYm;V=jx!3cQj=qklHqN7hdf*V+4cqW< zF*R3)d`Q!t|K2dhxfRHN*EoqfYS5yql~xz(XgHzOHm%icrBy>*tA0)U`*(-YYGkTb zdp%v6x;!EIEG>C~lKcjiD5|_|n)XUcPHFi6mj6|1F+W1RX%kP>S=Om6KOWDrOw$$* zSD58MrkFTzTr)VLn!)P|9HoKLD8$Zt*BwQ}IC8FWu7$3=X|Lx`FyVJq75oVGd^B#+ zzf0&*=>v{Tg4P%+^R(u#NZJF3Rw~UOz&cME>%SD!k>LLfQw^U2GDY*5X__PdPos3w zjXqlc0)(TZT=z6u;0q1Ae}Np1d_pC^#9mnX(7mHK5jFqmp)ACYaA;xEKB5&oT`3rd zEBJe@;1Ay!M#0yBOjU6A1;0l3_H??Qd(hACI*h4A9*hZPo@dW;7PvXVI5u?j*wB$< zLoXevrE0q#3TUP7(n_77l-h$)Q(5g!tyBdh9Jv5ia*J`X=2)*dHpDr;t~vhk4{&^) z!`dsz>qs{o{m2pCcA~#0dB+oMOegSuhQ=oX2Jm4*bf?&zL+45!b7WN)G;^lGgp zE3NY5;+ANwd}QA1Y1GjTh>DWODYSd&on05aZw{Su$px?}W&|~0TLrmPDql(Y+eAj` z^fi+32xb>g3GUG&-}*b;BO&#NlyN_s(~+w&T%FAsBj*J&pN!8Sf&A$D$O0c(;3Ers zWP$(hEMVg7fLAOMjN;rVWNeFsy8;rNQUQEbWFS^G7#fH~!?DO=B{3fhyR%DzIo#fFUKf+|8_fdcX}%m-Oa!Z533dy|XhE zjVfJKSd=+Vo=&4c6@dD<;LUN_gWMkv$md4dJXy3D*%{kF3XzBiNiFYSNTn!#34=ehEz}FY(^@k{44j;X>{InlN!03t6S-5B05G&o4>YjkDzP=6=AvoC@ZM375- z(xgB-9S#$50`&j+*fBrg+koc- zX1sCi*a5(?fZqq)4)|-p%K_g9yasR_x}t-C3jrSi+ywX%;Q4@m13Unj`4{j576bko za2DYEfL8;K!#?BKqu>X;32+nO+`ob!@Cm>JfCX=YAMkp>Ujw%N4g7#_1CGPKWbxbJ z2mCtVCO`vI-tz(Z>;^CMV`~j_N1j>Y_xkohZ{qok(mSvNrt^le+$+b86A-M$|KUGk z%1nGt-in-}({i2dzKe}h$1a#UYeG5Eio&p`Uw$>~;`5Rm_M{9pY6@>#E!en9$k zq*K2!$@14E@~5BlAYG22UHwl_r1v7d;{(#KMEWMA7bMF+Ex~^f>CGRI{y5T?en9%` zNT2-y`TOB-RY>2QoWFHu+5{|gfKc^v7@NI#K&uOs~)q#sJ=x9*JR??-!SL3_I?CH>lX`gElK z4C(9_;{Iosm?WToH6i^uw9ox1{8z;Jdy&2Z?Ug$MaehlVF!`@U`uRvNPEKzTc49ud zKC-|^7Wl{l|4%L8K3C;FN98^@#V(H*=RmyNIG_1Sj$fwZoI~;Yo{sxfH2%<%`>a!o zeqKxZJkYq$d6j5-ckZCc;?H%lzvRWa0k60Jc`QPB2l`N6?lVmTI*_T*#tS+fdx~Zj@Hlxn#~x{&o5ypk?XLAoY(O3DqzSQ0pX)sK^OnD4!C*;bpALEkju^g zWF2?uu*)mu1G%8EjVkd0Ef4#Y5_k2&FeLFNosP|5iF4}r|Kf6=<4%`7Q&(V}hAkRy z)^I?>i#6P*;f)%m%lmiZzBa& zjh07cl^K=sEA*p=6WqE;)8X=Jx|=Dfr~Ez#b9EBT$NzAg8GQaZ^Jilg0Qi002%byy zTi#;S`@#$l)?7yBSxhlAe*@3WZbNv{EHsWHk8usc<9~{V#DFpWEYvJR8RPFoo(B-} zjlUey7|JvJ8QvHoi+%opodsL^^D-`gkNYz+@Dm4QoDoyV2*3oNccD$sJpxwSkLjm( zQC0)O#-zbepRriN8AgT)67Q*=2aqr!&%4}y292l$4yjn`a~M`ED1Xd%C9*1b)-^ENqhTI#l*e9Q|=YWj;^T zC^S#sq%l1}W&8p+-{i4;u+(pPo=3yX_y&adri@#HOfoKmrF|8nSiJ1pN&h~~;+tA1 zro0GC3*Yo&79`^+nxt<=3F|52r@08%=0}MCZyB@bkvEjAz$+S1!)>pz7BP` zR_XI~)Qj)B64K;R`%B@YBdMKfWYSGC-hf@Qijk;-}W(>0=|i&~$za541*H zMQ4e?8=Ve;Uv`EBe#N;|;8&f`3cS_1Ti|WZvjV^7ye04( zjspW&BMv&%0*@AM620Fp{EWo^UidSC?-c%7;QtgZLw#E#-Yv8RzE?P2;QNK=02a1) zL=9&P7sy}1e*itL$$(B+w-~{%fo?t%7|;pL(8V}}|FukDKqsski{L^0Z)E}lI$HpXJhf3;H~@Uu?6z-yd#fuD0O6!>}PO9HQT z?h$yM^Ps@%o!10@!O6v(!SWw)rV0F_bB4ehoI!y%I=cnl?0iGumz~E2-r^h)_*Ewd zW2WW*nlnq_L1%-&Z#owWyu-O(;9brkf!}ss6nMAucY)t=MwXKQ9%s71d!3a6?{hi? ze%GlCF#V9TT;TVdE`i^7E))0z=N5rKbe(R4`5ts83w+2~Dez&ZN8lsQ zZh?&Eb0?TN zv}^7ZGe`I;%pBpHYUYqHf1QDTw#XdIj%r3VI^&B+%xFa?^!$j*82Y8$Q?m{9aZ9$b zSI*t&yopZHehFl`o3amp#aPOe+;j5!E$qEu{5c>0&Ws80Vo9zlHnAsk05qRQ!e`w? zqv{Ljb=%KHH~dxL4#x4z#)Ce$GkY~UeF}I8DL-Lq4MZBH%xvpAu>Kmj-^IBE-}f@q zehau`F5a9QXBv1JJ;X>TKMwy&zmqwo6VBM{(4!Iw^W%vN$vOFQ50ts&78}JxyalOe z#VJI#qWDA*qDV1_)C=MiBBPXD=9S+@23H~BdNbR9v~0m|6VuIq%33k zx6sk&ej#rg#+#8qm`@}9dD4h2>SrO-+&jDvW7t{A zncn3vYy;%w!B@;7GRtioOPup9By9En@sPU@cEB{Xoy4%Bxe%I0MYHH_kKuZ+V#T`iCMmDdW$grlIZ?8kz_|>7&%|2 zeI7Qw=YWWqUy|`cUjuN&i6zMkde{Om&0-MNcg1_Yd!t`2NR;$Zkl&pobvAztepvw6q>|hnlbgmXy z?R-gKjq?qGwa%!COrPxp1kQ1$3!LlB6FA?w8#-783!K9OPjMa>xX^h);9}=Wp*z)y z30&e_Citb!K7q@e0|J*jw+UR~EEl?!PK&?>XOqB2r$^u_=M|xAa*hgI?Yu8=jpLK_ z7Ux=lr#lxDj+*VXOh_BiVV zhMiu4=Q@`P-0EB>u-DO0=mQgh~p`&>TuCr!i23)3a&~nUQAv%lEZPw#H^#6!%$G>wk1Q@e6AYr?8 z51i;zKwje}sIIS>Y=s}Qy!GhtP4gg9?{z86gXC{v?_2nBD|@TgFzy7#G@neRFtVG0 zFsw0aogX3H8q@0BBd|@)iN0ye+PrDp28Jg1cSa*(mg1Ih{$vf_P&papjpzGS{-i?;O0g<;M&g9L=d>8jKa(HCn4O;nxB;W*J5%^9=SMTl4<@A)(eI?F!2C-og z#>v0No<(f$NKQ<-6i`^tE6@uo(;N=eyNHgjKg>#?)Qw9Q<4jIwy_@WuBZzSEU{V>m z8J;gv_$5{j7ff7GXz3K^6p;Q5&ouOE*$jI=fzICh6(x-;mUNCl8Iax;Hdiq+tw}H5`m3nx zHY=O!8&#?)Tm*O@F-66|3PyfxewNACPzm4pEWtLh{y63B?e(xAnCa$8iQFGw2-aD0XrW4J~ObIFDlt7s0pRAFuDdyF2 zD%#4}@GF=*d#35ArPq%gwIq8%$N$?=OR-lRwFGq7F-RfC6VQS&yl%mhUv&$)nhuGtInK{NyJz@ri;xS=+|MNOlIbn#O!;Rm3iI- zilYju+`dKRc&w0EDwHs{Hm8ZM!24wBy|4xqJudw!R>%1{2VnsgAd!x(35vdG6c>g& zQP{CS>h(d}4>a&=0`#V8@y zo`hU#5^`lp_(g$p{cP7($vnR-+)L*BW#L}3z%L8;l7)U*FavUZX#wsM`o(@($d}al z+3u{8Wqw)6mn`?oLcXNlFAMpSm3~>smo)fg0bg>OUl#BstNiq6tE9<)x4_l@X9ceD zza_B6FAMmR)BRk)PwjV5_M84Y&$M{16Dkeh?as z%k{FKFzoYj8#l^x4d}7YH3l-qjkd2qY|KowgS?YQ?s}xmN6%z;$JAO_Hit?e~Cs@I!otSf-bsrPL{Mr`xazb zI#(ijHYZ1=^CVJax1;(?=Sw7Dp9&8xT_BMu_LcC&(o-Zd)82;OzjUEQ=GhyNbLk?9 z)Y&=EwzN(n4R$?LD_tUy7W;1~b?H)xthXPdI?D^c4?Q>Aw~}YYs0R?~v8Q8kQQ9C{ z57@U;w?>J?>}$~4OHUJf?6A22D_xzx1VS&i?*eD(n%s{=`Ah8}Gi~-g0^Bb9a+c@x z+~*Ow!oH3IHe`1ryM6YpROhTQFCpbxyBc;Y-BkQXL~gWCVM)&xb#Ak_!P2GYWN}cq z!~Qdi9UQ^FA4cG&h%bcgRR5b%(ZQ4VnduT;rdSEE}forYO9d^Pi4q-V0G zWFL%L$(|aJ-$J@=y2n&piS#XiEwtRX>Hu0IP>x`FC&hi%7 zk{pwVoP6c2d5x%LI}_F@UnhI2hCLO$j&Ro9PUPs2qQ1GJitMeWtV+&>v<=6P7@3r}ueEGE!@!40S zy2`&Gkvt>g0PI+P!2UFN%6oM9lQ6g8eFa^<>HR9G@g9LNP4Ix7i{!FDLzqxM6eM*K zk__(@C}(=P;skXqyrcXHdl8Z|FGU8KG~=ci`{4}XyxYpTiM$I?KEr!2^fkR_fywfo zi7^;kn%9H2{D+o31giX_XhY=>SmVBj$i!C=*q3b9jWt#*pT&jUe_5kwO<&f>k+qGieixgZE4L#q^q5sn`xY5fSHZD-WY%@P<{ zH=&lEu?lHZqbSzC#dywA-j+2N)oj_`$B>ejwGPA{dnEmAX4aD^tye`FjQmWx(?eEv z10+oREv)Y=f7HrrfYwD@LpzPfEam=U-JhyRhLQglR@38_T?)EPR!Al}CVn134uGyGs}SB>W_y`qAnRFlJriuveP&h;d~}kE)QT-CRPpDDEvBhR zi;?+F$jSdW+`oK=Z3iJIb39Zo>x6UDd&f@;BkB#IRt)bQxWRW}OUrv1!nT*1XLx@I z$3rW-2t4EG*|WhgCXA{m8sD7vbwup1!t=+k&7ma2z6Sb_Uso^_5ubed-amsUbE zkAi9ZMtcacvRddx1s^T~ecm6VZnBJw8(<}KvwaWbW_*q^x8#k5(9BZY&Z))CWFBf(!;ae+Q-$pE%&mEw zfVT@E*X+y7LD;ZwU}V5YGK{Nr>^BB&$|!pgWf6_<+=r-l70hIKr^5?P?_P9zmiGy2 z40FMc% zmZ1MYG;c;`9;(Rm1k>R4ob+?!Tg~O^=Zebn8<=&{-xV`=#LZEl)M?F3^Q(C;cgfYn zSfoQN(wfvVi#zASq7`}rww~0g(zu(h(m1O=*~qDc?I-QG{1XAG2e;Xi2|PDb<=2!( z+_pxCFwtuemnw5Hsl#_(@E&xSaCcSkTk=y z5$$8r*~(5lB~bc_U~R1HSmm=4RY-roc@mJ!<(&0htAlBho278>s1^62*P=G)rDE- zxFC;QlDIqz(9|cjsb%FAakhBHn#38I6#>Ht#`=tTlf6EM?dfon$ys{7?M2N_9wCto zI|lm6jzoO+b7-NH{Sxup73dQtXG|OBd$!f(=Wd9Gkn#p;RGR}Sm zRWNy^L<060bVZX#`MH-d#oiA4O&*;~hn{I5wAxhg?V+{%#H5$GT*^YU0uGPaA~p&CEyM78HnCBzS2g_;63D__LP-se8TxKR zk3Z?KDELQGiWXAmo<}Ilf!*z*JlE;3~y%kwV9ECjy)X4H+TUCo=JD9vm_pxr4#rX>35$L&3TxXl!F+_b3bz^Q$5pR z60mU_o?W!9tn^1;+?wk_)l4cVhu^XaST&wXdVhC zGBpa?pz$Lo@lIYI6)Ik-XGwi%3{%O=1H?p;jRG6KcJL(LNu4v^xJ9&8onVc{2PmST7ygZmp&esEd-aUzT^76PcQC`(d3YhrL7~Uy>yF7`^ z6^ZAw;GJ}dDH|%>{!ucN3*N)DL#FKGa7!qWrd{wE4i68QvXSGTa6G~0iD*22)4Go! z&-*(MfR&dGef$}D@1u@0c_^02W6omU+I@@{3vwn*mdO*Zjv#K8-vRZ=c@7VI2Rw=J`zVLEJLsCec5DFr&~$cT=REO1T}`O(|ASqWlxR(Uh_3>616XH>E^9aqMKPeHDx~RqeJIc0DR!s@iSw*$;zd>SEav$+P(g(bVMY}y60rAB zzzT^>v6oQ5N{P(0xn(l7K_c^Pz6^D0qeSZL>q&N+L>lY~Oj+e?Ly21KDU38p>N#rbh8Kw0~WRpFP()uKFw&7cciOAHC$xb>CsiaZJ zRMD87Lt|Y~I1=bg9%u#bL8;2}Z5~#cc@Sy%{t3S+yGzC}9$hJ{Cj$+&Y?PW5^CU~7 z?}xq13Kg0MTUy2hi~(i87a2U}(!}gT%S<%~;;ENLUq=<*QRwfuXp@Yqbvi#ePdo>^r6vL(X}kJ8e&?xoP4LsU3RN#H?S zLW0iX5AfKs$CQ#hffKYkjG!Wh=O$E6+5aknkH-lZGBO?L2H>%t7{CbdFs*EY{R%NsSl?vU-L+zO9`|YNV>!TH zFIXP_CCX+5*3xo6w|Ew)G7dDLn<;BBc`B&N$SDYR5GbQbjlMi7Or$CIlJRkNHVRty zeW?fE09>u?3GqT6B`TdgyGe0CmFs4r8z5a}oyoJYY$A(!q$o#a85f{L(i8LPG|w!{pMyu*6=Gm(e{Z=nA}QKq6qlh?nJiy64>dC<;5MCnv+!>+V1z4? zT8GdX_?NZN1R_LoqM`D?@rWU zr&Y=1t$2wl&p4Ne7tdb`TiB%@dd6y9wEgj-{S!jUuW(3_Lkbq{YZ4v%E!2gzfAgr# zuyD?F))}W3a^;-`K%8s`k2bO?ruTgiT5XvIY~!J0}acs~s=D@DPjz-QT~rpP5uAfwVY??NVly1Xnv^0!+3t&R5r53WuF@db zAH`VDDkJ221JZtTeSDzccBj4 zap4GddiMU?E*!y)J$wHx*ytEr13!44QdVmz=+@*i4_xI+vG(@}FWRQCTKhK{WA8^r zKSRa^no$GP&wWXZ##jp#^&|-=A4m9d3gIiLl*dRo>Nvs?Gj)NWiZS+;T%0zM@LgDm zS3>7yNrWR9N!B@&1{nK$nEo)iUpkKal4NcYCv%S-ormWf$@rLN)cpWTd>0vcqp21s zMkAAf1?+ZiCf6a&1?A;34~%^dzV=0?@rhzyiM01Akz|N{!wY3S}YWv`A%cO!eSFl znYo5j=A$g{6i|-?n=eiW!7g2v2rnx?MR+M42Vso`7P@`9_u zPFxh&`g2@ixlp^zPf^r6&omngsLRMQFjYZxzE)iF!UA7QDVxNiCd7=Yg~rUfx0rg2 zX4EY|5rx9%6I7X<;2Tq5+BuG+NSSdF3g=spT)5&q*DPb*%uQroR@_)H(#-eP6@5&s zS5hS!pg(e{EK+6m=P0W4h3cdN6S*nz%y%|Q;t4-8PT?W0%)-iJ}@=mCuNX@IS=(y{xN;DuIL%_sdHJ56b~B! z^HH=!ZB(UL#@`RQ$}BU5O$vf>NvKe3`IG|txz1H%L7KAJELT#YrqP86lo>2`tcZl2BYNRG zr^U%pGV0ArS|tY5#Z|S8XDYQPfNr-5&ee#kcCO-U;wAw_jTo>wRX7VMx-gHH)HFD| zn~FyolRMEGQ~}BDsCM4rJJ)tQo_%jWv;`egFB zO*iN^qU(I)75=!EM0qH3m2cDR4lCw2~=09h&NxmSQ%$F=^^C>7CHtUwc z+t_+L@BsyY&IL*1Oc!zNUqdV@i(M-P?~W^u<`Y+ZOC^YEi`_P17(JD6*93xUgxRo^ zC!U+!onhjMXxu(nZ6s$wle=Omr7t;AC8%B+$J!YEaK<_p6D`v;-^t#~m_zCUJGVt->v@aWV@wS7wT?{=$ zDSH_D3~|iE{xU)%?&OUxR~hjzZ+!l1#Lsc_@F#Ab-{I!`nYgd;HkDTSJ3|&inIjn; z%iDNHYZy9(x8=Cmo(dz&awj78F4Oc>U+S5)-cwuaneD6eEUNPz@)W%4$?{csMqlcg zZfE^(@c)L!P>% zKvj)r?jg_O^`7N5o+c2ruJ>%3?dh^M+d`70Xm(S8}?~Hav2l@^9C`<_NjKY_6RtMX=x&}kYesvJV zHt-FeSfsa0>89S~rBF1(abM$ER$ISzRqITC45&G{eJ~sg$(MRi_JRKPJ`qyCc5QH3 z^O_ZnD~%vB-fFbRg69o|`93RtBZp<;+pL1ooqZjVUeU3KM&rkK#I(zs*DYU^uvgDPX?M2w_2Lsd{Irk?_q7iUg!{MP<2yThVFOV`zwazz8h%yC=<7g< zw|9yr-S{p~uq(U;A14}4OpNO7=pO8YEoRGW&$cNYTkB6>SHET%D|b1+Mg&7u&kmx5 zouPqP7#~d1FMNB>Z7FT4mAWMwq2 z!OIAhw$aY^UiiK1=&4_*f|+)9weM8T8WM(KQC-D~Ms!(tPXHW5HD+{}!LIgLyOHv7 zu7zx4(*yX$_<{whxyhHj1id)0m>m~B;st+aAT$Vf8C=9tMI)W_=Le(P zp?-h2v;(xk;Kn)XO^Ms+74YMBb_I!!P1-uU=j~BrsGm-ccfe^Xb_F%_0xp`3M!$-% zyR(;XB;4K?>gz<`LV6K|hawY|&xWIw>efolm2MLjXM^k;Fruj9F0`^(kUxS0a-d^y zD~uNF8H{XCG zZWK(MXhn0=^7KI!P7)2FDawcM5i!HD^(;iB*kA>WludZq1T2mNYgk!8`(aV!Xh+ zVq-hm4toDphbB6$X;uR}WwC2s+qkl!?ZefiRL!vZ&q61{ZyBz3-`xtgVIN=wyL;QW zL~EcayO6F>$Iupp6P=)p{Bt;?qkp>1SLQPK8Ytep+U@#etS5}Y2#zW&!J+=4XsD}3 zwVl3>DEosgeHh8RWp1fPmw_;bw(Vhjy%7^c)Xq>RNA1vgoNB3RLTOh0>-o(bHKAk) zQJ_dWJ7N%*0fgGjo}^Ca5r_JKp}t zH5TcRnO3i{CEnkv(x3}Z$l&w?mPtdPYi0!`p)pbKlg>@`n89xJ?gnOMy=;e5^i-n) z9$q~&G410NE%8}QSgo&p2iT;AG&N#{vZN_(dJf<080uC_0=l98?x&h97?=$VqOTQY zrAo!TT%fpJM4%&r$>p%Ery4*1kGmwMPGL@+FbsvZqQVE-yJm|&u(7r@ty|f+#(;xu zgEE+Za_OO7r8~UnIrzjU1|xJWeVmb0*CY?6+l=F;jl)Z+uE7LE6&g0BhH;HrH?+3Z zuQuFCF@`O9d#@4QiEpmvvglRDu8${J@529J%Kh%!N2G&&=U_$2&h5Fepq_4oR z2tPCMRbIXYx4K%t11m72FE-R4TC^q99~umIBHE52V3GP*aA3xkzzode7NL_7o*7tL z?(D}95y5C0oiWtE9qv3M#`o+-12ekiE2c9B1|u;{mLr2;1tCP}1iU>u+T$i;R*i(t z?xeVJVPYuZOhb44oaWI;%7!)7!+3u%rutCyM|ka*wECDDk7b$b&a=e2YVxRDDrI&D zV|H`WhR&dWYky>WKR#f~_MF*6xnK88Xsy~WBuwd6stw9{ManSG#r)FrjPu% ztt+H)bxRYdIqKl+yYaphF--O_&%@B8`hUh}4)5i2^^}X<9$H{uQn%_(!~^VKIiG>^ zVm;0+32|lBm3HarUP^C|N#YiKIapC(inlDNnhXcu=C#B_F-#q|yD!St%Khsl_j1fW z(TP=KeVR6F=c4Ri@Yk~wVIP9kzr2__+|trXZLopB;Z!WITvN^8-Jyd#7+JPUZOL3I zZ7x$2I?rAHxtmQpFkVDu<%fPm&1%FRUCJ!ooGsux#PNB&B(n3vnxncJ(4D|?^9pkX zOqKiE&qaTG-cW>|E(<>CyXlsxb4Bq>w~tAzEZLpoQ^rFWm$`8QW2l`Z1Nx!)u$04b zCbcU}m(_X?eG8`*Vlhq(+;2PsgXxG&+}Q1>edPJW%sXmk4mWd!+jnDB=^w6ZNLu+} z>ZJ5Tvw+7Au=7JRh~Z<;QPc+)FKW3BUuO3x(=U`;Hre2&*gHWz$QozkY^k(uYBA8o zDTS1o(`a}v_fO(`IkE|pG+HPEjC^|b*R4iM)jf1#PNeqA#Ol(#FxN_SuaS;((M87x z(S-{G3s1OSA9ie=quL+aG>g+63uDMp9fjIRThqLz9@7!oz(c9stxDP6l&(p9la2C2 zOcXn}b;u-<)=4b0g4<-|ap#9ze{LC!3~^6S)~}o}Kqs0|O+$t+i5|+=c4BjdW$DB; z2%D4LVf4(^)xjXz7`ngsHf}3cyeHUeqk$@I#wI7Ne>Or3_WHHRg-x zyW3F@!N`EB8nwI4sf*rP)*Y~R#Fn-7ZEYKZE7q-9*4Eg(2GfhQ?O#w@-=XW4O@gYAN^Pw}StgKSsm8lB%clHipB3?BV z9dsjAoztdOVL%pKZ@8msOJ`>lrr^OjwKK3>AKEbk6L1i?^eN0Kk>j~Kcup})W>v>0 z9G9a~YZywMp!OY7gdZn^*;H}K2rXnPP}LLZ3ss%lUNf({W_E2=r9!%9p(mz%g$JWP zc8hUPw6J3++#8z_?q7^n)djc1CwdToxe$;H6arlYh+_SS!Ks)|vLMd%h*6tS&>y{O zcX*3t)r(FeF+idbi#QxWV7-i>l$8<^YgEP{8kyl3CW0+?>@G4MiBDBXp<5uz(Y?Kk zJ8)1PTQJzx7@$T;|qmFpYAVa=+ zz_b8wxbVcnu=M!xsbS$K>;rg;F!>4~LOg#dlYGt6c=!F~ZdxM(CLYUdS)wr1kJmc< zn?_;${o;be?R@-GzWZKu7k>o;rZGDHzH%3TD+0rn_dcP|H@-GrQM&p5T<~KJ_cs78 z{&&DL-}EQ&^Fcs-`UCqXvfFgfoA?^b)AAUG%G_l{*#GrjZgpa!FeZ;b0+h(@U%1@!A`#TEf?B9uPzzOHyhD^ z#u{}Rp9j11`X=!7bE8h8@!R(VKh{{kB#x56VU16h|2Xh0SNa3!zYu(?494C&0p1VC zrkwO2OB8DSqwH{SxxWqwXngt)52gVh5X#gWe||{$=})Y;o`AkX)2BbG-+u!7D>VH} z+KF6u{EXmJb&*&r7FN}j5sbX;9bwK`4IrYiq3-U=P7L$dfx<3+2piFTK@98t^0-7- zB)FwF(t+m@y0Ebs4Ym*Mkdwq-JeSZ_iH)z|Fcd+I^I>dc4Yu#Z;y*UH6Ejup%m%xL z`ueyfmlTt&wG>i!A{3vJa?_`&dj2rGpO`fxX&zQb>M?-e##$^}xi0$Q**2 zE?pL^sjR7-4Sf<1oygM~wA_Do3asR=Umu)RSt})xeK^rkokAzCpNV!AqTk8f3eRbU zdyiMoJ(8mHfEM%DPSz#%@u+c}epW3?lYZ`?imrBD;*_f3|IsdWN+G!jP2OxvOH4lo zitliUE8;+iaaKNaIy`;Vz9@va}J$Hd_oK@4>N*QQ5V#A6Y1f9Sliv3z!@UA`MNloeVlOfH!GZ zivL$4Sh)q8#}eQ(0+syeq){o}Tsat#CSDop(VbsU7o@o{B}4Usio*>ftM-w?|!Grh3@hMKOK}SUH^7q@iT*X`CriayYO0V zFzU#l%g-Mb@e1RgEN=b-_>m+p7rvNg@U*CL9%%WEC70j*u96GOMH-$E*U+VN;f28S zn@w)q{ce*BH)}rE#;*PvZR|yWHg)-*CLt~t2DHL%{w}{;{?CJ!{7cD%>!>Dh;bFll z{mGNge-m)b!j+Gyo4PcleA%_?AnkVVXGO#WemY6BVHg59;>lib>C(KN-PKXrv92 z#{JIQJp7`XSGv7iei!}~G+dLq*)%L77k*u@`CU4NP57^i|6e4~cU^vWAEQO{2ee^y zvx@t_tJgQcOZ&O}?swn@s({3`Pl5Q|&DVu|xmhy5QKv~~D(L3p3UK+{xF5{Kx%t=C zsgyj;Uqs;(MdIWXXw=o(fE #include -// #include "test.h" - void share() { int to_share[2] = {1, 1}; @@ -57,7 +55,6 @@ void reclaim() //share/reclaim void event() { - int to_event[2] = {1, 1}; assert(PDI_OK == PDI_event("event_one")); } @@ -77,8 +74,6 @@ void multi_expose() NULL)); } -void mock_errfunc(PDI_status_t status, const char* message, void* context){} - void errhandler() { PDI_errhandler_t new_handler = {mock_errfunc, NULL}; @@ -86,21 +81,8 @@ void errhandler() assert(current_handler.func == mock_errfunc && current_handler.context == NULL); } -// #ifdef __cplusplus -// #include -// #endif - -int main(int argc, char* argv[]) +int tests(int argc, char* argv[]) { -// #ifdef __cplusplus -// std::cout << "C++" << std::endl; -// #else -// printf("C\n"); -// #endif - - PC_tree_t t; - t.status; - assert(PDI_OK == PDI_init(PC_parse_path(argv[1]))); assert(NULL == PDI_errmsg()); @@ -115,5 +97,6 @@ int main(int argc, char* argv[]) multi_expose(); assert(PDI_OK == PDI_finalize()); + return 0; } From f19d48f63d3a124a66ad4a5c6e307328f41f2d92 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 5 Feb 2025 11:01:32 +0100 Subject: [PATCH 009/372] Done C unit test; To do CPP unit test --- no-pdi/CMakeLists.txt | 3 +- tests/CMakeLists.txt | 3 +- tests/test_07_no-pdi.c | 119 +++++++++++++++++++++++++++++++++++++++++ tutorial | 2 +- 4 files changed, 124 insertions(+), 3 deletions(-) create mode 100644 tests/test_07_no-pdi.c diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index 8ef8f2d86..ce5cf16c7 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -29,5 +29,6 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES C CXX) +# list(APPEND CMAKE_MODULE_PATH "${PDI_SOURCE_DIR}/cmake") -include(no-pdi.cmake) \ No newline at end of file +include(no-pdi.cmake) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c815c0c42..330a0fba8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -26,7 +26,8 @@ cmake_minimum_required(VERSION 3.16...3.29) project(pdi_tests LANGUAGES C CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") -#list(APPEND CMAKE_MODULE_PATH "/local/home/ja281254/.local/share/paraconf/cmake") + +message("CMAKE_MODULE_PATH=" ${CMAKE_MODULE_PATH}) message("CMAKE_MODULE_PATH=" ${CMAKE_MODULE_PATH}) diff --git a/tests/test_07_no-pdi.c b/tests/test_07_no-pdi.c new file mode 100644 index 000000000..8b6438876 --- /dev/null +++ b/tests/test_07_no-pdi.c @@ -0,0 +1,119 @@ +/******************************************************************************* + * Copyright (C) 2020 Institute of Bioorganic Chemistry Polish Academy of Science (PSNC) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of CEA nor the names of its contributors may be used to + * endorse or promote products derived from this software without specific + * prior written permission. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + ******************************************************************************/ + +#include + +#include +#include + +// #include "test.h" + +void share() +{ + int to_share[2] = {1, 1}; + assert(PDI_OK == PDI_share("to_share", to_share, PDI_OUT)); +} + +void access() //access +{ + int to_access[2] = {1, 1}; + assert(PDI_OK == PDI_access("to_access", (void **)&to_access, PDI_IN)); +} + +void release() //access/release +{ + int to_release[2] = {1, 1}; + PDI_access("to_access", (void **)&to_release, PDI_IN); + assert(PDI_OK == PDI_release("to_release")); +} + +void reclaim() //share/reclaim +{ + int to_reclaim[2] = {1, 1}; + PDI_share("to_release", to_reclaim, PDI_OUT); + assert(PDI_OK == PDI_reclaim("to_reclaim")); +} + +void event() +{ + int to_event[2] = {1, 1}; + assert(PDI_OK == PDI_event("event_one")); +} + +void expose() +{ + int to_expose[2] = {1, 1}; + assert(PDI_OK == PDI_expose("to_expose", to_expose, PDI_OUT)); +} + +void multi_expose() +{ + int to_multi_expose[2] = {1, 1}; + int to_multi_expose_two[2] = {2, 2}; + assert(PDI_OK == PDI_multi_expose("event_two", + "to_multi_expose", &to_multi_expose, PDI_OUT, + "to_multi_expose_two", to_multi_expose_two, PDI_OUT, + NULL)); +} + +void mock_errfunc(PDI_status_t status, const char* message, void* context){} + +void errhandler() +{ + PDI_errhandler_t new_handler = {mock_errfunc, NULL}; + PDI_errhandler_t current_handler = PDI_errhandler(new_handler); + assert(current_handler.func == mock_errfunc && current_handler.context == NULL); +} + +// #ifdef __cplusplus +// #include +// #endif + +int main(int argc, char* argv[]) +{ +// #ifdef __cplusplus +// std::cout << "C++" << std::endl; +// #else +// printf("C\n"); +// #endif + + PC_tree_t t; + t.status; + + assert(PDI_OK == PDI_init(PC_parse_path(argv[1]))); + + assert(NULL == PDI_errmsg()); + errhandler(); + + share(); + access(); + release(); + reclaim(); + event(); + expose(); + multi_expose(); + + assert(PDI_OK == PDI_finalize()); + return 0; +} diff --git a/tutorial b/tutorial index 7334107bf..05469b202 160000 --- a/tutorial +++ b/tutorial @@ -1 +1 @@ -Subproject commit 7334107bf2e3215e508bdff23d401db8d109857b +Subproject commit 05469b20215d57d134f68bd660a06f3b8ab6e90b From a9881fc9aece353bbe2f9ddc640463d63bcb36ec Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 6 Feb 2025 11:07:23 +0100 Subject: [PATCH 010/372] Revert manually back to commit a64d85f --- no-pdi/CMakeLists.txt | 1 - tests/CMakeLists.txt | 4 -- tests/test_07_no-pdi.c | 119 ----------------------------------------- 3 files changed, 124 deletions(-) delete mode 100644 tests/test_07_no-pdi.c diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index ce5cf16c7..d41fd3cc5 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -29,6 +29,5 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES C CXX) -# list(APPEND CMAKE_MODULE_PATH "${PDI_SOURCE_DIR}/cmake") include(no-pdi.cmake) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 330a0fba8..905026a43 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -27,10 +27,6 @@ cmake_minimum_required(VERSION 3.16...3.29) project(pdi_tests LANGUAGES C CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") -message("CMAKE_MODULE_PATH=" ${CMAKE_MODULE_PATH}) - -message("CMAKE_MODULE_PATH=" ${CMAKE_MODULE_PATH}) - set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" ON) diff --git a/tests/test_07_no-pdi.c b/tests/test_07_no-pdi.c deleted file mode 100644 index 8b6438876..000000000 --- a/tests/test_07_no-pdi.c +++ /dev/null @@ -1,119 +0,0 @@ -/******************************************************************************* - * Copyright (C) 2020 Institute of Bioorganic Chemistry Polish Academy of Science (PSNC) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * 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. - * * Neither the name of CEA nor the names of its contributors may be used to - * endorse or promote products derived from this software without specific - * prior written permission. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - ******************************************************************************/ - -#include - -#include -#include - -// #include "test.h" - -void share() -{ - int to_share[2] = {1, 1}; - assert(PDI_OK == PDI_share("to_share", to_share, PDI_OUT)); -} - -void access() //access -{ - int to_access[2] = {1, 1}; - assert(PDI_OK == PDI_access("to_access", (void **)&to_access, PDI_IN)); -} - -void release() //access/release -{ - int to_release[2] = {1, 1}; - PDI_access("to_access", (void **)&to_release, PDI_IN); - assert(PDI_OK == PDI_release("to_release")); -} - -void reclaim() //share/reclaim -{ - int to_reclaim[2] = {1, 1}; - PDI_share("to_release", to_reclaim, PDI_OUT); - assert(PDI_OK == PDI_reclaim("to_reclaim")); -} - -void event() -{ - int to_event[2] = {1, 1}; - assert(PDI_OK == PDI_event("event_one")); -} - -void expose() -{ - int to_expose[2] = {1, 1}; - assert(PDI_OK == PDI_expose("to_expose", to_expose, PDI_OUT)); -} - -void multi_expose() -{ - int to_multi_expose[2] = {1, 1}; - int to_multi_expose_two[2] = {2, 2}; - assert(PDI_OK == PDI_multi_expose("event_two", - "to_multi_expose", &to_multi_expose, PDI_OUT, - "to_multi_expose_two", to_multi_expose_two, PDI_OUT, - NULL)); -} - -void mock_errfunc(PDI_status_t status, const char* message, void* context){} - -void errhandler() -{ - PDI_errhandler_t new_handler = {mock_errfunc, NULL}; - PDI_errhandler_t current_handler = PDI_errhandler(new_handler); - assert(current_handler.func == mock_errfunc && current_handler.context == NULL); -} - -// #ifdef __cplusplus -// #include -// #endif - -int main(int argc, char* argv[]) -{ -// #ifdef __cplusplus -// std::cout << "C++" << std::endl; -// #else -// printf("C\n"); -// #endif - - PC_tree_t t; - t.status; - - assert(PDI_OK == PDI_init(PC_parse_path(argv[1]))); - - assert(NULL == PDI_errmsg()); - errhandler(); - - share(); - access(); - release(); - reclaim(); - event(); - expose(); - multi_expose(); - - assert(PDI_OK == PDI_finalize()); - return 0; -} From e2ec7380759e6fe218130eccc4290a6cfab20123 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 6 Feb 2025 16:41:59 +0100 Subject: [PATCH 011/372] Add draft of find_package using a cmake option of CMAKE_MODULE_PATH pointing toward FindPDI.cmake --- no-pdi/FindPDI.cmake | 42 ++++++++++++++++++++++++++++++++++++++++++ tests/test_07_no-pdi.h | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 no-pdi/FindPDI.cmake diff --git a/no-pdi/FindPDI.cmake b/no-pdi/FindPDI.cmake new file mode 100644 index 000000000..8250cfd81 --- /dev/null +++ b/no-pdi/FindPDI.cmake @@ -0,0 +1,42 @@ +# Set the default search paths +set(PDI_DIRS "${CMAKE_CURRENT_LIST_DIR}/..") + +# Check if the specific folder exists +set(NO_PDI_PATH "${CMAKE_MODULE_PATH}") + +include(CMakePrintHelpers) +cmake_print_variables(PDI_DIRS) +cmake_print_variables(NO_PDI_PATH) + +if(EXISTS ${NO_PDI_PATH}) + # Set the include directories to the specific folder path + message("DEBUG : NO-PDI - NO-PDI") + set(PDI_INCLUDE_DIRS ${NO_PDI_PATH}) + cmake_print_variables(NO_PDI_PATH) + set(PDI_LIBRARIES "") + set(PDI_FOUND TRUE) + include(${NO_PDI_PATH}/no-pdi.cmake) +else() + # If the specific folder does not exist, try to find the package using the default search paths + message("DEBUG : NO-PDI - PDI") + # find_path(PDI_INCLUDE_DIRS NAMES PDIConfig.cmake PATHS ${PDI_DIRS}) + find_path(PDI_INCLUDE_DIRS NAMES PDIConfig.cmake PATHS "////pdi/build/staging/share/pdi/cmake/") + cmake_print_variables(PDI_INCLUDE_DIRS) + if(PDI_INCLUDE_DIRS) + include(${PDI_INCLUDE_DIRS}/PDIConfig.cmake) + set(PDI_FOUND TRUE) + else() + set(PDI_FOUND FALSE) + endif() +endif() + +# Handle the REQUIRED and QUIET options +if(PDI_FOUND) + if(NOT PDI_FIND_QUIETLY) + message(STATUS "Found PDI: ${PDI_INCLUDE_DIRS}.") + endif() +else() + if(PDI_FIND_REQUIRED) + message(FATAL_ERROR "Could not find PDI.") + endif() +endif() \ No newline at end of file diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 3e9d52b53..b962f736f 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (C) 2025 Institute of Bioorganic Chemistry Polish Academy of Science (PSNC) + * Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) * All rights reserved. * * Redistribution and use in source and binary forms, with or without From a69ed44a3a153a5f2b35e3611f71d863be090416 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 7 Feb 2025 09:09:45 +0100 Subject: [PATCH 012/372] Fix #438, Fix indent --- no-pdi/include/pdi.h | 73 +++++++++++++++++++++++++++++++++--------- tests/test_07_main.c | 10 +++--- tests/test_07_main.cpp | 10 +++--- tests/test_07_no-pdi.h | 18 +++++------ 4 files changed, 76 insertions(+), 35 deletions(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index f35479936..b5da6a262 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -129,19 +129,24 @@ extern const PDI_errhandler_t PDI_EXPORT PDI_NULL_HANDLER; /** Return a human-readabe message describing the last error that occured in PDI */ -const char PDI_EXPORT * PDI_errmsg(void){return 0;}; +const char PDI_EXPORT * PDI_errmsg(void) +{ + return 0; +} /** A mock error function used as a default error handler. * This function does nothing and is used to provide a default * behavior, as no error handler is set in the following function. */ -void mock_errfunc(PDI_status_t, const char*, void*){} +void mock_errfunc(PDI_status_t, const char*, void*) {} /** Sets the error handler to use */ -PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t){ +PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t) +{ PDI_errhandler_t new_handler = {mock_errfunc, 0}; - return new_handler;}; + return new_handler; +} /// \} @@ -154,16 +159,25 @@ PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t){ /** Initializes PDI */ -PDI_status_t PDI_EXPORT PDI_init(PC_tree_t){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_init(PC_tree_t) +{ + return PDI_OK; +} /** Finalizes PDI * \return an error status */ -PDI_status_t PDI_EXPORT PDI_finalize(void){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_finalize(void) +{ + return PDI_OK; +} /** Checks PDI API version */ -PDI_status_t PDI_EXPORT PDI_version(unsigned long*, unsigned long){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_version(unsigned long*, unsigned long) +{ + return PDI_OK; +} /// \} @@ -189,36 +203,57 @@ typedef enum PDI_inout_e { /** Shares some data with PDI. The user code should not modify it before * a call to either PDI_release or PDI_reclaim. */ -PDI_status_t PDI_EXPORT PDI_share(const char*, void*, PDI_inout_t){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_share(const char*, void*, PDI_inout_t) +{ + return PDI_OK; +} /** Requests for PDI to access a data buffer. */ -PDI_status_t PDI_EXPORT PDI_access(const char*, void**, PDI_inout_t){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_access(const char*, void**, PDI_inout_t) +{ + return PDI_OK; +} /** Releases ownership of a data shared with PDI. PDI is then responsible to * free the associated memory whenever necessary. */ -PDI_status_t PDI_EXPORT PDI_release(const char*){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_release(const char*) +{ + return PDI_OK; +} /** Reclaims ownership of a data buffer shared with PDI. PDI does not manage * the buffer memory anymore. */ -PDI_status_t PDI_EXPORT PDI_reclaim(const char*){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_reclaim(const char*) +{ + return PDI_OK; +} /** Triggers a PDI "event" */ -PDI_status_t PDI_EXPORT PDI_event(const char*){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_event(const char*) +{ + return PDI_OK; +} /** Shortly exposes some data to PDI. Equivalent to PDI_share + PDI_reclaim. */ -PDI_status_t PDI_EXPORT PDI_expose(const char*, void*, PDI_inout_t){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_expose(const char*, void*, PDI_inout_t) +{ + return PDI_OK; +} /** Performs multiple exposes at once. All the data is shared in order they were specified * and reclaimed in reversed order after an event is triggered. * * NULL argument indicates an end of the list. */ -PDI_status_t PDI_EXPORT PDI_multi_expose(const char*, const char*, void*, PDI_inout_t, ...){return PDI_OK;}; +PDI_status_t PDI_EXPORT PDI_multi_expose(const char*, const char*, void*, PDI_inout_t, ...) +{ + return PDI_OK; +} #ifdef PDI_WITH_DEPRECATED @@ -234,7 +269,10 @@ PDI_status_t PDI_EXPORT PDI_multi_expose(const char*, const char*, void*, PDI_in * * \return an error status */ -PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char*){return PDI_OK;}; +PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char*) +{ + return PDI_OK; +} /** Ends the previously opened transaction. * @@ -246,7 +284,10 @@ PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char*){return PDI * * \return an error status */ -PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_end(void){return PDI_OK;}; +PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_end(void) +{ + return PDI_OK; +} #endif // PDI_WITH_DEPRECATED diff --git a/tests/test_07_main.c b/tests/test_07_main.c index e97b584d4..5b7261405 100644 --- a/tests/test_07_main.c +++ b/tests/test_07_main.c @@ -30,11 +30,11 @@ int main(int argc, char* argv[]) { - #ifdef __cplusplus - std::cout << "C++" << std::endl; - #else - printf("C\n"); - #endif +#ifdef __cplusplus + std::cout << "C++" << std::endl; +#else + printf("C\n"); +#endif assert(tests(argc, argv) == 0); printf("Disabled PDI ok for C.\n"); diff --git a/tests/test_07_main.cpp b/tests/test_07_main.cpp index 84370d925..90afa387c 100644 --- a/tests/test_07_main.cpp +++ b/tests/test_07_main.cpp @@ -30,11 +30,11 @@ int main(int argc, char* argv[]) { - #ifdef __cplusplus - std::cout << "C++" << std::endl; - #else - printf("C\n"); - #endif +#ifdef __cplusplus + std::cout << "C++" << std::endl; +#else + printf("C\n"); +#endif assert(tests(argc, argv) == 0); printf("Disabled PDI ok for C++.\n"); diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index b962f736f..e3a9e01d3 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -36,13 +36,13 @@ void share() void access() //access { int to_access[2] = {1, 1}; - assert(PDI_OK == PDI_access("to_access", (void **)&to_access, PDI_IN)); + assert(PDI_OK == PDI_access("to_access", (void**)&to_access, PDI_IN)); } void release() //access/release { int to_release[2] = {1, 1}; - PDI_access("to_access", (void **)&to_release, PDI_IN); + PDI_access("to_access", (void**)&to_release, PDI_IN); assert(PDI_OK == PDI_release("to_release")); } @@ -61,23 +61,23 @@ void event() void expose() { int to_expose[2] = {1, 1}; - assert(PDI_OK == PDI_expose("to_expose", to_expose, PDI_OUT)); + assert(PDI_OK == PDI_expose("to_expose", to_expose, PDI_OUT)); } void multi_expose() { int to_multi_expose[2] = {1, 1}; int to_multi_expose_two[2] = {2, 2}; - assert(PDI_OK == PDI_multi_expose("event_two", - "to_multi_expose", &to_multi_expose, PDI_OUT, - "to_multi_expose_two", to_multi_expose_two, PDI_OUT, - NULL)); + assert( + PDI_OK + == PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL) + ); } void errhandler() { PDI_errhandler_t new_handler = {mock_errfunc, NULL}; - PDI_errhandler_t current_handler = PDI_errhandler(new_handler); + PDI_errhandler_t current_handler = PDI_errhandler(new_handler); assert(current_handler.func == mock_errfunc && current_handler.context == NULL); } @@ -86,7 +86,7 @@ int tests(int argc, char* argv[]) assert(PDI_OK == PDI_init(PC_parse_path(argv[1]))); assert(NULL == PDI_errmsg()); - errhandler(); + errhandler(); share(); access(); From 7e36d56d351d0deceec95f70d3bf911456ed11f9 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 7 Feb 2025 09:30:04 +0100 Subject: [PATCH 013/372] Fix #438, Fix indent 2 --- no-pdi/include/pdi.h | 2 -- tests/test_07_main.c | 1 - tests/test_07_main.cpp | 1 - 3 files changed, 4 deletions(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index b5da6a262..453352293 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -113,7 +113,6 @@ typedef struct PDI_errhandler_s { } PDI_errhandler_t; - /** Prints the error message and aborts if the status is invalid */ extern const PDI_errhandler_t PDI_EXPORT PDI_ASSERT_HANDLER; @@ -126,7 +125,6 @@ extern const PDI_errhandler_t PDI_EXPORT PDI_WARN_HANDLER; */ extern const PDI_errhandler_t PDI_EXPORT PDI_NULL_HANDLER; - /** Return a human-readabe message describing the last error that occured in PDI */ const char PDI_EXPORT * PDI_errmsg(void) diff --git a/tests/test_07_main.c b/tests/test_07_main.c index 5b7261405..314b0434b 100644 --- a/tests/test_07_main.c +++ b/tests/test_07_main.c @@ -35,7 +35,6 @@ int main(int argc, char* argv[]) #else printf("C\n"); #endif - assert(tests(argc, argv) == 0); printf("Disabled PDI ok for C.\n"); } \ No newline at end of file diff --git a/tests/test_07_main.cpp b/tests/test_07_main.cpp index 90afa387c..5d7423ce0 100644 --- a/tests/test_07_main.cpp +++ b/tests/test_07_main.cpp @@ -35,7 +35,6 @@ int main(int argc, char* argv[]) #else printf("C\n"); #endif - assert(tests(argc, argv) == 0); printf("Disabled PDI ok for C++.\n"); } \ No newline at end of file From 39ce49165264a20a6f5497fcfc93e61b62415af5 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 7 Feb 2025 09:33:10 +0100 Subject: [PATCH 014/372] Fix #438, Fix indent 3 --- tests/test_07_main.c | 5 ----- tests/test_07_main.cpp | 5 ----- 2 files changed, 10 deletions(-) diff --git a/tests/test_07_main.c b/tests/test_07_main.c index 314b0434b..2ab30a858 100644 --- a/tests/test_07_main.c +++ b/tests/test_07_main.c @@ -30,11 +30,6 @@ int main(int argc, char* argv[]) { -#ifdef __cplusplus - std::cout << "C++" << std::endl; -#else - printf("C\n"); -#endif assert(tests(argc, argv) == 0); printf("Disabled PDI ok for C.\n"); } \ No newline at end of file diff --git a/tests/test_07_main.cpp b/tests/test_07_main.cpp index 5d7423ce0..ec8762746 100644 --- a/tests/test_07_main.cpp +++ b/tests/test_07_main.cpp @@ -30,11 +30,6 @@ int main(int argc, char* argv[]) { -#ifdef __cplusplus - std::cout << "C++" << std::endl; -#else - printf("C\n"); -#endif assert(tests(argc, argv) == 0); printf("Disabled PDI ok for C++.\n"); } \ No newline at end of file From bd561a27ff621dce9bde515af89673edb1397b59 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 7 Feb 2025 09:36:12 +0100 Subject: [PATCH 015/372] Fix #438, Fix indent 4 --- tests/test_07_main.c | 2 +- tests/test_07_main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_07_main.c b/tests/test_07_main.c index 2ab30a858..5e58f9e51 100644 --- a/tests/test_07_main.c +++ b/tests/test_07_main.c @@ -31,5 +31,5 @@ int main(int argc, char* argv[]) { assert(tests(argc, argv) == 0); - printf("Disabled PDI ok for C.\n"); + printf("Disabled PDI ok for C++.\n"); } \ No newline at end of file diff --git a/tests/test_07_main.cpp b/tests/test_07_main.cpp index ec8762746..5e58f9e51 100644 --- a/tests/test_07_main.cpp +++ b/tests/test_07_main.cpp @@ -31,5 +31,5 @@ int main(int argc, char* argv[]) { assert(tests(argc, argv) == 0); - printf("Disabled PDI ok for C++.\n"); + printf("Disabled PDI ok for C++.\n"); } \ No newline at end of file From 6803f745647cf6a3a1d210dd126cfa649b292b79 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 7 Feb 2025 09:40:12 +0100 Subject: [PATCH 016/372] Fix #438, Fix indent 5 --- tests/test_07_main.c | 7 ++++++- tests/test_07_main.cpp | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/test_07_main.c b/tests/test_07_main.c index 5e58f9e51..2b210aed2 100644 --- a/tests/test_07_main.c +++ b/tests/test_07_main.c @@ -30,6 +30,11 @@ int main(int argc, char* argv[]) { +#ifdef __cplusplus + std::cout << "C++" << std::endl; +#else + printf("C\n"); +#endif assert(tests(argc, argv) == 0); printf("Disabled PDI ok for C++.\n"); -} \ No newline at end of file +} diff --git a/tests/test_07_main.cpp b/tests/test_07_main.cpp index 5e58f9e51..2b210aed2 100644 --- a/tests/test_07_main.cpp +++ b/tests/test_07_main.cpp @@ -30,6 +30,11 @@ int main(int argc, char* argv[]) { +#ifdef __cplusplus + std::cout << "C++" << std::endl; +#else + printf("C\n"); +#endif assert(tests(argc, argv) == 0); printf("Disabled PDI ok for C++.\n"); -} \ No newline at end of file +} From e016405fb0d20fd0e26a92ce4a750892fafef232 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 7 Feb 2025 09:42:25 +0100 Subject: [PATCH 017/372] Fix #438, Fix indent 6 --- tests/test_07_main.c | 2 +- tests/test_07_main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_07_main.c b/tests/test_07_main.c index 2b210aed2..41094ef5a 100644 --- a/tests/test_07_main.c +++ b/tests/test_07_main.c @@ -36,5 +36,5 @@ int main(int argc, char* argv[]) printf("C\n"); #endif assert(tests(argc, argv) == 0); - printf("Disabled PDI ok for C++.\n"); + printf("Disabled PDI ok for C++.\n"); } diff --git a/tests/test_07_main.cpp b/tests/test_07_main.cpp index 2b210aed2..41094ef5a 100644 --- a/tests/test_07_main.cpp +++ b/tests/test_07_main.cpp @@ -36,5 +36,5 @@ int main(int argc, char* argv[]) printf("C\n"); #endif assert(tests(argc, argv) == 0); - printf("Disabled PDI ok for C++.\n"); + printf("Disabled PDI ok for C++.\n"); } From 41ce2b8d5b9e29b8f245fb0214c4d96b98395a98 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 12 Feb 2025 13:49:36 +0100 Subject: [PATCH 018/372] Update tutorial submodule repository --- tutorial | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial b/tutorial index 05469b202..fcba590b7 160000 --- a/tutorial +++ b/tutorial @@ -1 +1 @@ -Subproject commit 05469b20215d57d134f68bd660a06f3b8ab6e90b +Subproject commit fcba590b7af4b04245a785e989e66f6130a71ed7 From 53e4b51947de1ae3649a42c672bb6e9db9af95b9 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 12 Feb 2025 14:13:57 +0100 Subject: [PATCH 019/372] Update tutorial submodule repository 2 --- tutorial | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial b/tutorial index fcba590b7..f025bacc3 160000 --- a/tutorial +++ b/tutorial @@ -1 +1 @@ -Subproject commit fcba590b7af4b04245a785e989e66f6130a71ed7 +Subproject commit f025bacc3c824bdaa72bfc324d4d23392249776e From f53e67638d985b4308858b1acd52395ece24ad2f Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 20 Feb 2025 11:20:56 +0100 Subject: [PATCH 020/372] Complete find_package option for no-pdi, update documentation, to do : without paraconf --- ...di_exampleTargetCMakeLists_findpackage.txt | 67 +++++++++++++++++++ ...i_exampleTargetCMakeLists_usingsubdir.txt} | 1 + no-pdi/FindPDI.cmake | 18 ++--- pdi/docs/Using_PDI.md | 17 ++++- 4 files changed, 91 insertions(+), 12 deletions(-) create mode 100644 example/no-pdi_exampleTargetCMakeLists_findpackage.txt rename example/{no-pdi_exampleTargetCMakeLists.txt => no-pdi_exampleTargetCMakeLists_usingsubdir.txt} (99%) diff --git a/example/no-pdi_exampleTargetCMakeLists_findpackage.txt b/example/no-pdi_exampleTargetCMakeLists_findpackage.txt new file mode 100644 index 000000000..4003d70a8 --- /dev/null +++ b/example/no-pdi_exampleTargetCMakeLists_findpackage.txt @@ -0,0 +1,67 @@ +#============================================================================= +# Copyright (C) 2015-2023 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +#============================================================================= + +cmake_minimum_required(VERSION 3.9) +project(pdi_examples LANGUAGES C) + +find_package(spdlog) +find_package(MPI REQUIRED COMPONENTS C) +find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +find_package(PDI 1.0.0 REQUIRED COMPONENTS C) + +set(CMAKE_C_STANDARD 99) + +add_executable(ex1 ex1.c) +target_link_libraries(ex1 m MPI::MPI_C paraconf::paraconf) + +add_executable(ex2 ex2.c) +target_link_libraries(ex2 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex3 ex3.c) +target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex4 ex4.c) +target_link_libraries(ex4 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex5 ex5.c) +target_link_libraries(ex5 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex6 ex6.c) +target_link_libraries(ex6 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex7 ex7.c) +target_link_libraries(ex7 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex8 ex8.c) +target_link_libraries(ex8 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex9 ex9.c) +target_link_libraries(ex9 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex10 ex10.c) +target_link_libraries(ex10 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_executable(ex11 ex11.c) +set_target_properties(ex11 PROPERTIES ENABLE_EXPORTS TRUE) +target_link_libraries(ex11 m MPI::MPI_C paraconf::paraconf PDI::pdi) + +add_subdirectory(ex_deisa/) diff --git a/example/no-pdi_exampleTargetCMakeLists.txt b/example/no-pdi_exampleTargetCMakeLists_usingsubdir.txt similarity index 99% rename from example/no-pdi_exampleTargetCMakeLists.txt rename to example/no-pdi_exampleTargetCMakeLists_usingsubdir.txt index 6cfb2b22d..91662be7d 100644 --- a/example/no-pdi_exampleTargetCMakeLists.txt +++ b/example/no-pdi_exampleTargetCMakeLists_usingsubdir.txt @@ -23,6 +23,7 @@ cmake_minimum_required(VERSION 3.9) project(pdi_examples LANGUAGES C) +find_package(spdlog) find_package(MPI REQUIRED COMPONENTS C) find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) diff --git a/no-pdi/FindPDI.cmake b/no-pdi/FindPDI.cmake index 8250cfd81..e0b0b0151 100644 --- a/no-pdi/FindPDI.cmake +++ b/no-pdi/FindPDI.cmake @@ -1,16 +1,18 @@ # Set the default search paths set(PDI_DIRS "${CMAKE_CURRENT_LIST_DIR}/..") -# Check if the specific folder exists -set(NO_PDI_PATH "${CMAKE_MODULE_PATH}") - -include(CMakePrintHelpers) -cmake_print_variables(PDI_DIRS) -cmake_print_variables(NO_PDI_PATH) +# Search for a directory in CMAKE_MODULE_PATH that includes "no-pdi", +# which is passed as an argument to the cmake command +set(NO_PDI_PATH "") +foreach(module_path IN LISTS CMAKE_MODULE_PATH) + if(module_path MATCHES ".*no-pdi.*") + set(NO_PDI_PATH "${module_path}") + break() + endif() +endforeach() if(EXISTS ${NO_PDI_PATH}) # Set the include directories to the specific folder path - message("DEBUG : NO-PDI - NO-PDI") set(PDI_INCLUDE_DIRS ${NO_PDI_PATH}) cmake_print_variables(NO_PDI_PATH) set(PDI_LIBRARIES "") @@ -18,8 +20,6 @@ if(EXISTS ${NO_PDI_PATH}) include(${NO_PDI_PATH}/no-pdi.cmake) else() # If the specific folder does not exist, try to find the package using the default search paths - message("DEBUG : NO-PDI - PDI") - # find_path(PDI_INCLUDE_DIRS NAMES PDIConfig.cmake PATHS ${PDI_DIRS}) find_path(PDI_INCLUDE_DIRS NAMES PDIConfig.cmake PATHS "////pdi/build/staging/share/pdi/cmake/") cmake_print_variables(PDI_INCLUDE_DIRS) if(PDI_INCLUDE_DIRS) diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 7623d3222..80d634a22 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -39,9 +39,20 @@ For C make sure that source files that use %PDI API are including `pdi.h` header For Fortran make sure that source files that use %PDI API are using `%PDI` module file (`USE %PDI`). %PDI can be disabled by using the `no-pdi` directory instead of the `pdi` directory. -Make sure to modify your target application `CMakeLists.txt` following -the file `exampleTargetCMakeLists.txt` included in the no-pdi directory, -adding the CMake option `WITHOUT_PDI`. + +You can use the `find_package` method. Use a `CMakeLists.txt` similar to +`no-pdi_exampleTargetCMakeLists_findpackage.txt` for your target, then use the following: +```bash +cmake . -DCMAKE_MODULE_PATH="////pdi/no-pdi" +``` + +Alternatively, you can use the `include`/`target_include_directories` method. +In this case, make sure to modify your target application `CMakeLists.txt` following +the file `no-pdi_exampleTargetCMakeLists_usingsubdir.txt` included in the example directory, +adding the CMake option `WITHOUT_PDI`, then use the following: +```bash +cmake . -DWITHOUT_PDI=ON +``` %PDI can be re-enabled by reversing those modifications. ### Compiling by hand {#compiling_by_hand} From e9c57d263b23c7b2f6f8a207eae6bdf721cac639 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 26 Feb 2025 10:57:27 +0100 Subject: [PATCH 021/372] PR feedback fixes 1 --- AUTHORS | 2 +- ...di_exampleTargetCMakeLists_findpackage.txt | 4 +- ...di_exampleTargetCMakeLists_usingsubdir.txt | 7 +- no-pdi/CMakeLists.txt | 2 +- no-pdi/{ => cmake}/FindPDI.cmake | 4 +- no-pdi/{ => cmake}/no-pdi.cmake | 0 no-pdi/include/pdi.h | 47 ++++------ no-pdi/scripts/env.sh.in | 87 ------------------ no-pdi/scripts/env.xsh | 41 --------- pdi/docs/Using_PDI.md | 15 ++- tests/CMakeLists.txt | 2 +- tests/test_07_main.c | 5 - tests/test_07_main.cpp | 5 - tests/test_07_main_C | Bin 24216 -> 0 bytes tests/test_07_main_CXX | Bin 40848 -> 0 bytes tests/test_07_no-pdi.h | 5 +- tests/test_07_no-pdi.yml | 78 ---------------- tutorial | 2 +- 18 files changed, 42 insertions(+), 264 deletions(-) rename no-pdi/{ => cmake}/FindPDI.cmake (97%) rename no-pdi/{ => cmake}/no-pdi.cmake (100%) delete mode 100644 no-pdi/scripts/env.sh.in delete mode 100644 no-pdi/scripts/env.xsh delete mode 100755 tests/test_07_main_C delete mode 100755 tests/test_07_main_CXX diff --git a/AUTHORS b/AUTHORS index c71628195..f33c722e1 100644 --- a/AUTHORS +++ b/AUTHORS @@ -8,7 +8,7 @@ AUTHORS file. Julian Auriac - CEA (julian.auriac@cea.fr) -* Maintainer (Nov. 2024 - ...) +* No-PDI contributor Julien Bigot - CEA (julien.bigot@cea.fr) * Maintainer (Dec. 2014 - ...) diff --git a/example/no-pdi_exampleTargetCMakeLists_findpackage.txt b/example/no-pdi_exampleTargetCMakeLists_findpackage.txt index 4003d70a8..8c8f309ce 100644 --- a/example/no-pdi_exampleTargetCMakeLists_findpackage.txt +++ b/example/no-pdi_exampleTargetCMakeLists_findpackage.txt @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (C) 2015-2023 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# Copyright (C) 2015-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -31,7 +31,7 @@ find_package(PDI 1.0.0 REQUIRED COMPONENTS C) set(CMAKE_C_STANDARD 99) add_executable(ex1 ex1.c) -target_link_libraries(ex1 m MPI::MPI_C paraconf::paraconf) +target_link_libraries(ex1 m MPI::MPI_C paraconf::paraconf PDI::pdi) add_executable(ex2 ex2.c) target_link_libraries(ex2 m MPI::MPI_C paraconf::paraconf PDI::pdi) diff --git a/example/no-pdi_exampleTargetCMakeLists_usingsubdir.txt b/example/no-pdi_exampleTargetCMakeLists_usingsubdir.txt index 91662be7d..ba88ce544 100644 --- a/example/no-pdi_exampleTargetCMakeLists_usingsubdir.txt +++ b/example/no-pdi_exampleTargetCMakeLists_usingsubdir.txt @@ -31,9 +31,9 @@ option(WITHOUT_PDI "Disable PDI" OFF) if(WITHOUT_PDI) message(WARNING "PDI is disabled.") - include(${CMAKE_SOURCE_DIR}/../no-pdi/no-pdi.cmake) + include(${CMAKE_SOURCE_DIR}/../no-pdi/cmake/no-pdi.cmake) else() - find_package(PDI 1.6.0 REQUIRED COMPONENTS C) + find_package(PDI 1.0.0 REQUIRED COMPONENTS C) endif() set(CMAKE_C_STANDARD 99) @@ -72,7 +72,4 @@ add_executable(ex11 ex11.c) set_target_properties(ex11 PROPERTIES ENABLE_EXPORTS TRUE) target_link_libraries(ex11 m MPI::MPI_C paraconf::paraconf PDI::pdi) -add_executable(ex12 ex12.c) -target_link_libraries(ex12 m MPI::MPI_C paraconf::paraconf PDI::pdi) - add_subdirectory(ex_deisa/) diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index d41fd3cc5..a42958d8d 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -30,4 +30,4 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES C CXX) -include(no-pdi.cmake) +include(cmake/no-pdi.cmake) diff --git a/no-pdi/FindPDI.cmake b/no-pdi/cmake/FindPDI.cmake similarity index 97% rename from no-pdi/FindPDI.cmake rename to no-pdi/cmake/FindPDI.cmake index e0b0b0151..6653dc893 100644 --- a/no-pdi/FindPDI.cmake +++ b/no-pdi/cmake/FindPDI.cmake @@ -1,3 +1,5 @@ +include(CMakePrintHelpers) + # Set the default search paths set(PDI_DIRS "${CMAKE_CURRENT_LIST_DIR}/..") @@ -39,4 +41,4 @@ else() if(PDI_FIND_REQUIRED) message(FATAL_ERROR "Could not find PDI.") endif() -endif() \ No newline at end of file +endif() diff --git a/no-pdi/no-pdi.cmake b/no-pdi/cmake/no-pdi.cmake similarity index 100% rename from no-pdi/no-pdi.cmake rename to no-pdi/cmake/no-pdi.cmake diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 453352293..76b7e677c 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -55,10 +55,6 @@ #ifndef PDI_H_ #define PDI_H_ -// struct PC_tree_t; - -#define PDI_EXPORT __attribute__((visibility("default"))) - #ifdef __cplusplus extern "C" { #endif @@ -115,35 +111,28 @@ typedef struct PDI_errhandler_s { /** Prints the error message and aborts if the status is invalid */ -extern const PDI_errhandler_t PDI_EXPORT PDI_ASSERT_HANDLER; +extern const PDI_errhandler_t PDI_ASSERT_HANDLER; /** Prints the error message and continue if the status is invalid */ -extern const PDI_errhandler_t PDI_EXPORT PDI_WARN_HANDLER; +extern const PDI_errhandler_t PDI_WARN_HANDLER; /** Does nothing */ -extern const PDI_errhandler_t PDI_EXPORT PDI_NULL_HANDLER; +const PDI_errhandler_t PDI_NULL_HANDLER = {NULL, NULL}; /** Return a human-readabe message describing the last error that occured in PDI */ -const char PDI_EXPORT * PDI_errmsg(void) +static inline const char* PDI_errmsg(void) { return 0; } -/** A mock error function used as a default error handler. - * This function does nothing and is used to provide a default - * behavior, as no error handler is set in the following function. - */ -void mock_errfunc(PDI_status_t, const char*, void*) {} - /** Sets the error handler to use */ -PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t) +static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t) { - PDI_errhandler_t new_handler = {mock_errfunc, 0}; - return new_handler; + return PDI_NULL_HANDLER; } /// \} @@ -157,7 +146,7 @@ PDI_errhandler_t PDI_EXPORT PDI_errhandler(PDI_errhandler_t) /** Initializes PDI */ -PDI_status_t PDI_EXPORT PDI_init(PC_tree_t) +static inline PDI_status_t PDI_init(PC_tree_t) { return PDI_OK; } @@ -165,14 +154,14 @@ PDI_status_t PDI_EXPORT PDI_init(PC_tree_t) /** Finalizes PDI * \return an error status */ -PDI_status_t PDI_EXPORT PDI_finalize(void) +static inline PDI_status_t PDI_finalize(void) { return PDI_OK; } /** Checks PDI API version */ -PDI_status_t PDI_EXPORT PDI_version(unsigned long*, unsigned long) +static inline PDI_status_t PDI_version(unsigned long*, unsigned long) { return PDI_OK; } @@ -201,14 +190,14 @@ typedef enum PDI_inout_e { /** Shares some data with PDI. The user code should not modify it before * a call to either PDI_release or PDI_reclaim. */ -PDI_status_t PDI_EXPORT PDI_share(const char*, void*, PDI_inout_t) +static inline PDI_status_t PDI_share(const char*, void*, PDI_inout_t) { return PDI_OK; } /** Requests for PDI to access a data buffer. */ -PDI_status_t PDI_EXPORT PDI_access(const char*, void**, PDI_inout_t) +static inline PDI_status_t PDI_access(const char*, void**, PDI_inout_t) { return PDI_OK; } @@ -216,7 +205,7 @@ PDI_status_t PDI_EXPORT PDI_access(const char*, void**, PDI_inout_t) /** Releases ownership of a data shared with PDI. PDI is then responsible to * free the associated memory whenever necessary. */ -PDI_status_t PDI_EXPORT PDI_release(const char*) +static inline PDI_status_t PDI_release(const char*) { return PDI_OK; } @@ -224,21 +213,21 @@ PDI_status_t PDI_EXPORT PDI_release(const char*) /** Reclaims ownership of a data buffer shared with PDI. PDI does not manage * the buffer memory anymore. */ -PDI_status_t PDI_EXPORT PDI_reclaim(const char*) +static inline PDI_status_t PDI_reclaim(const char*) { return PDI_OK; } /** Triggers a PDI "event" */ -PDI_status_t PDI_EXPORT PDI_event(const char*) +static inline PDI_status_t PDI_event(const char*) { return PDI_OK; } /** Shortly exposes some data to PDI. Equivalent to PDI_share + PDI_reclaim. */ -PDI_status_t PDI_EXPORT PDI_expose(const char*, void*, PDI_inout_t) +static inline PDI_status_t PDI_expose(const char*, void*, PDI_inout_t) { return PDI_OK; } @@ -248,7 +237,7 @@ PDI_status_t PDI_EXPORT PDI_expose(const char*, void*, PDI_inout_t) * * NULL argument indicates an end of the list. */ -PDI_status_t PDI_EXPORT PDI_multi_expose(const char*, const char*, void*, PDI_inout_t, ...) +static inline PDI_status_t PDI_multi_expose(const char*, const char*, void*, PDI_inout_t, ...) { return PDI_OK; } @@ -267,7 +256,7 @@ PDI_status_t PDI_EXPORT PDI_multi_expose(const char*, const char*, void*, PDI_in * * \return an error status */ -PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char*) +static inline PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char*) { return PDI_OK; } @@ -282,7 +271,7 @@ PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char*) * * \return an error status */ -PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_end(void) +static inline PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_end(void) { return PDI_OK; } diff --git a/no-pdi/scripts/env.sh.in b/no-pdi/scripts/env.sh.in deleted file mode 100644 index 4b0adca50..000000000 --- a/no-pdi/scripts/env.sh.in +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/echo 'please source this file, do not run it' - -#============================================================================= -# Copyright (C) 2019-2023 Commissariat a l'energie atomique et aux energies alternatives (CEA) -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# * 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. -# * Neither the names of CEA, nor the names of the 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. -#============================================================================= - -if [ -z "$PDI_DIR" ]; then - -# this file in in INSTALL_PDIDATADIR, go up as many directories as it contains -PDI_DATADIR="@INSTALL_PDIDATADIR@" - -if [ -n "$ZSH_VERSION" ]; then - PDI_DIR="$(readlink -f "$(dirname "${(%):-%x}")")" -elif [ -n "$BASH_VERSION" ]; then - PDI_DIR="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")" -else - echo "This script only supports Bash and Zsh." >&2 - return -fi - -while [ "$(readlink -f "/${PDI_DATADIR}")" != "/" ] -do - PDI_DATADIR="$(dirname "${PDI_DATADIR}")" - PDI_DIR="$(dirname "${PDI_DIR}")" -done -export PDI_DIR - -if [ -n "$PATH" ]; then - export PATH="${PDI_DIR}/@CMAKE_INSTALL_BINDIR@/:$PATH" -else - export PATH="${PDI_DIR}/@CMAKE_INSTALL_BINDIR@/" -fi - -if [ -n "$LD_LIBRARY_PATH" ]; then - export LD_LIBRARY_PATH="${PDI_DIR}/@CMAKE_INSTALL_LIBDIR@/:$LD_LIBRARY_PATH" -else - export LD_LIBRARY_PATH="${PDI_DIR}/@CMAKE_INSTALL_LIBDIR@/" -fi - -if [ -n "$PYTHONPATH" ]; then - export PYTHONPATH="${PDI_DIR}/@Python3Path_INSTALL_SITEARCHDIR@/:$PYTHONPATH" -else - export PYTHONPATH="${PDI_DIR}/@Python3Path_INSTALL_SITEARCHDIR@/" -fi - -if [ -n "$LIBRARY_PATH" ]; then - export LIBRARY_PATH="${PDI_DIR}/@CMAKE_INSTALL_LIBDIR@/:$LIBRARY_PATH" -else - export LIBRARY_PATH="${PDI_DIR}/@CMAKE_INSTALL_LIBDIR@/" -fi - -if [ -n "$CPATH" ]; then - export CPATH="${PDI_DIR}/@CMAKE_INSTALL_INCLUDEDIR@/:${PDI_DIR}/@INSTALL_FMODDIR@:$CPATH" -else - export CPATH="${PDI_DIR}/@CMAKE_INSTALL_INCLUDEDIR@/:${PDI_DIR}/@INSTALL_FMODDIR@" -fi - -if [ -n "$PDI_VERBOSE_ENV" ]; then - echo "Environment loaded for PDI version @PDI_VERSION@" >&2 -fi - -fi # [ -z "$PDI_DIR" ] diff --git a/no-pdi/scripts/env.xsh b/no-pdi/scripts/env.xsh deleted file mode 100644 index 2c602a5f2..000000000 --- a/no-pdi/scripts/env.xsh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/echo 'please source this file, do not run it' - -#============================================================================= -# Copyright (C) 2019-2023 Commissariat a l'energie atomique et aux energies alternatives (CEA) -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# * 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. -# * Neither the names of CEA, nor the names of the 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. -#============================================================================= - -if [ -n "$ZSH_VERSION" ]; then - PDI_DIR_TMP="$(readlink -f "$(dirname "${(%):-%x}")")" -elif [ -n "$BASH_VERSION" ]; then - PDI_DIR_TMP="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")" -else - echo "This script only supports Bash and Zsh." >&2 - return -fi - -. "${PDI_DIR_TMP}/env.sh" diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 80d634a22..202683743 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -40,13 +40,20 @@ For Fortran make sure that source files that use %PDI API are using `%PDI` modul %PDI can be disabled by using the `no-pdi` directory instead of the `pdi` directory. -You can use the `find_package` method. Use a `CMakeLists.txt` similar to -`no-pdi_exampleTargetCMakeLists_findpackage.txt` for your target, then use the following: +You can use the `find_package` method, which does not require to modify the +target `CMakeLists.txt` but requires to compile with an added argument pointing to the no-pdi folder. + +Use a `CMakeLists.txt` similar to `no-pdi_exampleTargetCMakeLists_findpackage.txt` for your target, +then use the following: ```bash -cmake . -DCMAKE_MODULE_PATH="////pdi/no-pdi" +cmake . -DCMAKE_MODULE_PATH="////pdi/no-pdi/cmake" ``` -Alternatively, you can use the `include`/`target_include_directories` method. +Alternatively, you can use the `include`/`target_include_directories` method, +which does not require to pass an additional argument at compilation +but requires to add ad option to the target `CMakeLists.txt`, +which must be enabled through an option at compilation. + In this case, make sure to modify your target application `CMakeLists.txt` following the file `no-pdi_exampleTargetCMakeLists_usingsubdir.txt` included in the example directory, adding the CMake option `WITHOUT_PDI`, then use the following: diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 905026a43..e910aa680 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -40,7 +40,7 @@ if(WITHOUT_PDI) find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) message(WARNING "PDI is disabled for unit testing (use test 07 for no pdi).") - include(${CMAKE_SOURCE_DIR}/../no-pdi/no-pdi.cmake) + include(${CMAKE_SOURCE_DIR}/../no-pdi/cmake/no-pdi.cmake) include_directories(${CMAKE_SOURCE_DIR}) add_executable(test_07_main_C test_07_main.c) diff --git a/tests/test_07_main.c b/tests/test_07_main.c index 41094ef5a..c7bbb3c25 100644 --- a/tests/test_07_main.c +++ b/tests/test_07_main.c @@ -30,11 +30,6 @@ int main(int argc, char* argv[]) { -#ifdef __cplusplus - std::cout << "C++" << std::endl; -#else - printf("C\n"); -#endif assert(tests(argc, argv) == 0); printf("Disabled PDI ok for C++.\n"); } diff --git a/tests/test_07_main.cpp b/tests/test_07_main.cpp index 41094ef5a..c7bbb3c25 100644 --- a/tests/test_07_main.cpp +++ b/tests/test_07_main.cpp @@ -30,11 +30,6 @@ int main(int argc, char* argv[]) { -#ifdef __cplusplus - std::cout << "C++" << std::endl; -#else - printf("C\n"); -#endif assert(tests(argc, argv) == 0); printf("Disabled PDI ok for C++.\n"); } diff --git a/tests/test_07_main_C b/tests/test_07_main_C deleted file mode 100755 index 8e1f7bea1da18460af9b3d41ba795965576f4e2b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24216 zcmeHPdwf*Yoj>>9xygjQ2ErqNk_jLtN+tvXA~uqkOqgg$A|y4abTTB9WF(nM=fT4j zO2t>I*+N}i+tQXk*4j_)uGVhXVr_$3(bigQKPuhU7G3=qR>XkTvh|Vu{?21^=Q5$X z-9L6epPYQ={?7Tm&hPxrYGA&Uue^c%JROhvc6C_v8`;|$`xfRDm}4?XDO$XU2goSO|5Ba zV^A|pIO#^F?-FUHk7&~+o%qkY(6>IZamQPmzq(|_6-P?{^v*ZmE+HPWn`DTG0_l?` z@-)S%sS=Oy$7gwha8vMmF8FN!tpB|FB%*1Y4E#&OUHlP1o+Mg@aF>W z#?KxW1L3wKk*>!tUB0cr&rieuMb7VH-!2fuTNRJLp>?glD;N#-gktevv~_K5UnCrC z4Q%QQGQYp4KN9xG;(=(~?`NDfEn`cqe;^Qz1@VmcLacLJz~3DT2l_(Sla@d%7KDcG zK&THXw46?CGW~^ULM)Oe=Gk^NHz;Wjy5DSU^- zJF5j<;Z^#`YJsP=tZXC9Q48MM{zoi$(f)<}s0A-y0i1B!f|o-)$3HCb#H;!&5r!>z z>W?ZsWx@0Jh$I}g;8od_%p{!jz@!HzJuvBkNe@hVVA2Es7d`NH{=C2Vb{}{8Za05h z&Y17!;kZ6_*th!$=i}VmvE?@ceQNBy-2nMTjQD$ra_ZR2V`F1`c$y||r;a_BOw)wz z)UkufG)=Hh9eYrvp=}4(R>!zLq|0pS^K9vJZRr`-bj6zugU@}+H~5Ng_p75Vt=@{^ zil==;RnK5B89Q{<0r1(6iBLGEF)ZsX%B zIk@9}-(X_YH`q3^XB_JrJnb7i=^OmHZ_s;`XejT`p#;fM-y!d5(&4)u@!Q)@k4xE9 z+mgP)9Z;GWod7-9cKl;e(lCEC6xom_v)#wreS?qscp?9_nuEJm0t^mS;@LQO^8g1! z+W>AFj=S?qy}R;D*Y3$LZQGw;y77Vh(%^7@Y5(E;(!|mH(jB6hPbdA1KH}=~-R?NA zgj_f1JzX(;$U906|B&|`0=^;d=mBc@zQHHq?fY{mc4*{zR4y7;2~ab!*76M=JW$NJ z%`b5d;yo;RT_2!Bp;}IN`7RV0#m$j7-X9zLxMpyBxEc3J)xG0p+?6lPIA54ikThdZ z@(v=$GtB7vo6IPds$WJ4QQ%L>oU(&dEGmt4RcAwD=MnpF_ zF2E=`7@dOqd8lm^9b@D=cAbtfx^c){g}iI7b41Rn!N7Qt$~gIv<` zd};X_VR;7@@}e5%Ny}gOuQZlF2xO||$mR(YhYyN}yd%(tQLybOy4;9w@I|N`c|?$D zJUz_^$e|fuAk@W&6Is+V=_NsZd5E{lg9ok@7Cnolzp!Ybw5X0OO38i6;Evy8>^f|7 zAGG3iJB$~w3!Xaa8+?I=jTsQ9*Ya3mbSyD4mN+_c6`8U73AZ$0mNej#!hp3&1K!}( zdT8YF(|D^KA~jOtHE!9#1MNa$Zc^e^DX|w4!u?NSv=FfmkgJGYkM<~He@@1BqnZRR zA1zzNu1Ln7LTuz;V1YECOBz61gmB@P@OlpA3^8nDoG;2PQo*>4E>}9?<0JVm#uH^#-CrRh;t3K)gH}9Eik1@klfjjFrcO zv3M(fEp-j$16?7W7Fhq1i~Qk88IYb{B@Zrt^A+x@DmTTr>XP{?llhC?D!Q1{o7-AT z8Bp?23`$bv1)eJqQD`XH5(#y=FSwv|QBqJSYiQ!SqQSmkAf^hGs!!6mLK&Ygg*y8J zp?-V*(I7`lejW#Za7!>8_ea8%N2-2KDVd*S5Xytw;7)0fjh|Dvdch<-B;u(q>QD5= zLw-T=$G1kvZC0GLiYOFP^RY52^T3JRsBWxOpvbRQRML(!xycY=vQ>bv7NMrL#>P@^ z6ds+4Xq3Fy8whvx1*4wsM7Wb$OMe81q`_#Erxz`9+xc)%8V_!Z6D#Snl`j+y#Y<8S zYfA#ro-Nl@Y%DEh#IG78a_Eosl$6@!)tN2`wZhVm+Yji(*VD z3V0bH-9Om?xCAf;*aA2NH~_dGa1Y=^fDZsZ33wRrDBvhy^;?j~p5P(CC4fz%kOzDf zZ~*Z7laL1-27CZ;%_+zOYHvdx@H2oe2V=i@2l9Xv=xzlC?fP|0+vd{d=43jl41}jU zL`U8j8(TySb(#Fgdm*Bg__={^A$*>zKCkfd{OqmHU2OH7RTnH? z?;och2fpzv`g2h3OU^=H4EhD2&$8-o8rR3yKjJq!H~&}V?ouVSe3 zUp_8>Kj_Z0(4PVQJ@|DZ`QxCU0DU6+a?r*`K<}{HuV2LtApb80y#)E+nnK^1q&I^8 z`LodbKz|qXyHn(clJa+e-iN+35&eG9Uje<|D!*ggKhJ>fL|>W6zT==rKtEuW*B?yg zpMySUreOP_Xz_DHyI{9FzJCw4@`RC zZ}xz?H>d8&(U44GKYwCABjJM*(mhHFzZZbzNT@FIVW*r2_iOfX0q;SxC+t(LGw!Vc>s)h=|Fw6j_e*VNXo za+kDiN`&JHcSVJ#(zB$jBEgdtJC`o?EU7G&Xto#(vmG@nO(0MM!-Q*(yE0?y3@baMl$F5d@%efYUZzs5|iz?u0=C~#blwr#e|+6qd+ zRVa+pT>m@7GyVe>nQd7l$}(;trmJ|u!5jl%Guw?HkVrk)T;?@-P?hmAvNShNqd3dB zf#m%>;bi80Ksl}kJogZ=nGP=b13j+-W@tLk=?kPry9+$J_AoRUZ2AfC{zNxSFil^E$3gv^27sC8 z=-;v*pspQ=ydJSYUMZ(9X z{}c>Q=($v{GtUQ`^N{YMIe7Nw;CA-3E-G9v2Idzc;b7BOg6|pK_!f{;3xB6)Wl>(l z@{&G>*S3BOIR2GP?23)wukc|5Gpeavd5&%rp0c$Y?8g7zt;_Jw$HLCx@YT{~hsN zZG3>#H1b9VW#=0NkG2}Bnf7yvYHJbIwQJxSL%Wjauj6TIH|}YZn%xAHfPzPFKQrnk-&nN{=5O2L+8{6=NQ^C2A1$7Fe=Cilmv^|deaJtD^V zQl4jV1Id0L552j7szcw~l9dln>Mb)xQk3ToVl$pf$%1e^izzIR)a0HIjkV{?EDj(+ zLEHC7k{u!4-i$kd(f77zO@}ply-bQM-Xb>R;gl>0$Fs;`d88(H6G z%bbvXoSMPv6rHt%H~u+AC*iox43*><<(MWeNyK(&@Aq~PbtY=4;w0;pwR+> zZ^{5_`~Hpc8lqw@OR?b);f?)DoYxNFxDA;skK}S!Ld6B1GjwL-YD(7k$XAQg=)6bi z%zX?Ea-scym9%}AlXwG}v?xVfxaIbw_yLq?p4;}XPTIaf62Ay;*WD@NqP^X$#HUc? zrPw9~-FghBS)%RY@rtCru{+dhPDJ5lDU_hlsl1*tw9?x>lU1xB9DuuHW z`994#`_JIKErs(ZaQ+jVbNv~1KW5=HC}FkRBri<)Axs+P;uoJGu3^11aj^#>elM4t zFD2D-20el#=|K*oNhvaBCPijvqCI_sYO6p>fjHG@LW7I;c{#Xrum#nW)8{fCmQr%KfYb?+BD*lA%0hR@ zx^8E)Uqv0?L=8#J?#HcWS_w1q&Y{BQBC@L3yu`dXyP;quDKuF_fsSF^F_TEymt+$K zBXT~=E_PBZgUd()iDWKh+1Zz78yK0Ll@MwusGLn2vM8Z65Mqi)TRofd(@5+2vl|Mg zYSS{S3$LH8L2ownI#X=PAzRSdm6#5(;tU~k1DDBL#5wXct)YN)xQdZ3hfPxpwCrrD zj0n>lnvr*Dab|Y0qoIJ?RGdfnf&$>dNyRC45oS6sw{i*IC#J0wGo^@NA(2_*UM%L$ zDwGy;t>$<^h0(J;Y}^gSv&YHTW4B<=RPDUHf^4H`ZV?sKg%&zj`WNHgIj9Ac?p$7) z>}+HP%Tae^#k^TmfflnpifvuZh_P zP4YBNdoM4S09qT?aTF^;{}jOwK>rx}7=FLPPuGg{d}j+{+J}^U8xKZFOxe)#a`A9X z$HS!cl*24#S-NVx#%@hBD{eHGwVRcd=5nXUtg1E(oV(2|XSq4!Msu-|>oF^DG%sm4 zFI;9WyU|?LZq_a}uQ+9{L&TWlF|U9O;@+j^TEtr0&5C8_#Rtr4OQd|MdC>v$(sr|M zso4mo_3h@h%gru*!!&bqyF)iM1#;JJT653m!2`;169YJ_TjQ9us#AU@OdAjWX%4iB#n@ zV5al$J@VYZ=WZKHp^_sTYJQ?1wE)LiFfU6Ia2KaRYG zmRRu9iD0-hh<^*--WT)-(_-TcXW0!+pR8$YsPnhftgBh;ZS}5W_}_4MZN)`$AI4qQ zA5VmXRXxFQFdFJaG7#xLFD&hoE|M1@=Hn;YxAb*WAyrPOE}*0wa-FIF(@ zD)>YF1AU>+kjRZV*SFTRqD2Pc0c(c!&Fj|Iv~nAXsim=PO+ynCew6JK|8E|MCfh7p zXFM8I1?7r2tZ((MTkWpx4{&}_44II^vLkom z))cJnN1Ke2ukam!ad+49_K!!azrMMxsg4X&<4$T*5IKl8xqToxAgDnDIgoqgurtmk z9dub^bL|!5SMrQeb0v8iCtMu^^l04GZRP)K2 zhQ^x9pk8{2t^)bH?R82zdE<)-O-;>~v4-249Daqdsh?@!y2X7g>LI)gaX6l5sxI9S z6SZm#z-?ZZ9FeHX@tp?T`yvK07|DvLY1&|~2Hx(H^%#TGFyM1ZaqUNR4vwJS#+{zb zin@RpEX0K#zrSUjx3zVHzrL-hwzZ+T37@UtwNuyJ2A8F6!<^0yvyQx|DUpAYtm;Cz zi<^DMz^2;GnS_*L=0w${XYRAbjI~}WdOotup4y+F;xcL+74Zw8#bS|c2 z&vDdtenfJFcgxiuk~}QKlkn=?QleP{A{tH=UDX0Z_EBiVPh&Ha=ZqYQ#|`+Ap8Yoc zw{iX%$#YA^|7}Fl+5bb%KaHtP4z&h&M&i}p3D&keydv>xO9pEj9!^WV+Wt{^+SAwY zMH;oMr1US8c(rAv^skb5wLPZJWm_a(?aW~@#Y4Bmt4%?r{|1RyJCj&#^Dt38@>3Mt zT3b>g87&~4-}ZC;vzYyy@jJj%Yf;~4Qfhw8`3sZhwF*z?b8-Vhp*W;nV0Q{eBxn&g z4fSr{RiINpH^Vx#I#p;$^4qul3OPQNmr|vY-@ehZT;lC}MD)EZvd6yRS_6I;>{0Dm z<>Vth`c$UQ*%iKt>sP697@7c2#}<^YeJ_~~mI!a(wj7jr`@Y$oz>}SRL&ZXQd0JR^KUJU2oYkrP&r5#$?$aNLA0<$kVDpKGHzohDw5LPj zKLp-|aig$WA|&{t;+NynB8guh>&w1}Y5-4q?Da)kMSL=MWNk!*G#Bbjr zyj$Y!TiO>$ynRd1Bk}gl+DeJH@5P;z<+bn1Uo7$VE$3S3p?a~Gw;6bMsw;Ua#PdCq zuod|EXQCM$^G(xna&LPte1Yq6v3q4bs-0i9zB3xH@I>gVSertAI*$b+7Eg3{<689i zcewoVet##X`dC%_{aq1%PhVtHpwHih6==*KNNmH*5sQ{!JlN$~lAeP;z!mZbqS3&1 zKbFk$ z=KA{e-d2ArO~N5z|Daj5`Y;(jL3XyUtEFtL&_~dcg7h6TnmVi95{j#3kw3_nrMz~L zH`WT4ucjq6kh?5jT}$FgGrxP!^^0u@v@a}lNmEp;J=OHy_W3umBDsQuP%I*6sazLd zZ2B9Tp{FYp_9tS&E{;#xS3*PVf@PaxF_|5|g-?ntyBBJa1+18XOS-zh@Au;)b*j4P z>vbRdlXNNW;M(PXo_J#0`?2xEJlNzBuvf*f(g;Qem?w;VAP=Uv9_$DW;H!4qEvQY2 z5I%?)>XN9M%Nnqa)WbM?FSd!8r)zr{SqK=93W};_&ZZU)prOVCBp_o0eR1aDUiKjB z>4_jokyx;kdFX#Wn1^~ixFfuUc!IsMkN0*#n@R~CqO%JL6-QQq{t%Q2aa0oXV3gr| za-Oc>rbG`o1K}PFNirDQ8dPgH|+ZKAL7A{g|k^;MefO@XJFX z##;&so+FaUC-GXt0wicIs^n>YLqWkMBAI-ud9Fgx*^pJ<{$0?8icv!KephH(2Uz9R zIz&OYVwBJ>e--fW;%=R?U)?`cP)%>uJlSr40P-}qR`N$=`4x0ZhmnmGRq}NBKp})5 zi75G_(m(~@Cnig<`~TCR(cM8MukH&fs7}$8{fbXPI`F5vh$>CjM<^&*%~Qh1R{JHI z4Ix4%D|vN4Qo&)#sPea${~x9NWs>i-WK^)jB2PZE%YPj>vPN~!6dsSM&laQskypmVlWA$BTmvjt`9~6|Fs{ii-N99-Y>VEV7a^hyJgFnX~N?ySX2wUY@wd7qQpvp&S zP;x4r17X6c{MGuvCFSk>l$SM3mHA8dBuU9%n8b*Pl2>q!l((_5OQb@(UL~jaODB-u zECsW%B(Vm&{PGFpw|qiK(TziEu*=s@Apg*%LMs2S$Tv%QdpRGg7V{RL@`bvPh^{kobx_%>FnvS$39nvN=Z9m?I zL79t4EtOV80V@KcpcVy0z&cQ55@iwrQPdZFL5m_*1my)@`~7}v?{lZ7hP9L|ola=^oDKlg8S{*6+$S0nj7-Ec z1gFyL6hNxFUa(T3PvdPs@)a>K3>>G>h6`N{3CVY&>y9jy;zA=&#mVPkP{-5Z*&`I4 z3*Gd1egTzkq`_x(fn1o(N88Msq4?%4N`C& z^RzwF;Y_6Qa$!1OkLF8<%N3j9LgvA%_0?F{f0AE|=Bu5cp^h0&4H&2`Oo!f4CmsXG|C?PB}^Qzr$bNnjlR~uOvR4BuK+6lc(l=W0(==V8jil|1o$NMUnc<(NJk<*{RH@{fFI5d`N*Jr7&$)RM;c>|x;mAZ zhqzq9#%_L#)3gZNQWhCSr!~< zAB=`@kM$VAjjgfTP=8l%V`pouy1KKceJ~gsY!Anxjh*%NYk`~9(H;$V1|!kfV5q&X zu`Sp(Gg#j`2U%=f(;Ax>jzoi?2-P$eF$(i^RBS+TY?(i*InJbI&zA5MN} z8>G(;wyf$LE`wz%1L)it8H%CMojclt-QoWB-tfn0gZ5}Ngz|T{hkFr2JM7dJ>1z-7 zYx4G3Xh%3^3=GAhz`$UgTZ5fFTNM*nV4e2PNPjmQY_$PIG}hHQZ5pF<80}P{l}(LH zm#tqPoK;zCNH|!N6q=Pl)>O_$mk{Y}@2%>I^o6R)cDh>NcsOX-HukcNLrkNdtlNj6-1H~!;O6`p;M z+vgDTbP}F@lzY99glGTeUN0r#9Ty3BBnj_N!XHh-!yxhNog{ot9Bahe9s6f@EMW2# zn%;}BHW|^zz9hWchZBEo5?NXQgx6CSVL6HvI^6IPaKX}$DVH3^^osD zk$r6TTA<%NHn9~Tx6~kg4^!TJ?d4;~j_s2;2hulR`&m5B3Ba4LJrIv`Kz;MIJL7Rq z1m1k@rg)qK>zl9bkHSXJEvjy?;3W!awsz4>-h}9{C8rbVfr%|hUv48y_8#eG3g%E5cFZ8pWQ)F@y~|cM;jh^ z-;7Cpm-aKr9bWB!Ic zi!#A>>fJWuzTH+ zeF-c)YG%XkcN%v8wPE*98g|z|jr13~8unyNoFci`zf*k}Cb$=Jk@`}@qxDB9wqXy# zd)6Ik*t7bbu7+uTp^kZuY=MT4#j{M)AT8Rk`vT-Ubo2!1-RoZew^D{7{%|PjFid8< zUSHp^`v(nD@bA&}5}XOthjJ?@H*=Bl*LrvFQIwjZ3xYm;V=jx!3cQj=qklHqN7hdf*V+4cqW< zF*R3)d`Q!t|K2dhxfRHN*EoqfYS5yql~xz(XgHzOHm%icrBy>*tA0)U`*(-YYGkTb zdp%v6x;!EIEG>C~lKcjiD5|_|n)XUcPHFi6mj6|1F+W1RX%kP>S=Om6KOWDrOw$$* zSD58MrkFTzTr)VLn!)P|9HoKLD8$Zt*BwQ}IC8FWu7$3=X|Lx`FyVJq75oVGd^B#+ zzf0&*=>v{Tg4P%+^R(u#NZJF3Rw~UOz&cME>%SD!k>LLfQw^U2GDY*5X__PdPos3w zjXqlc0)(TZT=z6u;0q1Ae}Np1d_pC^#9mnX(7mHK5jFqmp)ACYaA;xEKB5&oT`3rd zEBJe@;1Ay!M#0yBOjU6A1;0l3_H??Qd(hACI*h4A9*hZPo@dW;7PvXVI5u?j*wB$< zLoXevrE0q#3TUP7(n_77l-h$)Q(5g!tyBdh9Jv5ia*J`X=2)*dHpDr;t~vhk4{&^) z!`dsz>qs{o{m2pCcA~#0dB+oMOegSuhQ=oX2Jm4*bf?&zL+45!b7WN)G;^lGgp zE3NY5;+ANwd}QA1Y1GjTh>DWODYSd&on05aZw{Su$px?}W&|~0TLrmPDql(Y+eAj` z^fi+32xb>g3GUG&-}*b;BO&#NlyN_s(~+w&T%FAsBj*J&pN!8Sf&A$D$O0c(;3Ers zWP$(hEMVg7fLAOMjN;rVWNeFsy8;rNQUQEbWFS^G7#fH~!?DO=B{3fhyR%DzIo#fFUKf+|8_fdcX}%m-Oa!Z533dy|XhE zjVfJKSd=+Vo=&4c6@dD<;LUN_gWMkv$md4dJXy3D*%{kF3XzBiNiFYSNTn!#34=ehEz}FY(^@k{44j;X>{InlN!03t6S-5B05G&o4>YjkDzP=6=AvoC@ZM375- z(xgB-9S#$50`&j+*fBrg+koc- zX1sCi*a5(?fZqq)4)|-p%K_g9yasR_x}t-C3jrSi+ywX%;Q4@m13Unj`4{j576bko za2DYEfL8;K!#?BKqu>X;32+nO+`ob!@Cm>JfCX=YAMkp>Ujw%N4g7#_1CGPKWbxbJ z2mCtVCO`vI-tz(Z>;^CMV`~j_N1j>Y_xkohZ{qok(mSvNrt^le+$+b86A-M$|KUGk z%1nGt-in-}({i2dzKe}h$1a#UYeG5Eio&p`Uw$>~;`5Rm_M{9pY6@>#E!en9$k zq*K2!$@14E@~5BlAYG22UHwl_r1v7d;{(#KMEWMA7bMF+Ex~^f>CGRI{y5T?en9%` zNT2-y`TOB-RY>2QoWFHu+5{|gfKc^v7@NI#K&uOs~)q#sJ=x9*JR??-!SL3_I?CH>lX`gElK z4C(9_;{Iosm?WToH6i^uw9ox1{8z;Jdy&2Z?Ug$MaehlVF!`@U`uRvNPEKzTc49ud zKC-|^7Wl{l|4%L8K3C;FN98^@#V(H*=RmyNIG_1Sj$fwZoI~;Yo{sxfH2%<%`>a!o zeqKxZJkYq$d6j5-ckZCc;?H%lzvRWa0k60Jc`QPB2l`N6?lVmTI*_T*#tS+fdx~Zj@Hlxn#~x{&o5ypk?XLAoY(O3DqzSQ0pX)sK^OnD4!C*;bpALEkju^g zWF2?uu*)mu1G%8EjVkd0Ef4#Y5_k2&FeLFNosP|5iF4}r|Kf6=<4%`7Q&(V}hAkRy z)^I?>i#6P*;f)%m%lmiZzBa& zjh07cl^K=sEA*p=6WqE;)8X=Jx|=Dfr~Ez#b9EBT$NzAg8GQaZ^Jilg0Qi002%byy zTi#;S`@#$l)?7yBSxhlAe*@3WZbNv{EHsWHk8usc<9~{V#DFpWEYvJR8RPFoo(B-} zjlUey7|JvJ8QvHoi+%opodsL^^D-`gkNYz+@Dm4QoDoyV2*3oNccD$sJpxwSkLjm( zQC0)O#-zbepRriN8AgT)67Q*=2aqr!&%4}y292l$4yjn`a~M`ED1Xd%C9*1b)-^ENqhTI#l*e9Q|=YWj;^T zC^S#sq%l1}W&8p+-{i4;u+(pPo=3yX_y&adri@#HOfoKmrF|8nSiJ1pN&h~~;+tA1 zro0GC3*Yo&79`^+nxt<=3F|52r@08%=0}MCZyB@bkvEjAz$+S1!)>pz7BP` zR_XI~)Qj)B64K;R`%B@YBdMKfWYSGC-hf@Qijk;-}W(>0=|i&~$za541*H zMQ4e?8=Ve;Uv`EBe#N;|;8&f`3cS_1Ti|WZvjV^7ye04( zjspW&BMv&%0*@AM620Fp{EWo^UidSC?-c%7;QtgZLw#E#-Yv8RzE?P2;QNK=02a1) zL=9&P7sy}1e*itL$$(B+w-~{%fo?t%7|;pL(8V}}|FukDKqsski{L^0Z)E}lI$HpXJhf3;H~@Uu?6z-yd#fuD0O6!>}PO9HQT z?h$yM^Ps@%o!10@!O6v(!SWw)rV0F_bB4ehoI!y%I=cnl?0iGumz~E2-r^h)_*Ewd zW2WW*nlnq_L1%-&Z#owWyu-O(;9brkf!}ss6nMAucY)t=MwXKQ9%s71d!3a6?{hi? ze%GlCF#V9TT;TVdE`i^7E))0z=N5rKbe(R4`5ts83w+2~Dez&ZN8lsQ zZh?&Eb0?TN zv}^7ZGe`I;%pBpHYUYqHf1QDTw#XdIj%r3VI^&B+%xFa?^!$j*82Y8$Q?m{9aZ9$b zSI*t&yopZHehFl`o3amp#aPOe+;j5!E$qEu{5c>0&Ws80Vo9zlHnAsk05qRQ!e`w? zqv{Ljb=%KHH~dxL4#x4z#)Ce$GkY~UeF}I8DL-Lq4MZBH%xvpAu>Kmj-^IBE-}f@q zehau`F5a9QXBv1JJ;X>TKMwy&zmqwo6VBM{(4!Iw^W%vN$vOFQ50ts&78}JxyalOe z#VJI#qWDA*qDV1_)C=MiBBPXD=9S+@23H~BdNbR9v~0m|6VuIq%33k zx6sk&ej#rg#+#8qm`@}9dD4h2>SrO-+&jDvW7t{A zncn3vYy;%w!B@;7GRtioOPup9By9En@sPU@cEB{Xoy4%Bxe%I0MYHH_kKuZ+V#T`iCMmDdW$grlIZ?8kz_|>7&%|2 zeI7Qw=YWWqUy|`cUjuN&i6zMkde{Om&0-MNcg1_Yd!t`2NR;$Zkl&pobvAztepvw6q>|hnlbgmXy z?R-gKjq?qGwa%!COrPxp1kQ1$3!LlB6FA?w8#-783!K9OPjMa>xX^h);9}=Wp*z)y z30&e_Citb!K7q@e0|J*jw+UR~EEl?!PK&?>XOqB2r$^u_=M|xAa*hgI?Yu8=jpLK_ z7Ux=lr#lxDj+*VXOh_BiVV zhMiu4=Q@`P-0EB>u-DO0=mQgh~p`&>TuCr!i23)3a&~nUQAv%lEZPw#H^#6!%$G>wk1Q@e6AYr?8 z51i;zKwje}sIIS>Y=s}Qy!GhtP4gg9?{z86gXC{v?_2nBD|@TgFzy7#G@neRFtVG0 zFsw0aogX3H8q@0BBd|@)iN0ye+PrDp28Jg1cSa*(mg1Ih{$vf_P&papjpzGS{-i?;O0g<;M&g9L=d>8jKa(HCn4O;nxB;W*J5%^9=SMTl4<@A)(eI?F!2C-og z#>v0No<(f$NKQ<-6i`^tE6@uo(;N=eyNHgjKg>#?)Qw9Q<4jIwy_@WuBZzSEU{V>m z8J;gv_$5{j7ff7GXz3K^6p;Q5&ouOE*$jI=fzICh6(x-;mUNCl8Iax;Hdiq+tw}H5`m3nx zHY=O!8&#?)Tm*O@F-66|3PyfxewNACPzm4pEWtLh{y63B?e(xAnCa$8iQFGw2-aD0XrW4J~ObIFDlt7s0pRAFuDdyF2 zD%#4}@GF=*d#35ArPq%gwIq8%$N$?=OR-lRwFGq7F-RfC6VQS&yl%mhUv&$)nhuGtInK{NyJz@ri;xS=+|MNOlIbn#O!;Rm3iI- zilYju+`dKRc&w0EDwHs{Hm8ZM!24wBy|4xqJudw!R>%1{2VnsgAd!x(35vdG6c>g& zQP{CS>h(d}4>a&=0`#V8@y zo`hU#5^`lp_(g$p{cP7($vnR-+)L*BW#L}3z%L8;l7)U*FavUZX#wsM`o(@($d}al z+3u{8Wqw)6mn`?oLcXNlFAMpSm3~>smo)fg0bg>OUl#BstNiq6tE9<)x4_l@X9ceD zza_B6FAMmR)BRk)PwjV5_M84Y&$M{16Dkeh?as z%k{FKFzoYj8#l^x4d}7YH3l-qjkd2qY|KowgS?YQ?s}xmN6%z;$JAO_Hit?e~Cs@I!otSf-bsrPL{Mr`xazb zI#(ijHYZ1=^CVJax1;(?=Sw7Dp9&8xT_BMu_LcC&(o-Zd)82;OzjUEQ=GhyNbLk?9 z)Y&=EwzN(n4R$?LD_tUy7W;1~b?H)xthXPdI?D^c4?Q>Aw~}YYs0R?~v8Q8kQQ9C{ z57@U;w?>J?>}$~4OHUJf?6A22D_xzx1VS&i?*eD(n%s{=`Ah8}Gi~-g0^Bb9a+c@x z+~*Ow!oH3IHe`1ryM6YpROhTQFCpbxyBc;Y-BkQXL~gWCVM)&xb#Ak_!P2GYWN}cq z!~Qdi9UQ^FA4cG&h%bcgRR5b%(ZQ4VnduT;rdSEE}forYO9d^Pi4q-V0G zWFL%L$(|aJ-$J@=y2n&piS#XiEwtRX>Hu0IP>x`FC&hi%7 zk{pwVoP6c2d5x%LI}_F@UnhI2hCLO$j&Ro9PUPs2qQ1GJitMeWtV+&>v<=6P7@3r}ueEGE!@!40S zy2`&Gkvt>g0PI+P!2UFN%6oM9lQ6g8eFa^<>HR9G@g9LNP4Ix7i{!FDLzqxM6eM*K zk__(@C}(=P;skXqyrcXHdl8Z|FGU8KG~=ci`{4}XyxYpTiM$I?KEr!2^fkR_fywfo zi7^;kn%9H2{D+o31giX_XhY=>SmVBj$i!C=*q3b9jWt#*pT&jUe_5kwO<&f>k+qGieixgZE4L#q^q5sn`xY5fSHZD-WY%@P<{ zH=&lEu?lHZqbSzC#dywA-j+2N)oj_`$B>ejwGPA{dnEmAX4aD^tye`FjQmWx(?eEv z10+oREv)Y=f7HrrfYwD@LpzPfEam=U-JhyRhLQglR@38_T?)EPR!Al}CVn134uGyGs}SB>W_y`qAnRFlJriuveP&h;d~}kE)QT-CRPpDDEvBhR zi;?+F$jSdW+`oK=Z3iJIb39Zo>x6UDd&f@;BkB#IRt)bQxWRW}OUrv1!nT*1XLx@I z$3rW-2t4EG*|WhgCXA{m8sD7vbwup1!t=+k&7ma2z6Sb_Uso^_5ubed-amsUbE zkAi9ZMtcacvRddx1s^T~ecm6VZnBJw8(<}KvwaWbW_*q^x8#k5(9BZY&Z))CWFBf(!;ae+Q-$pE%&mEw zfVT@E*X+y7LD;ZwU}V5YGK{Nr>^BB&$|!pgWf6_<+=r-l70hIKr^5?P?_P9zmiGy2 z40FMc% zmZ1MYG;c;`9;(Rm1k>R4ob+?!Tg~O^=Zebn8<=&{-xV`=#LZEl)M?F3^Q(C;cgfYn zSfoQN(wfvVi#zASq7`}rww~0g(zu(h(m1O=*~qDc?I-QG{1XAG2e;Xi2|PDb<=2!( z+_pxCFwtuemnw5Hsl#_(@E&xSaCcSkTk=y z5$$8r*~(5lB~bc_U~R1HSmm=4RY-roc@mJ!<(&0htAlBho278>s1^62*P=G)rDE- zxFC;QlDIqz(9|cjsb%FAakhBHn#38I6#>Ht#`=tTlf6EM?dfon$ys{7?M2N_9wCto zI|lm6jzoO+b7-NH{Sxup73dQtXG|OBd$!f(=Wd9Gkn#p;RGR}Sm zRWNy^L<060bVZX#`MH-d#oiA4O&*;~hn{I5wAxhg?V+{%#H5$GT*^YU0uGPaA~p&CEyM78HnCBzS2g_;63D__LP-se8TxKR zk3Z?KDELQGiWXAmo<}Ilf!*z*JlE;3~y%kwV9ECjy)X4H+TUCo=JD9vm_pxr4#rX>35$L&3TxXl!F+_b3bz^Q$5pR z60mU_o?W!9tn^1;+?wk_)l4cVhu^XaST&wXdVhC zGBpa?pz$Lo@lIYI6)Ik-XGwi%3{%O=1H?p;jRG6KcJL(LNu4v^xJ9&8onVc{2PmST7ygZmp&esEd-aUzT^76PcQC`(d3YhrL7~Uy>yF7`^ z6^ZAw;GJ}dDH|%>{!ucN3*N)DL#FKGa7!qWrd{wE4i68QvXSGTa6G~0iD*22)4Go! z&-*(MfR&dGef$}D@1u@0c_^02W6omU+I@@{3vwn*mdO*Zjv#K8-vRZ=c@7VI2Rw=J`zVLEJLsCec5DFr&~$cT=REO1T}`O(|ASqWlxR(Uh_3>616XH>E^9aqMKPeHDx~RqeJIc0DR!s@iSw*$;zd>SEav$+P(g(bVMY}y60rAB zzzT^>v6oQ5N{P(0xn(l7K_c^Pz6^D0qeSZL>q&N+L>lY~Oj+e?Ly21KDU38p>N#rbh8Kw0~WRpFP()uKFw&7cciOAHC$xb>CsiaZJ zRMD87Lt|Y~I1=bg9%u#bL8;2}Z5~#cc@Sy%{t3S+yGzC}9$hJ{Cj$+&Y?PW5^CU~7 z?}xq13Kg0MTUy2hi~(i87a2U}(!}gT%S<%~;;ENLUq=<*QRwfuXp@Yqbvi#ePdo>^r6vL(X}kJ8e&?xoP4LsU3RN#H?S zLW0iX5AfKs$CQ#hffKYkjG!Wh=O$E6+5aknkH-lZGBO?L2H>%t7{CbdFs*EY{R%NsSl?vU-L+zO9`|YNV>!TH zFIXP_CCX+5*3xo6w|Ew)G7dDLn<;BBc`B&N$SDYR5GbQbjlMi7Or$CIlJRkNHVRty zeW?fE09>u?3GqT6B`TdgyGe0CmFs4r8z5a}oyoJYY$A(!q$o#a85f{L(i8LPG|w!{pMyu*6=Gm(e{Z=nA}QKq6qlh?nJiy64>dC<;5MCnv+!>+V1z4? zT8GdX_?NZN1R_LoqM`D?@rWU zr&Y=1t$2wl&p4Ne7tdb`TiB%@dd6y9wEgj-{S!jUuW(3_Lkbq{YZ4v%E!2gzfAgr# zuyD?F))}W3a^;-`K%8s`k2bO?ruTgiT5XvIY~!J0}acs~s=D@DPjz-QT~rpP5uAfwVY??NVly1Xnv^0!+3t&R5r53WuF@db zAH`VDDkJ221JZtTeSDzccBj4 zap4GddiMU?E*!y)J$wHx*ytEr13!44QdVmz=+@*i4_xI+vG(@}FWRQCTKhK{WA8^r zKSRa^no$GP&wWXZ##jp#^&|-=A4m9d3gIiLl*dRo>Nvs?Gj)NWiZS+;T%0zM@LgDm zS3>7yNrWR9N!B@&1{nK$nEo)iUpkKal4NcYCv%S-ormWf$@rLN)cpWTd>0vcqp21s zMkAAf1?+ZiCf6a&1?A;34~%^dzV=0?@rhzyiM01Akz|N{!wY3S}YWv`A%cO!eSFl znYo5j=A$g{6i|-?n=eiW!7g2v2rnx?MR+M42Vso`7P@`9_u zPFxh&`g2@ixlp^zPf^r6&omngsLRMQFjYZxzE)iF!UA7QDVxNiCd7=Yg~rUfx0rg2 zX4EY|5rx9%6I7X<;2Tq5+BuG+NSSdF3g=spT)5&q*DPb*%uQroR@_)H(#-eP6@5&s zS5hS!pg(e{EK+6m=P0W4h3cdN6S*nz%y%|Q;t4-8PT?W0%)-iJ}@=mCuNX@IS=(y{xN;DuIL%_sdHJ56b~B! z^HH=!ZB(UL#@`RQ$}BU5O$vf>NvKe3`IG|txz1H%L7KAJELT#YrqP86lo>2`tcZl2BYNRG zr^U%pGV0ArS|tY5#Z|S8XDYQPfNr-5&ee#kcCO-U;wAw_jTo>wRX7VMx-gHH)HFD| zn~FyolRMEGQ~}BDsCM4rJJ)tQo_%jWv;`egFB zO*iN^qU(I)75=!EM0qH3m2cDR4lCw2~=09h&NxmSQ%$F=^^C>7CHtUwc z+t_+L@BsyY&IL*1Oc!zNUqdV@i(M-P?~W^u<`Y+ZOC^YEi`_P17(JD6*93xUgxRo^ zC!U+!onhjMXxu(nZ6s$wle=Omr7t;AC8%B+$J!YEaK<_p6D`v;-^t#~m_zCUJGVt->v@aWV@wS7wT?{=$ zDSH_D3~|iE{xU)%?&OUxR~hjzZ+!l1#Lsc_@F#Ab-{I!`nYgd;HkDTSJ3|&inIjn; z%iDNHYZy9(x8=Cmo(dz&awj78F4Oc>U+S5)-cwuaneD6eEUNPz@)W%4$?{csMqlcg zZfE^(@c)L!P>% zKvj)r?jg_O^`7N5o+c2ruJ>%3?dh^M+d`70Xm(S8}?~Hav2l@^9C`<_NjKY_6RtMX=x&}kYesvJV zHt-FeSfsa0>89S~rBF1(abM$ER$ISzRqITC45&G{eJ~sg$(MRi_JRKPJ`qyCc5QH3 z^O_ZnD~%vB-fFbRg69o|`93RtBZp<;+pL1ooqZjVUeU3KM&rkK#I(zs*DYU^uvgDPX?M2w_2Lsd{Irk?_q7iUg!{MP<2yThVFOV`zwazz8h%yC=<7g< zw|9yr-S{p~uq(U;A14}4OpNO7=pO8YEoRGW&$cNYTkB6>SHET%D|b1+Mg&7u&kmx5 zouPqP7#~d1FMNB>Z7FT4mAWMwq2 z!OIAhw$aY^UiiK1=&4_*f|+)9weM8T8WM(KQC-D~Ms!(tPXHW5HD+{}!LIgLyOHv7 zu7zx4(*yX$_<{whxyhHj1id)0m>m~B;st+aAT$Vf8C=9tMI)W_=Le(P zp?-h2v;(xk;Kn)XO^Ms+74YMBb_I!!P1-uU=j~BrsGm-ccfe^Xb_F%_0xp`3M!$-% zyR(;XB;4K?>gz<`LV6K|hawY|&xWIw>efolm2MLjXM^k;Fruj9F0`^(kUxS0a-d^y zD~uNF8H{XCG zZWK(MXhn0=^7KI!P7)2FDawcM5i!HD^(;iB*kA>WludZq1T2mNYgk!8`(aV!Xh+ zVq-hm4toDphbB6$X;uR}WwC2s+qkl!?ZefiRL!vZ&q61{ZyBz3-`xtgVIN=wyL;QW zL~EcayO6F>$Iupp6P=)p{Bt;?qkp>1SLQPK8Ytep+U@#etS5}Y2#zW&!J+=4XsD}3 zwVl3>DEosgeHh8RWp1fPmw_;bw(Vhjy%7^c)Xq>RNA1vgoNB3RLTOh0>-o(bHKAk) zQJ_dWJ7N%*0fgGjo}^Ca5r_JKp}t zH5TcRnO3i{CEnkv(x3}Z$l&w?mPtdPYi0!`p)pbKlg>@`n89xJ?gnOMy=;e5^i-n) z9$q~&G410NE%8}QSgo&p2iT;AG&N#{vZN_(dJf<080uC_0=l98?x&h97?=$VqOTQY zrAo!TT%fpJM4%&r$>p%Ery4*1kGmwMPGL@+FbsvZqQVE-yJm|&u(7r@ty|f+#(;xu zgEE+Za_OO7r8~UnIrzjU1|xJWeVmb0*CY?6+l=F;jl)Z+uE7LE6&g0BhH;HrH?+3Z zuQuFCF@`O9d#@4QiEpmvvglRDu8${J@529J%Kh%!N2G&&=U_$2&h5Fepq_4oR z2tPCMRbIXYx4K%t11m72FE-R4TC^q99~umIBHE52V3GP*aA3xkzzode7NL_7o*7tL z?(D}95y5C0oiWtE9qv3M#`o+-12ekiE2c9B1|u;{mLr2;1tCP}1iU>u+T$i;R*i(t z?xeVJVPYuZOhb44oaWI;%7!)7!+3u%rutCyM|ka*wECDDk7b$b&a=e2YVxRDDrI&D zV|H`WhR&dWYky>WKR#f~_MF*6xnK88Xsy~WBuwd6stw9{ManSG#r)FrjPu% ztt+H)bxRYdIqKl+yYaphF--O_&%@B8`hUh}4)5i2^^}X<9$H{uQn%_(!~^VKIiG>^ zVm;0+32|lBm3HarUP^C|N#YiKIapC(inlDNnhXcu=C#B_F-#q|yD!St%Khsl_j1fW z(TP=KeVR6F=c4Ri@Yk~wVIP9kzr2__+|trXZLopB;Z!WITvN^8-Jyd#7+JPUZOL3I zZ7x$2I?rAHxtmQpFkVDu<%fPm&1%FRUCJ!ooGsux#PNB&B(n3vnxncJ(4D|?^9pkX zOqKiE&qaTG-cW>|E(<>CyXlsxb4Bq>w~tAzEZLpoQ^rFWm$`8QW2l`Z1Nx!)u$04b zCbcU}m(_X?eG8`*Vlhq(+;2PsgXxG&+}Q1>edPJW%sXmk4mWd!+jnDB=^w6ZNLu+} z>ZJ5Tvw+7Au=7JRh~Z<;QPc+)FKW3BUuO3x(=U`;Hre2&*gHWz$QozkY^k(uYBA8o zDTS1o(`a}v_fO(`IkE|pG+HPEjC^|b*R4iM)jf1#PNeqA#Ol(#FxN_SuaS;((M87x z(S-{G3s1OSA9ie=quL+aG>g+63uDMp9fjIRThqLz9@7!oz(c9stxDP6l&(p9la2C2 zOcXn}b;u-<)=4b0g4<-|ap#9ze{LC!3~^6S)~}o}Kqs0|O+$t+i5|+=c4BjdW$DB; z2%D4LVf4(^)xjXz7`ngsHf}3cyeHUeqk$@I#wI7Ne>Or3_WHHRg-x zyW3F@!N`EB8nwI4sf*rP)*Y~R#Fn-7ZEYKZE7q-9*4Eg(2GfhQ?O#w@-=XW4O@gYAN^Pw}StgKSsm8lB%clHipB3?BV z9dsjAoztdOVL%pKZ@8msOJ`>lrr^OjwKK3>AKEbk6L1i?^eN0Kk>j~Kcup})W>v>0 z9G9a~YZywMp!OY7gdZn^*;H}K2rXnPP}LLZ3ss%lUNf({W_E2=r9!%9p(mz%g$JWP zc8hUPw6J3++#8z_?q7^n)djc1CwdToxe$;H6arlYh+_SS!Ks)|vLMd%h*6tS&>y{O zcX*3t)r(FeF+idbi#QxWV7-i>l$8<^YgEP{8kyl3CW0+?>@G4MiBDBXp<5uz(Y?Kk zJ8)1PTQJzx7@$T;|qmFpYAVa=+ zz_b8wxbVcnu=M!xsbS$K>;rg;F!>4~LOg#dlYGt6c=!F~ZdxM(CLYUdS)wr1kJmc< zn?_;${o;be?R@-GzWZKu7k>o;rZGDHzH%3TD+0rn_dcP|H@-GrQM&p5T<~KJ_cs78 z{&&DL-}EQ&^Fcs-`UCqXvfFgfoA?^b)AAUG%G_l{*#GrjZgpa!FeZ;b0+h(@U%1@!A`#TEf?B9uPzzOHyhD^ z#u{}Rp9j11`X=!7bE8h8@!R(VKh{{kB#x56VU16h|2Xh0SNa3!zYu(?494C&0p1VC zrkwO2OB8DSqwH{SxxWqwXngt)52gVh5X#gWe||{$=})Y;o`AkX)2BbG-+u!7D>VH} z+KF6u{EXmJb&*&r7FN}j5sbX;9bwK`4IrYiq3-U=P7L$dfx<3+2piFTK@98t^0-7- zB)FwF(t+m@y0Ebs4Ym*Mkdwq-JeSZ_iH)z|Fcd+I^I>dc4Yu#Z;y*UH6Ejup%m%xL z`ueyfmlTt&wG>i!A{3vJa?_`&dj2rGpO`fxX&zQb>M?-e##$^}xi0$Q**2 zE?pL^sjR7-4Sf<1oygM~wA_Do3asR=Umu)RSt})xeK^rkokAzCpNV!AqTk8f3eRbU zdyiMoJ(8mHfEM%DPSz#%@u+c}epW3?lYZ`?imrBD;*_f3|IsdWN+G!jP2OxvOH4lo zitliUE8;+iaaKNaIy`;Vz9@va}J$Hd_oK@4>N*QQ5V#A6Y1f9Sliv3z!@UA`MNloeVlOfH!GZ zivL$4Sh)q8#}eQ(0+syeq){o}Tsat#CSDop(VbsU7o@o{B}4Usio*>ftM-w?|!Grh3@hMKOK}SUH^7q@iT*X`CriayYO0V zFzU#l%g-Mb@e1RgEN=b-_>m+p7rvNg@U*CL9%%WEC70j*u96GOMH-$E*U+VN;f28S zn@w)q{ce*BH)}rE#;*PvZR|yWHg)-*CLt~t2DHL%{w}{;{?CJ!{7cD%>!>Dh;bFll z{mGNge-m)b!j+Gyo4PcleA%_?AnkVVXGO#WemY6BVHg59;>lib>C(KN-PKXrv92 z#{JIQJp7`XSGv7iei!}~G+dLq*)%L77k*u@`CU4NP57^i|6e4~cU^vWAEQO{2ee^y zvx@t_tJgQcOZ&O}?swn@s({3`Pl5Q|&DVu|xmhy5QKv~~D(L3p3UK+{xF5{Kx%t=C zsgyj;Uqs;(MdIWXXw=o(fE Date: Wed, 26 Feb 2025 11:20:31 +0100 Subject: [PATCH 022/372] PR feedback fixes 2 - pages breaking CI --- tutorial | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial b/tutorial index 7334107bf..f025bacc3 160000 --- a/tutorial +++ b/tutorial @@ -1 +1 @@ -Subproject commit 7334107bf2e3215e508bdff23d401db8d109857b +Subproject commit f025bacc3c824bdaa72bfc324d4d23392249776e From 75fc3b92ff104d182bb6e985581fe7a14ee87ab4 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 4 Mar 2025 12:17:58 +0100 Subject: [PATCH 023/372] PR feedback fixes 3 - pages breaking CI (tutorial version) --- example/CMakeLists.txt | 9 ++- ...di_exampleTargetCMakeLists_findpackage.txt | 67 ----------------- ...di_exampleTargetCMakeLists_usingsubdir.txt | 75 ------------------- no-pdi/CMakeLists.txt | 2 +- no-pdi/cmake/FindPDI.cmake | 3 +- no-pdi/cmake/no-pdi.cmake | 2 +- no-pdi/include/pdi.h | 16 ++-- pdi/docs/Using_PDI.md | 6 +- tests/test_07_no-pdi.yml | 2 - 9 files changed, 23 insertions(+), 159 deletions(-) delete mode 100644 example/no-pdi_exampleTargetCMakeLists_findpackage.txt delete mode 100644 example/no-pdi_exampleTargetCMakeLists_usingsubdir.txt diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 11d6ee7e8..ff4faeb47 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -48,7 +48,14 @@ endif() # Includes include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) -find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) +option(EXAMPLES_WITHOUT_PDI "Disable PDI" OFF) + +if(EXAMPLES_WITHOUT_PDI) + message(WARNING "PDI is disabled.") + include(${CMAKE_CURRENT_LIST_DIR}/../no-pdi/cmake/no-pdi.cmake) +else() + find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) +endif() find_library(LIB_M m DOC "The math library") # Default standard in the project is C11 diff --git a/example/no-pdi_exampleTargetCMakeLists_findpackage.txt b/example/no-pdi_exampleTargetCMakeLists_findpackage.txt deleted file mode 100644 index 8c8f309ce..000000000 --- a/example/no-pdi_exampleTargetCMakeLists_findpackage.txt +++ /dev/null @@ -1,67 +0,0 @@ -#============================================================================= -# Copyright (C) 2015-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -#============================================================================= - -cmake_minimum_required(VERSION 3.9) -project(pdi_examples LANGUAGES C) - -find_package(spdlog) -find_package(MPI REQUIRED COMPONENTS C) -find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -find_package(PDI 1.0.0 REQUIRED COMPONENTS C) - -set(CMAKE_C_STANDARD 99) - -add_executable(ex1 ex1.c) -target_link_libraries(ex1 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex2 ex2.c) -target_link_libraries(ex2 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex3 ex3.c) -target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex4 ex4.c) -target_link_libraries(ex4 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex5 ex5.c) -target_link_libraries(ex5 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex6 ex6.c) -target_link_libraries(ex6 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex7 ex7.c) -target_link_libraries(ex7 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex8 ex8.c) -target_link_libraries(ex8 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex9 ex9.c) -target_link_libraries(ex9 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex10 ex10.c) -target_link_libraries(ex10 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex11 ex11.c) -set_target_properties(ex11 PROPERTIES ENABLE_EXPORTS TRUE) -target_link_libraries(ex11 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_subdirectory(ex_deisa/) diff --git a/example/no-pdi_exampleTargetCMakeLists_usingsubdir.txt b/example/no-pdi_exampleTargetCMakeLists_usingsubdir.txt deleted file mode 100644 index ba88ce544..000000000 --- a/example/no-pdi_exampleTargetCMakeLists_usingsubdir.txt +++ /dev/null @@ -1,75 +0,0 @@ -#============================================================================= -# Copyright (C) 2015-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -#============================================================================= - -cmake_minimum_required(VERSION 3.9) -project(pdi_examples LANGUAGES C) - -find_package(spdlog) -find_package(MPI REQUIRED COMPONENTS C) -find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - -option(WITHOUT_PDI "Disable PDI" OFF) - -if(WITHOUT_PDI) - message(WARNING "PDI is disabled.") - include(${CMAKE_SOURCE_DIR}/../no-pdi/cmake/no-pdi.cmake) -else() - find_package(PDI 1.0.0 REQUIRED COMPONENTS C) -endif() - -set(CMAKE_C_STANDARD 99) - -add_executable(ex1 ex1.c) -target_link_libraries(ex1 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex2 ex2.c) -target_link_libraries(ex2 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex3 ex3.c) -target_link_libraries(ex3 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex4 ex4.c) -target_link_libraries(ex4 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex5 ex5.c) -target_link_libraries(ex5 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex6 ex6.c) -target_link_libraries(ex6 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex7 ex7.c) -target_link_libraries(ex7 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex8 ex8.c) -target_link_libraries(ex8 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex9 ex9.c) -target_link_libraries(ex9 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex10 ex10.c) -target_link_libraries(ex10 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_executable(ex11 ex11.c) -set_target_properties(ex11 PROPERTIES ENABLE_EXPORTS TRUE) -target_link_libraries(ex11 m MPI::MPI_C paraconf::paraconf PDI::pdi) - -add_subdirectory(ex_deisa/) diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index a42958d8d..a5a25cfb7 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -30,4 +30,4 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES C CXX) -include(cmake/no-pdi.cmake) +include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/no-pdi.cmake") diff --git a/no-pdi/cmake/FindPDI.cmake b/no-pdi/cmake/FindPDI.cmake index 6653dc893..e67997273 100644 --- a/no-pdi/cmake/FindPDI.cmake +++ b/no-pdi/cmake/FindPDI.cmake @@ -22,7 +22,8 @@ if(EXISTS ${NO_PDI_PATH}) include(${NO_PDI_PATH}/no-pdi.cmake) else() # If the specific folder does not exist, try to find the package using the default search paths - find_path(PDI_INCLUDE_DIRS NAMES PDIConfig.cmake PATHS "////pdi/build/staging/share/pdi/cmake/") + # find_path(PDI_INCLUDE_DIRS NAMES PDIConfig.cmake PATHS "////pdi/build/staging/share/pdi/cmake/") + find_path(PDI_INCLUDE_DIRS NAMES PDIConfig.cmake) cmake_print_variables(PDI_INCLUDE_DIRS) if(PDI_INCLUDE_DIRS) include(${PDI_INCLUDE_DIRS}/PDIConfig.cmake) diff --git a/no-pdi/cmake/no-pdi.cmake b/no-pdi/cmake/no-pdi.cmake index a98c6f319..9f6d345d1 100644 --- a/no-pdi/cmake/no-pdi.cmake +++ b/no-pdi/cmake/no-pdi.cmake @@ -33,4 +33,4 @@ add_library(PDI_C INTERFACE) add_library(PDI::pdi ALIAS PDI_C) add_library(PDI::PDI_C ALIAS PDI_C) -target_include_directories(PDI_C INTERFACE ${CMAKE_SOURCE_DIR}/../no-pdi/include) +target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../include") diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 76b7e677c..05deb1ee0 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -109,17 +109,17 @@ typedef struct PDI_errhandler_s { } PDI_errhandler_t; -/** Prints the error message and aborts if the status is invalid +/** Does nothing */ -extern const PDI_errhandler_t PDI_ASSERT_HANDLER; +static const PDI_errhandler_t PDI_NULL_HANDLER = {NULL, NULL}; -/** Prints the error message and continue if the status is invalid +/** Prints the error message and aborts if the status is invalid */ -extern const PDI_errhandler_t PDI_WARN_HANDLER; +static const PDI_errhandler_t PDI_ASSERT_HANDLER = PDI_NULL_HANDLER; -/** Does nothing +/** Prints the error message and continue if the status is invalid */ -const PDI_errhandler_t PDI_NULL_HANDLER = {NULL, NULL}; +static const PDI_errhandler_t PDI_WARN_HANDLER = PDI_NULL_HANDLER; /** Return a human-readabe message describing the last error that occured in PDI */ @@ -256,7 +256,7 @@ static inline PDI_status_t PDI_multi_expose(const char*, const char*, void*, PDI * * \return an error status */ -static inline PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const char*) +static inline PDI_status_t PDI_transaction_begin(const char*) { return PDI_OK; } @@ -271,7 +271,7 @@ static inline PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_begin(const cha * * \return an error status */ -static inline PDI_status_t PDI_DEPRECATED_EXPORT PDI_transaction_end(void) +static inline PDI_status_t PDI_transaction_end(void) { return PDI_OK; } diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 202683743..96a2c7862 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -51,11 +51,11 @@ cmake . -DCMAKE_MODULE_PATH="////pdi/no-pdi/cmake" Alternatively, you can use the `include`/`target_include_directories` method, which does not require to pass an additional argument at compilation -but requires to add ad option to the target `CMakeLists.txt`, +but requires to add an option to the target `CMakeLists.txt`, which must be enabled through an option at compilation. -In this case, make sure to modify your target application `CMakeLists.txt` following -the file `no-pdi_exampleTargetCMakeLists_usingsubdir.txt` included in the example directory, +In this case, make sure to modify your target application `CMakeLists.txt` as illustrated in +`example/CMakeLists.txt`, adding the CMake option `WITHOUT_PDI`, then use the following: ```bash cmake . -DWITHOUT_PDI=ON diff --git a/tests/test_07_no-pdi.yml b/tests/test_07_no-pdi.yml index 139597f9c..e69de29bb 100644 --- a/tests/test_07_no-pdi.yml +++ b/tests/test_07_no-pdi.yml @@ -1,2 +0,0 @@ - - From 26d508d22324e72ce778c3fc194a491bde1f6c48 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 5 Mar 2025 09:12:53 +0100 Subject: [PATCH 024/372] Update submodule to 7334107bf2e3215e508bdff23d401db8d109857b --- tutorial | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial b/tutorial index f025bacc3..7334107bf 160000 --- a/tutorial +++ b/tutorial @@ -1 +1 @@ -Subproject commit f025bacc3c824bdaa72bfc324d4d23392249776e +Subproject commit 7334107bf2e3215e508bdff23d401db8d109857b From 00c353476f928244e926b0feb9ca062d21cd0cfc Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 6 Mar 2025 16:49:51 +0100 Subject: [PATCH 025/372] PR feedback fixes 4 and draft for PDIConfig.cmake --- .gitignore | 7 +++ no-pdi/CMakeLists.txt | 47 ++++++++++++++- no-pdi/cmake/FindPDI.cmake | 65 ++++++++++----------- no-pdi/cmake/PDIConfig.cmake | 1 + no-pdi/cmake/PDIConfigVersion.cmake | 1 + no-pdi/cmake/PDITargets.cmake | 10 ++++ no-pdi/cmake/no-pdi.cmake | 20 ++++++- no-pdi/include/pdi.h | 11 ++-- tests/CMakeLists.txt | 60 +------------------ tests/add_all_tests.sh | 6 ++ tests/tests_no-pdi/CMakeLists.txt | 57 ++++++++++++++++++ tests/{ => tests_no-pdi}/test_07_main.c | 0 tests/{ => tests_no-pdi}/test_07_main.cpp | 0 tests/{ => tests_no-pdi}/test_07_no-pdi.h | 2 +- tests/{ => tests_no-pdi}/test_07_no-pdi.yml | 0 tests/tests_pdi/CMakeLists.txt | 64 ++++++++++++++++++++ tests/{ => tests_pdi}/test.h | 0 tests/{ => tests_pdi}/test_01.c | 0 tests/{ => tests_pdi}/test_01.yml | 0 tests/{ => tests_pdi}/test_02.c | 0 tests/{ => tests_pdi}/test_02.yml | 0 tests/{ => tests_pdi}/test_03.c | 0 tests/{ => tests_pdi}/test_03.yml | 0 tests/{ => tests_pdi}/test_04.c | 0 tests/{ => tests_pdi}/test_04.yml | 0 tests/{ => tests_pdi}/test_05.c | 0 tests/{ => tests_pdi}/test_05.yml | 0 27 files changed, 253 insertions(+), 98 deletions(-) create mode 100644 no-pdi/cmake/PDIConfig.cmake create mode 100644 no-pdi/cmake/PDIConfigVersion.cmake create mode 100644 no-pdi/cmake/PDITargets.cmake create mode 100644 tests/add_all_tests.sh create mode 100644 tests/tests_no-pdi/CMakeLists.txt rename tests/{ => tests_no-pdi}/test_07_main.c (100%) rename tests/{ => tests_no-pdi}/test_07_main.cpp (100%) rename tests/{ => tests_no-pdi}/test_07_no-pdi.h (98%) rename tests/{ => tests_no-pdi}/test_07_no-pdi.yml (100%) create mode 100644 tests/tests_pdi/CMakeLists.txt rename tests/{ => tests_pdi}/test.h (100%) rename tests/{ => tests_pdi}/test_01.c (100%) rename tests/{ => tests_pdi}/test_01.yml (100%) rename tests/{ => tests_pdi}/test_02.c (100%) rename tests/{ => tests_pdi}/test_02.yml (100%) rename tests/{ => tests_pdi}/test_03.c (100%) rename tests/{ => tests_pdi}/test_03.yml (100%) rename tests/{ => tests_pdi}/test_04.c (100%) rename tests/{ => tests_pdi}/test_04.yml (100%) rename tests/{ => tests_pdi}/test_05.c (100%) rename tests/{ => tests_pdi}/test_05.yml (100%) diff --git a/.gitignore b/.gitignore index 0d20b6487..5253ff619 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,8 @@ *.pyc +CMakeCache.txt +CMakeFiles +cmake_install.cmake +CTestTestfile.cmake +DartConfiguration.tcl +Makefile +/Testing diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index a5a25cfb7..586aec7f1 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -27,7 +27,52 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= +# cmake_minimum_required(VERSION 3.16...3.29) +# project(PDI LANGUAGES C CXX) + +# include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/no-pdi.cmake") + cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES C CXX) -include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/no-pdi.cmake") +# Create an interface library +add_library(PDI_C INTERFACE) + +# Create aliases for the interface library +add_library(PDI::pdi ALIAS PDI_C) +add_library(PDI::PDI_C ALIAS PDI_C) + +# Specify include directories using generator expressions +target_include_directories(PDI_C INTERFACE $) + +# Export the interface library +export(TARGETS PDI_C FILE PDITargets.cmake) + +# Install the interface library and configuration files +install(TARGETS PDI_C + EXPORT PDITargets + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin + INCLUDES DESTINATION include +) + +install(EXPORT PDITargets + FILE PDITargets.cmake + DESTINATION lib/cmake/PDI +) + +install(FILES + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfigVersion.cmake" + DESTINATION lib/cmake/PDI +) + +# Ensure that the parent directories are created +file(MAKE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/lib/cmake/PDI") +file(MAKE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/lib") +file(MAKE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/include") +file(MAKE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/bin") + +# Specify a custom installation directory +set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE STRING "Installation prefix directory") diff --git a/no-pdi/cmake/FindPDI.cmake b/no-pdi/cmake/FindPDI.cmake index e67997273..31721aff5 100644 --- a/no-pdi/cmake/FindPDI.cmake +++ b/no-pdi/cmake/FindPDI.cmake @@ -1,37 +1,36 @@ -include(CMakePrintHelpers) +#============================================================================= +# Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * 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. +# * Neither the names of CEA, nor the names of the 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. +#============================================================================= -# Set the default search paths -set(PDI_DIRS "${CMAKE_CURRENT_LIST_DIR}/..") - -# Search for a directory in CMAKE_MODULE_PATH that includes "no-pdi", -# which is passed as an argument to the cmake command -set(NO_PDI_PATH "") -foreach(module_path IN LISTS CMAKE_MODULE_PATH) - if(module_path MATCHES ".*no-pdi.*") - set(NO_PDI_PATH "${module_path}") - break() - endif() -endforeach() - -if(EXISTS ${NO_PDI_PATH}) - # Set the include directories to the specific folder path - set(PDI_INCLUDE_DIRS ${NO_PDI_PATH}) - cmake_print_variables(NO_PDI_PATH) - set(PDI_LIBRARIES "") - set(PDI_FOUND TRUE) - include(${NO_PDI_PATH}/no-pdi.cmake) -else() - # If the specific folder does not exist, try to find the package using the default search paths - # find_path(PDI_INCLUDE_DIRS NAMES PDIConfig.cmake PATHS "////pdi/build/staging/share/pdi/cmake/") - find_path(PDI_INCLUDE_DIRS NAMES PDIConfig.cmake) - cmake_print_variables(PDI_INCLUDE_DIRS) - if(PDI_INCLUDE_DIRS) - include(${PDI_INCLUDE_DIRS}/PDIConfig.cmake) - set(PDI_FOUND TRUE) - else() - set(PDI_FOUND FALSE) - endif() -endif() +set(PDI_DIRS "${CMAKE_CURRENT_LIST_DIR}") +set(PDI_LIBRARIES "") +set(PDI_FOUND TRUE) +include(${PDI_DIRS}/no-pdi.cmake) # Handle the REQUIRED and QUIET options if(PDI_FOUND) diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake new file mode 100644 index 000000000..2dd76735e --- /dev/null +++ b/no-pdi/cmake/PDIConfig.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/PDITargets.cmake") diff --git a/no-pdi/cmake/PDIConfigVersion.cmake b/no-pdi/cmake/PDIConfigVersion.cmake new file mode 100644 index 000000000..b299b3ab6 --- /dev/null +++ b/no-pdi/cmake/PDIConfigVersion.cmake @@ -0,0 +1 @@ +set(PDI_VERSION "1.8.3") diff --git a/no-pdi/cmake/PDITargets.cmake b/no-pdi/cmake/PDITargets.cmake new file mode 100644 index 000000000..089eef129 --- /dev/null +++ b/no-pdi/cmake/PDITargets.cmake @@ -0,0 +1,10 @@ +add_library(PDI::pdi INTERFACE IMPORTED) +add_library(PDI::PDI_C INTERFACE IMPORTED) +set_target_properties(PDI::pdi PROPERTIES +# IMPORTED_LOCATION "${CMAKE_CURRENT_LIST_DIR}/../lib/PDI_C.so" + INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" +) +set_target_properties(PDI::PDI_C PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" +) + diff --git a/no-pdi/cmake/no-pdi.cmake b/no-pdi/cmake/no-pdi.cmake index 9f6d345d1..06b209a49 100644 --- a/no-pdi/cmake/no-pdi.cmake +++ b/no-pdi/cmake/no-pdi.cmake @@ -33,4 +33,22 @@ add_library(PDI_C INTERFACE) add_library(PDI::pdi ALIAS PDI_C) add_library(PDI::PDI_C ALIAS PDI_C) -target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../include") +##target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../include") +target_include_directories(PDI_C INTERFACE $) + +# Install the library and configuration files +install(TARGETS PDI_C + EXPORT PDITargets + INCLUDES DESTINATION include +) + +install(EXPORT PDITargets + FILE PDITargets.cmake + DESTINATION lib/cmake/PDI +) + +install(FILES + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfigVersion.cmake" + DESTINATION lib/cmake/PDI +) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 05deb1ee0..ecda9e42f 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -109,23 +109,26 @@ typedef struct PDI_errhandler_s { } PDI_errhandler_t; +#ifndef PDI_NULL_HANDLER_DEFINED +#define PDI_NULL_HANDLER_DEFINED /** Does nothing */ -static const PDI_errhandler_t PDI_NULL_HANDLER = {NULL, NULL}; +const PDI_errhandler_t PDI_NULL_HANDLER = {NULL, NULL}; /** Prints the error message and aborts if the status is invalid */ -static const PDI_errhandler_t PDI_ASSERT_HANDLER = PDI_NULL_HANDLER; +const PDI_errhandler_t PDI_ASSERT_HANDLER = PDI_NULL_HANDLER; /** Prints the error message and continue if the status is invalid */ -static const PDI_errhandler_t PDI_WARN_HANDLER = PDI_NULL_HANDLER; +const PDI_errhandler_t PDI_WARN_HANDLER = PDI_NULL_HANDLER; +#endif /** Return a human-readabe message describing the last error that occured in PDI */ static inline const char* PDI_errmsg(void) { - return 0; + return ""; } /** Sets the error handler to use diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e910aa680..7551a9e74 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -31,64 +31,8 @@ set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" ON) option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) -option(WITHOUT_PDI "Disable PDI" OFF) -# Includes include(CTest) -if(WITHOUT_PDI) - - find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - message(WARNING "PDI is disabled for unit testing (use test 07 for no pdi).") - include(${CMAKE_SOURCE_DIR}/../no-pdi/cmake/no-pdi.cmake) - include_directories(${CMAKE_SOURCE_DIR}) - - add_executable(test_07_main_C test_07_main.c) - set(BUILD_FLAGS_FOR_C "-Wall") - target_compile_options(test_07_main_C PRIVATE - $<$:${BUILD_FLAGS_FOR_C}>) - target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) - add_test(NAME test_07_main_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_main.yml") - - add_executable(test_07_main_CXX test_07_main.cpp) - set(BUILD_FLAGS_FOR_CXX "-Wall") - target_compile_options(test_07_main_CXX PRIVATE - $<$:${BUILD_FLAGS_FOR_CXX}>) - set_target_properties(test_07_main_CXX PROPERTIES CXX_STANDARD 11) - set_target_properties(test_07_main_CXX PROPERTIES LANGUAGE CXX) - set_target_properties(test_07_main_CXX PROPERTIES LINKER_LANGUAGE CXX) - target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) - add_test(NAME test_07_main_CXX COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_main.yml") - -else() - - find_package(PDI REQUIRED COMPONENTS C) - - if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") - - add_executable(test_01_C test_01.c) - target_link_libraries(test_01_C PDI::PDI_C) - add_test(NAME test_01_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_01.yml") - - add_executable(test_02_C test_02.c) - target_link_libraries(test_02_C PDI::PDI_C) - add_test(NAME test_02_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_02.yml") - - add_executable(test_03_C test_03.c) - target_link_libraries(test_03_C PDI::PDI_C) - add_test(NAME test_03_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_03.yml") - - add_executable(test_04_C test_04.c) - target_link_libraries(test_04_C PDI::PDI_C) - add_test(NAME test_04_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_04.yml") - - endif("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") - if("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") - - add_executable(test_05_C test_05.c) - target_link_libraries(test_05_C PDI::PDI_C) - add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_05.yml") - - endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") - -endif() +add_subdirectory(tests_pdi/) +add_subdirectory(tests_no-pdi/) \ No newline at end of file diff --git a/tests/add_all_tests.sh b/tests/add_all_tests.sh new file mode 100644 index 000000000..aabd80a47 --- /dev/null +++ b/tests/add_all_tests.sh @@ -0,0 +1,6 @@ +#!/bin/bash +cd tests_no-pdi +rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake && cmake . +cd ../tests_pdi +rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake && cmake . +cd .. diff --git a/tests/tests_no-pdi/CMakeLists.txt b/tests/tests_no-pdi/CMakeLists.txt new file mode 100644 index 000000000..f0e6c5f5f --- /dev/null +++ b/tests/tests_no-pdi/CMakeLists.txt @@ -0,0 +1,57 @@ +#============================================================================= +# Copyright (C) 2020 Institute of Bioorganic Chemistry Polish Academy of Science (PSNC) +# Copyright (C) 2020-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * 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. +# * Neither the name of CEA nor the names of its contributors may be used to +# endorse or promote products derived from this software without specific +# prior written permission. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#============================================================================= + +cmake_minimum_required(VERSION 3.16...3.29) +project(pdi_tests LANGUAGES C CXX) +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") + +set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") + +option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" ON) +option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) + +include(CTest) + +find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +message(WARNING "PDI is disabled on test 07 for no pdi.") +include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/no-pdi.cmake) +include_directories(${CMAKE_CURRENT_LIST_DIR}) + +add_executable(test_07_main_C test_07_main.c) +set(BUILD_FLAGS_FOR_C "-Wall") +target_compile_options(test_07_main_C PRIVATE + $<$:${BUILD_FLAGS_FOR_C}>) +target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) +add_test(NAME test_07_main_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_main.yml") + +add_executable(test_07_main_CXX test_07_main.cpp) +set(BUILD_FLAGS_FOR_CXX "-Wall") +target_compile_options(test_07_main_CXX PRIVATE + $<$:${BUILD_FLAGS_FOR_CXX}>) +set_target_properties(test_07_main_CXX PROPERTIES CXX_STANDARD 11) +set_target_properties(test_07_main_CXX PROPERTIES LANGUAGE CXX) +set_target_properties(test_07_main_CXX PROPERTIES LINKER_LANGUAGE CXX) +target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) +add_test(NAME test_07_main_CXX COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_main.yml") \ No newline at end of file diff --git a/tests/test_07_main.c b/tests/tests_no-pdi/test_07_main.c similarity index 100% rename from tests/test_07_main.c rename to tests/tests_no-pdi/test_07_main.c diff --git a/tests/test_07_main.cpp b/tests/tests_no-pdi/test_07_main.cpp similarity index 100% rename from tests/test_07_main.cpp rename to tests/tests_no-pdi/test_07_main.cpp diff --git a/tests/test_07_no-pdi.h b/tests/tests_no-pdi/test_07_no-pdi.h similarity index 98% rename from tests/test_07_no-pdi.h rename to tests/tests_no-pdi/test_07_no-pdi.h index 77d72ee02..ef792ac49 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/tests_no-pdi/test_07_no-pdi.h @@ -84,7 +84,7 @@ int tests(int argc, char* argv[]) { assert(PDI_OK == PDI_init(PC_parse_path(argv[1]))); - assert(NULL == PDI_errmsg()); + assert(PDI_errmsg()); errhandler(); share(); diff --git a/tests/test_07_no-pdi.yml b/tests/tests_no-pdi/test_07_no-pdi.yml similarity index 100% rename from tests/test_07_no-pdi.yml rename to tests/tests_no-pdi/test_07_no-pdi.yml diff --git a/tests/tests_pdi/CMakeLists.txt b/tests/tests_pdi/CMakeLists.txt new file mode 100644 index 000000000..535ab009f --- /dev/null +++ b/tests/tests_pdi/CMakeLists.txt @@ -0,0 +1,64 @@ +#============================================================================= +# Copyright (C) 2020 Institute of Bioorganic Chemistry Polish Academy of Science (PSNC) +# Copyright (C) 2020-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * 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. +# * Neither the name of CEA nor the names of its contributors may be used to +# endorse or promote products derived from this software without specific +# prior written permission. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#============================================================================= + +cmake_minimum_required(VERSION 3.16...3.29) +project(pdi_tests LANGUAGES C CXX) +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") + +set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") + +option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" ON) +option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) + +include(CTest) + +find_package(PDI REQUIRED COMPONENTS C) + +if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") + +add_executable(test_01_C test_01.c) +target_link_libraries(test_01_C PDI::PDI_C) +add_test(NAME test_01_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_01.yml") + +add_executable(test_02_C test_02.c) +target_link_libraries(test_02_C PDI::PDI_C) +add_test(NAME test_02_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_02.yml") + +add_executable(test_03_C test_03.c) +target_link_libraries(test_03_C PDI::PDI_C) +add_test(NAME test_03_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_03.yml") + +add_executable(test_04_C test_04.c) +target_link_libraries(test_04_C PDI::PDI_C) +add_test(NAME test_04_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_04.yml") + +endif("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") +if("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") + +add_executable(test_05_C test_05.c) +target_link_libraries(test_05_C PDI::PDI_C) +add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_05.yml") + +endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") \ No newline at end of file diff --git a/tests/test.h b/tests/tests_pdi/test.h similarity index 100% rename from tests/test.h rename to tests/tests_pdi/test.h diff --git a/tests/test_01.c b/tests/tests_pdi/test_01.c similarity index 100% rename from tests/test_01.c rename to tests/tests_pdi/test_01.c diff --git a/tests/test_01.yml b/tests/tests_pdi/test_01.yml similarity index 100% rename from tests/test_01.yml rename to tests/tests_pdi/test_01.yml diff --git a/tests/test_02.c b/tests/tests_pdi/test_02.c similarity index 100% rename from tests/test_02.c rename to tests/tests_pdi/test_02.c diff --git a/tests/test_02.yml b/tests/tests_pdi/test_02.yml similarity index 100% rename from tests/test_02.yml rename to tests/tests_pdi/test_02.yml diff --git a/tests/test_03.c b/tests/tests_pdi/test_03.c similarity index 100% rename from tests/test_03.c rename to tests/tests_pdi/test_03.c diff --git a/tests/test_03.yml b/tests/tests_pdi/test_03.yml similarity index 100% rename from tests/test_03.yml rename to tests/tests_pdi/test_03.yml diff --git a/tests/test_04.c b/tests/tests_pdi/test_04.c similarity index 100% rename from tests/test_04.c rename to tests/tests_pdi/test_04.c diff --git a/tests/test_04.yml b/tests/tests_pdi/test_04.yml similarity index 100% rename from tests/test_04.yml rename to tests/tests_pdi/test_04.yml diff --git a/tests/test_05.c b/tests/tests_pdi/test_05.c similarity index 100% rename from tests/test_05.c rename to tests/tests_pdi/test_05.c diff --git a/tests/test_05.yml b/tests/tests_pdi/test_05.yml similarity index 100% rename from tests/test_05.yml rename to tests/tests_pdi/test_05.yml From 58b67c3233a4bcb2f9e48ff2b6eb7d72104d93a0 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 7 Mar 2025 10:33:30 +0100 Subject: [PATCH 026/372] PR feedback fixes 5 - Replace FindPDI.cmake by PDIConfig.cmake --- no-pdi/CMakeLists.txt | 109 +++++++++++++++++++++------------- no-pdi/cmake/PDITargets.cmake | 2 +- no-pdi/cmake/no-pdi.cmake | 32 +++++----- 3 files changed, 85 insertions(+), 58 deletions(-) diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index 586aec7f1..9c153d0ef 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -32,47 +32,74 @@ # include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/no-pdi.cmake") + + cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES C CXX) -# Create an interface library -add_library(PDI_C INTERFACE) - -# Create aliases for the interface library -add_library(PDI::pdi ALIAS PDI_C) -add_library(PDI::PDI_C ALIAS PDI_C) - -# Specify include directories using generator expressions -target_include_directories(PDI_C INTERFACE $) - -# Export the interface library -export(TARGETS PDI_C FILE PDITargets.cmake) - -# Install the interface library and configuration files -install(TARGETS PDI_C - EXPORT PDITargets - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - RUNTIME DESTINATION bin - INCLUDES DESTINATION include -) - -install(EXPORT PDITargets - FILE PDITargets.cmake - DESTINATION lib/cmake/PDI -) - -install(FILES - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake" - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfigVersion.cmake" - DESTINATION lib/cmake/PDI -) - -# Ensure that the parent directories are created -file(MAKE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/lib/cmake/PDI") -file(MAKE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/lib") -file(MAKE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/include") -file(MAKE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/bin") - -# Specify a custom installation directory -set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE STRING "Installation prefix directory") +# Set the CMAKE_PREFIX_PATH to include the directory containing PDIConfig.cmake +set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + +# Find the PDI package +find_package(PDI REQUIRED) + +# Add your executable or library target +add_executable(my_executable main.cpp) + +# Link the PDI library to your target +if(PDI_FOUND) + target_link_libraries(my_executable PDI::pdi) +endif() + + + +# # cmake_minimum_required(VERSION 3.16...3.29) +# # project(PDI LANGUAGES C CXX) + +# # # Specify a custom installation directory +# # set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/cmake/install" CACHE STRING "Installation prefix directory") + +# # # Create an interface library +# # add_library(PDI_C INTERFACE) + +# # # Create aliases for the interface library +# # add_library(PDI::pdi ALIAS PDI_C) +# # add_library(PDI::PDI_C ALIAS PDI_C) + +# # # Specify include directories using generator expressions +# # target_include_directories(PDI_C INTERFACE $) + +# # # Export the interface library +# # export(TARGETS PDI_C FILE PDITargets.cmake) + +# # # Install the interface library and configuration files +# # install(TARGETS PDI_C +# # EXPORT PDITargets +# # LIBRARY DESTINATION lib +# # ARCHIVE DESTINATION lib +# # RUNTIME DESTINATION bin +# # INCLUDES DESTINATION include +# # ) + +# # install(EXPORT PDITargets +# # FILE PDITargets.cmake +# # DESTINATION lib/cmake/PDI +# # ) + +# # install(FILES +# # "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake" +# # "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfigVersion.cmake" +# # DESTINATION lib/cmake/PDI +# # ) + +# # # # Ensure that the parent directories are created relative to the installation prefix +# # # install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/" +# # # "${CMAKE_CURRENT_SOURCE_DIR}/cmake/" +# # # DESTINATION lib/cmake/PDI +# # # ) + +# # # Ensure that the parent directories are created +# # file(MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/lib/cmake/PDI") +# # file(MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/lib") +# # file(MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/include") +# # file(MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/bin") diff --git a/no-pdi/cmake/PDITargets.cmake b/no-pdi/cmake/PDITargets.cmake index 089eef129..cd0b92b3a 100644 --- a/no-pdi/cmake/PDITargets.cmake +++ b/no-pdi/cmake/PDITargets.cmake @@ -1,4 +1,4 @@ -add_library(PDI::pdi INTERFACE IMPORTED) +add_library(PDI::pdi INTERFACE IMPORTED) add_library(PDI::PDI_C INTERFACE IMPORTED) set_target_properties(PDI::pdi PROPERTIES # IMPORTED_LOCATION "${CMAKE_CURRENT_LIST_DIR}/../lib/PDI_C.so" diff --git a/no-pdi/cmake/no-pdi.cmake b/no-pdi/cmake/no-pdi.cmake index 06b209a49..30e6541b3 100644 --- a/no-pdi/cmake/no-pdi.cmake +++ b/no-pdi/cmake/no-pdi.cmake @@ -33,22 +33,22 @@ add_library(PDI_C INTERFACE) add_library(PDI::pdi ALIAS PDI_C) add_library(PDI::PDI_C ALIAS PDI_C) -##target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../include") -target_include_directories(PDI_C INTERFACE $) +target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../include") +# target_include_directories(PDI_C INTERFACE $) -# Install the library and configuration files -install(TARGETS PDI_C - EXPORT PDITargets - INCLUDES DESTINATION include -) +# # Install the library and configuration files +# install(TARGETS PDI_C +# EXPORT PDITargets +# INCLUDES DESTINATION include +# ) -install(EXPORT PDITargets - FILE PDITargets.cmake - DESTINATION lib/cmake/PDI -) +# install(EXPORT PDITargets +# FILE PDITargets.cmake +# DESTINATION lib/cmake/PDI +# ) -install(FILES - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake" - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfigVersion.cmake" - DESTINATION lib/cmake/PDI -) +# install(FILES +# "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake" +# "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfigVersion.cmake" +# DESTINATION lib/cmake/PDI +# ) From 192408c5de417a91cb86b50f172fedf93633908e Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 7 Mar 2025 11:52:11 +0100 Subject: [PATCH 027/372] Add tests cases for both of no-pdi alternatives --- tests/tests_no-pdi/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/tests_no-pdi/CMakeLists.txt b/tests/tests_no-pdi/CMakeLists.txt index f0e6c5f5f..cba3fdfcd 100644 --- a/tests/tests_no-pdi/CMakeLists.txt +++ b/tests/tests_no-pdi/CMakeLists.txt @@ -31,12 +31,17 @@ set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" ON) option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) +option(EXAMPLE_NO_PDI "Disable PDI using PDIConfig" OFF) include(CTest) find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) message(WARNING "PDI is disabled on test 07 for no pdi.") -include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/no-pdi.cmake) +if (EXAMPLE_NO_PDI) + include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/no-pdi.cmake) +elseif(PDI_ROOT) + include(${PDI_ROOT}/PDIConfig.cmake) +endif() include_directories(${CMAKE_CURRENT_LIST_DIR}) add_executable(test_07_main_C test_07_main.c) From 761aae63db6ba83a374f4cb1d994f5f0b45ae816 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 7 Mar 2025 15:05:49 +0100 Subject: [PATCH 028/372] PR feedback fixes 6 --- .gitignore | 7 ---- no-pdi/CMakeLists.txt | 15 ++++---- no-pdi/cmake/FindPDI.cmake | 44 ----------------------- no-pdi/cmake/PDIConfig.cmake | 37 +++++++++++++++++++- no-pdi/cmake/PDIConfigVersion.cmake | 29 ++++++++++++++++ no-pdi/cmake/PDITargets.cmake | 10 ------ no-pdi/cmake/no-pdi.cmake | 54 ----------------------------- tests/tests_no-pdi/CMakeLists.txt | 2 +- 8 files changed, 74 insertions(+), 124 deletions(-) delete mode 100644 no-pdi/cmake/FindPDI.cmake delete mode 100644 no-pdi/cmake/PDITargets.cmake delete mode 100644 no-pdi/cmake/no-pdi.cmake diff --git a/.gitignore b/.gitignore index 5253ff619..0d20b6487 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1 @@ *.pyc -CMakeCache.txt -CMakeFiles -cmake_install.cmake -CTestTestfile.cmake -DartConfiguration.tcl -Makefile -/Testing diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index 9c153d0ef..1ec39b011 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -41,15 +41,16 @@ project(PDI LANGUAGES C CXX) set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") # Find the PDI package -find_package(PDI REQUIRED) +# find_package(PDI REQUIRED) +include(cmake/PDIConfig.cmake) -# Add your executable or library target -add_executable(my_executable main.cpp) +# # Add your executable or library target +# add_executable(my_executable main.cpp) -# Link the PDI library to your target -if(PDI_FOUND) - target_link_libraries(my_executable PDI::pdi) -endif() +# # Link the PDI library to your target +# if(PDI_FOUND) +# target_link_libraries(my_executable PDI::pdi) +# endif() diff --git a/no-pdi/cmake/FindPDI.cmake b/no-pdi/cmake/FindPDI.cmake deleted file mode 100644 index 31721aff5..000000000 --- a/no-pdi/cmake/FindPDI.cmake +++ /dev/null @@ -1,44 +0,0 @@ -#============================================================================= -# Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# * 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. -# * Neither the names of CEA, nor the names of the 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. -#============================================================================= - -set(PDI_DIRS "${CMAKE_CURRENT_LIST_DIR}") -set(PDI_LIBRARIES "") -set(PDI_FOUND TRUE) -include(${PDI_DIRS}/no-pdi.cmake) - -# Handle the REQUIRED and QUIET options -if(PDI_FOUND) - if(NOT PDI_FIND_QUIETLY) - message(STATUS "Found PDI: ${PDI_INCLUDE_DIRS}.") - endif() -else() - if(PDI_FIND_REQUIRED) - message(FATAL_ERROR "Could not find PDI.") - endif() -endif() diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index 2dd76735e..b566ef7d3 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -1 +1,36 @@ -include("${CMAKE_CURRENT_LIST_DIR}/PDITargets.cmake") +#============================================================================= +# Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * 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. +# * Neither the names of CEA, nor the names of the 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. +#============================================================================= + +add_library(PDI_C INTERFACE) +add_library(PDI::pdi ALIAS PDI_C) +add_library(PDI::PDI_C ALIAS PDI_C) + +set_target_properties(PDI_C PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" +) diff --git a/no-pdi/cmake/PDIConfigVersion.cmake b/no-pdi/cmake/PDIConfigVersion.cmake index b299b3ab6..e1032a2e8 100644 --- a/no-pdi/cmake/PDIConfigVersion.cmake +++ b/no-pdi/cmake/PDIConfigVersion.cmake @@ -1 +1,30 @@ +#============================================================================= +# Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * 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. +# * Neither the names of CEA, nor the names of the 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. +#============================================================================= + set(PDI_VERSION "1.8.3") diff --git a/no-pdi/cmake/PDITargets.cmake b/no-pdi/cmake/PDITargets.cmake deleted file mode 100644 index cd0b92b3a..000000000 --- a/no-pdi/cmake/PDITargets.cmake +++ /dev/null @@ -1,10 +0,0 @@ -add_library(PDI::pdi INTERFACE IMPORTED) -add_library(PDI::PDI_C INTERFACE IMPORTED) -set_target_properties(PDI::pdi PROPERTIES -# IMPORTED_LOCATION "${CMAKE_CURRENT_LIST_DIR}/../lib/PDI_C.so" - INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" -) -set_target_properties(PDI::PDI_C PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" -) - diff --git a/no-pdi/cmake/no-pdi.cmake b/no-pdi/cmake/no-pdi.cmake deleted file mode 100644 index 30e6541b3..000000000 --- a/no-pdi/cmake/no-pdi.cmake +++ /dev/null @@ -1,54 +0,0 @@ -#============================================================================= -# Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# * 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. -# * Neither the names of CEA, nor the names of the 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. -#============================================================================= - -project(PDI LANGUAGES C CXX) - -add_library(PDI_C INTERFACE) -add_library(PDI::pdi ALIAS PDI_C) -add_library(PDI::PDI_C ALIAS PDI_C) - -target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../include") -# target_include_directories(PDI_C INTERFACE $) - -# # Install the library and configuration files -# install(TARGETS PDI_C -# EXPORT PDITargets -# INCLUDES DESTINATION include -# ) - -# install(EXPORT PDITargets -# FILE PDITargets.cmake -# DESTINATION lib/cmake/PDI -# ) - -# install(FILES -# "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake" -# "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfigVersion.cmake" -# DESTINATION lib/cmake/PDI -# ) diff --git a/tests/tests_no-pdi/CMakeLists.txt b/tests/tests_no-pdi/CMakeLists.txt index cba3fdfcd..91c9f950b 100644 --- a/tests/tests_no-pdi/CMakeLists.txt +++ b/tests/tests_no-pdi/CMakeLists.txt @@ -37,7 +37,7 @@ include(CTest) find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) message(WARNING "PDI is disabled on test 07 for no pdi.") -if (EXAMPLE_NO_PDI) +if(EXAMPLE_NO_PDI) include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/no-pdi.cmake) elseif(PDI_ROOT) include(${PDI_ROOT}/PDIConfig.cmake) From 8c092a4801c5ce3557acc585a5f6377a037e51c4 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 7 Mar 2025 15:46:56 +0100 Subject: [PATCH 029/372] PR feedback fixes 7 --- no-pdi/include/pdi.h | 9 +++------ pdi/docs/Using_PDI.md | 24 +++++++++++++----------- tests/tests_no-pdi/CMakeLists.txt | 2 +- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index ecda9e42f..ccf490663 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -109,20 +109,17 @@ typedef struct PDI_errhandler_s { } PDI_errhandler_t; -#ifndef PDI_NULL_HANDLER_DEFINED -#define PDI_NULL_HANDLER_DEFINED /** Does nothing */ -const PDI_errhandler_t PDI_NULL_HANDLER = {NULL, NULL}; +static const PDI_errhandler_t PDI_NULL_HANDLER = {NULL, NULL}; /** Prints the error message and aborts if the status is invalid */ -const PDI_errhandler_t PDI_ASSERT_HANDLER = PDI_NULL_HANDLER; +static const PDI_errhandler_t PDI_ASSERT_HANDLER = PDI_NULL_HANDLER; /** Prints the error message and continue if the status is invalid */ -const PDI_errhandler_t PDI_WARN_HANDLER = PDI_NULL_HANDLER; -#endif +static const PDI_errhandler_t PDI_WARN_HANDLER = PDI_NULL_HANDLER; /** Return a human-readabe message describing the last error that occured in PDI */ diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 96a2c7862..597073762 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -38,18 +38,9 @@ If source files (of application that uses %PDI) and specification tree file are For C make sure that source files that use %PDI API are including `pdi.h` header file. For Fortran make sure that source files that use %PDI API are using `%PDI` module file (`USE %PDI`). -%PDI can be disabled by using the `no-pdi` directory instead of the `pdi` directory. +%PDI can be disabled by using the `no-pdi` directory. -You can use the `find_package` method, which does not require to modify the -target `CMakeLists.txt` but requires to compile with an added argument pointing to the no-pdi folder. - -Use a `CMakeLists.txt` similar to `no-pdi_exampleTargetCMakeLists_findpackage.txt` for your target, -then use the following: -```bash -cmake . -DCMAKE_MODULE_PATH="////pdi/no-pdi/cmake" -``` - -Alternatively, you can use the `include`/`target_include_directories` method, +You can use the `include`/`target_include_directories` method, which does not require to pass an additional argument at compilation but requires to add an option to the target `CMakeLists.txt`, which must be enabled through an option at compilation. @@ -60,6 +51,17 @@ adding the CMake option `WITHOUT_PDI`, then use the following: ```bash cmake . -DWITHOUT_PDI=ON ``` + +Alternatively, if modifying the CMakeList.txt is unpractical, you can use the `find_package` method, +which does not require to modify the +target `CMakeLists.txt` but requires to compile with an added argument pointing to the no-pdi folder. + +Use a `CMakeLists.txt` similar to `no-pdi_exampleTargetCMakeLists_findpackage.txt` for your target, +then use the following: +```bash +cmake . -DCMAKE_MODULE_PATH="////pdi/no-pdi/cmake" +``` + %PDI can be re-enabled by reversing those modifications. ### Compiling by hand {#compiling_by_hand} diff --git a/tests/tests_no-pdi/CMakeLists.txt b/tests/tests_no-pdi/CMakeLists.txt index 91c9f950b..bae94e5ae 100644 --- a/tests/tests_no-pdi/CMakeLists.txt +++ b/tests/tests_no-pdi/CMakeLists.txt @@ -38,7 +38,7 @@ include(CTest) find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) message(WARNING "PDI is disabled on test 07 for no pdi.") if(EXAMPLE_NO_PDI) - include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/no-pdi.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) elseif(PDI_ROOT) include(${PDI_ROOT}/PDIConfig.cmake) endif() From b3ab6c0cef53694211fa876f38a14735d666297f Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 11 Mar 2025 10:03:07 +0100 Subject: [PATCH 030/372] Temporary safety commit --- tests/tests_no-pdi/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/tests_no-pdi/CMakeLists.txt b/tests/tests_no-pdi/CMakeLists.txt index bae94e5ae..6817650a3 100644 --- a/tests/tests_no-pdi/CMakeLists.txt +++ b/tests/tests_no-pdi/CMakeLists.txt @@ -38,8 +38,10 @@ include(CTest) find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) message(WARNING "PDI is disabled on test 07 for no pdi.") if(EXAMPLE_NO_PDI) + message(WARNING "Using include") include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) elseif(PDI_ROOT) + message(WARNING "Using include 2 ???") include(${PDI_ROOT}/PDIConfig.cmake) endif() include_directories(${CMAKE_CURRENT_LIST_DIR}) From 396e0937fcc69423760e0b7fcd29bb75647e5b95 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 17 Mar 2025 12:03:52 +0100 Subject: [PATCH 031/372] PR feedback fixes 8 --- tests/tests_no-pdi/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/tests_no-pdi/CMakeLists.txt b/tests/tests_no-pdi/CMakeLists.txt index 6817650a3..14316eae3 100644 --- a/tests/tests_no-pdi/CMakeLists.txt +++ b/tests/tests_no-pdi/CMakeLists.txt @@ -37,12 +37,12 @@ include(CTest) find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) message(WARNING "PDI is disabled on test 07 for no pdi.") -if(EXAMPLE_NO_PDI) - message(WARNING "Using include") - include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) -elseif(PDI_ROOT) - message(WARNING "Using include 2 ???") +if(PDI_ROOT) + message(WARNING "Using include through PDI_ROOT") include(${PDI_ROOT}/PDIConfig.cmake) +else() #if(EXAMPLE_NO_PDI) + message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") + include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) endif() include_directories(${CMAKE_CURRENT_LIST_DIR}) From 8ea80679c6627899e44fd79abcd00d34f3c57bc4 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 17 Mar 2025 14:56:54 +0100 Subject: [PATCH 032/372] PR feedback fixes 9 --- no-pdi/cmake/PDIConfig.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index b566ef7d3..1733f8caf 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -27,6 +27,17 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= +# Remove the existing targets if they exist +if(TARGET PDI_C) + remove_library(PDI_C) +endif() +if(TARGET PDI::pdi) + remove_library(PDI::pdi) +endif() +if(TARGET PDI::PDI_C) + remove_library(PDI::PDI_C) +endif() + add_library(PDI_C INTERFACE) add_library(PDI::pdi ALIAS PDI_C) add_library(PDI::PDI_C ALIAS PDI_C) From 341bc8f95aae8537dd99ce245e243a16fd3af180 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 17 Mar 2025 15:49:33 +0100 Subject: [PATCH 033/372] PR feedback fixes 10 --- no-pdi/cmake/PDIConfig.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index 1733f8caf..bd381cc26 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -29,13 +29,13 @@ # Remove the existing targets if they exist if(TARGET PDI_C) - remove_library(PDI_C) + remove_target(PDI_C) endif() if(TARGET PDI::pdi) - remove_library(PDI::pdi) + remove_target(PDI::pdi) endif() if(TARGET PDI::PDI_C) - remove_library(PDI::PDI_C) + remove_target(PDI::PDI_C) endif() add_library(PDI_C INTERFACE) From 58913e44bdf0335c377f58f0a8f58a09e4599d30 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 17 Mar 2025 16:24:05 +0100 Subject: [PATCH 034/372] PR feedback fixes 11 --- no-pdi/cmake/PDIConfig.cmake | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index bd381cc26..4585a23a9 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -27,15 +27,17 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -# Remove the existing targets if they exist +# Temporarily rename the existing targets if they exist if(TARGET PDI_C) - remove_target(PDI_C) + set_target_properties(PDI_C PROPERTIES OUTPUT_NAME PDI_C_TEMP) endif() + if(TARGET PDI::pdi) - remove_target(PDI::pdi) + set_target_properties(PDI::pdi PROPERTIES OUTPUT_NAME PDI_pdi_TEMP) endif() + if(TARGET PDI::PDI_C) - remove_target(PDI::PDI_C) + set_target_properties(PDI::PDI_C PROPERTIES OUTPUT_NAME PDI_PDI_C_TEMP) endif() add_library(PDI_C INTERFACE) @@ -45,3 +47,16 @@ add_library(PDI::PDI_C ALIAS PDI_C) set_target_properties(PDI_C PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" ) + +# Remove the temporarily renamed targets +if(TARGET PDI_C_TEMP) + remove_library(PDI_C_TEMP) +endif() + +if(TARGET PDI_pdi_TEMP) + remove_library(PDI_pdi_TEMP) +endif() + +if(TARGET PDI_PDI_C_TEMP) + remove_library(PDI_PDI_C_TEMP) +endif() From e3152bac858bdbb66b4852b2b3d55c4689aa8850 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 17 Mar 2025 16:52:56 +0100 Subject: [PATCH 035/372] PR feedback fixes 12 --- no-pdi/cmake/PDIConfig.cmake | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index 4585a23a9..49dbc8fbd 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -27,18 +27,13 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -# Temporarily rename the existing targets if they exist -if(TARGET PDI_C) - set_target_properties(PDI_C PROPERTIES OUTPUT_NAME PDI_C_TEMP) -endif() +# Collect the list of existing targets +get_cmake_property(_targets TARGETS) -if(TARGET PDI::pdi) - set_target_properties(PDI::pdi PROPERTIES OUTPUT_NAME PDI_pdi_TEMP) -endif() - -if(TARGET PDI::PDI_C) - set_target_properties(PDI::PDI_C PROPERTIES OUTPUT_NAME PDI_PDI_C_TEMP) -endif() +# Remove the existing targets from the list +list(REMOVE_ITEM _targets PDI_C) +list(REMOVE_ITEM _targets PDI::pdi) +list(REMOVE_ITEM _targets PDI::PDI_C) add_library(PDI_C INTERFACE) add_library(PDI::pdi ALIAS PDI_C) @@ -47,16 +42,3 @@ add_library(PDI::PDI_C ALIAS PDI_C) set_target_properties(PDI_C PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" ) - -# Remove the temporarily renamed targets -if(TARGET PDI_C_TEMP) - remove_library(PDI_C_TEMP) -endif() - -if(TARGET PDI_pdi_TEMP) - remove_library(PDI_pdi_TEMP) -endif() - -if(TARGET PDI_PDI_C_TEMP) - remove_library(PDI_PDI_C_TEMP) -endif() From 856d2728e7ac743023a5667dafb6cfe527f8e0f0 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 18 Mar 2025 10:55:53 +0100 Subject: [PATCH 036/372] PR feedback fixes 13 --- no-pdi/cmake/PDIConfig.cmake | 18 +++++++----------- tests/add_all_tests.sh | 0 2 files changed, 7 insertions(+), 11 deletions(-) mode change 100644 => 100755 tests/add_all_tests.sh diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index 49dbc8fbd..b0dc0dcaf 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -27,17 +27,13 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -# Collect the list of existing targets -get_cmake_property(_targets TARGETS) - -# Remove the existing targets from the list -list(REMOVE_ITEM _targets PDI_C) -list(REMOVE_ITEM _targets PDI::pdi) -list(REMOVE_ITEM _targets PDI::PDI_C) - -add_library(PDI_C INTERFACE) -add_library(PDI::pdi ALIAS PDI_C) -add_library(PDI::PDI_C ALIAS PDI_C) +if (NOT TARGET PDI_C) + add_library(PDI_C INTERFACE) + add_library(PDI::pdi ALIAS PDI_C) + add_library(PDI::PDI_C ALIAS PDI_C) +else() + message(WARNING "PDI library is already defined and won't be overwritten.") +endif() set_target_properties(PDI_C PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" diff --git a/tests/add_all_tests.sh b/tests/add_all_tests.sh old mode 100644 new mode 100755 From 0a04fcb3dd629f0077b8d66f2c6f251ea588631c Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 19 Mar 2025 09:18:16 +0100 Subject: [PATCH 037/372] PR feedback fixes 14 --- bin/build_and_run_all_tests | 21 +++++++++-- no-pdi/CMakeLists.txt | 73 +----------------------------------- no-pdi/cmake/PDIConfig.cmake | 10 ++--- tests/CMakeLists.txt | 9 ++++- 4 files changed, 30 insertions(+), 83 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 56b9297d9..9c9fe4a35 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -29,7 +29,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -set -xe +# set -xe @@ -41,6 +41,12 @@ cd "${TEST_DIR}" cd "$(mktemp -d pdibuild.XXXXX)" TEST_DIR="${PWD}" +cd "${SRCDIR}" +TEST_DIR_NO_PDI="${TEST_DIR_NO_PDI:-${PWD}}" +cd "${TEST_DIR_NO_PDI}" +cd "$(mktemp -d pdibuild.XXXXX)" +TEST_DIR_NO_PDI="${PWD}" + cd "${SRCDIR}" cd "$(dirname "$0")/.." SRCDIR="${PWD}" @@ -107,6 +113,15 @@ fi # Configure, build & test -cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make ${MAKEFLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -j8 || true + + + +# Configure, build & test for no-pdi + +cd "${TEST_DIR_NO_PDI}" +cmake -DBUILD_BENCHMARKING=OFF -DDISABLE_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -j8 || true diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index 1ec39b011..9b577189a 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -27,80 +27,11 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -# cmake_minimum_required(VERSION 3.16...3.29) -# project(PDI LANGUAGES C CXX) - -# include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/no-pdi.cmake") - - - cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES C CXX) # Set the CMAKE_PREFIX_PATH to include the directory containing PDIConfig.cmake set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") -# Find the PDI package -# find_package(PDI REQUIRED) -include(cmake/PDIConfig.cmake) - -# # Add your executable or library target -# add_executable(my_executable main.cpp) - -# # Link the PDI library to your target -# if(PDI_FOUND) -# target_link_libraries(my_executable PDI::pdi) -# endif() - - - -# # cmake_minimum_required(VERSION 3.16...3.29) -# # project(PDI LANGUAGES C CXX) - -# # # Specify a custom installation directory -# # set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/cmake/install" CACHE STRING "Installation prefix directory") - -# # # Create an interface library -# # add_library(PDI_C INTERFACE) - -# # # Create aliases for the interface library -# # add_library(PDI::pdi ALIAS PDI_C) -# # add_library(PDI::PDI_C ALIAS PDI_C) - -# # # Specify include directories using generator expressions -# # target_include_directories(PDI_C INTERFACE $) - -# # # Export the interface library -# # export(TARGETS PDI_C FILE PDITargets.cmake) - -# # # Install the interface library and configuration files -# # install(TARGETS PDI_C -# # EXPORT PDITargets -# # LIBRARY DESTINATION lib -# # ARCHIVE DESTINATION lib -# # RUNTIME DESTINATION bin -# # INCLUDES DESTINATION include -# # ) - -# # install(EXPORT PDITargets -# # FILE PDITargets.cmake -# # DESTINATION lib/cmake/PDI -# # ) - -# # install(FILES -# # "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake" -# # "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfigVersion.cmake" -# # DESTINATION lib/cmake/PDI -# # ) - -# # # # Ensure that the parent directories are created relative to the installation prefix -# # # install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/" -# # # "${CMAKE_CURRENT_SOURCE_DIR}/cmake/" -# # # DESTINATION lib/cmake/PDI -# # # ) - -# # # Ensure that the parent directories are created -# # file(MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/lib/cmake/PDI") -# # file(MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/lib") -# # file(MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/include") -# # file(MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/bin") +# Include PDI +include(cmake/PDIConfig.cmake) \ No newline at end of file diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index b0dc0dcaf..b566ef7d3 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -27,13 +27,9 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -if (NOT TARGET PDI_C) - add_library(PDI_C INTERFACE) - add_library(PDI::pdi ALIAS PDI_C) - add_library(PDI::PDI_C ALIAS PDI_C) -else() - message(WARNING "PDI library is already defined and won't be overwritten.") -endif() +add_library(PDI_C INTERFACE) +add_library(PDI::pdi ALIAS PDI_C) +add_library(PDI::PDI_C ALIAS PDI_C) set_target_properties(PDI_C PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7551a9e74..72ecbd617 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -30,9 +30,14 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" ON) +# option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" OFF) option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) -add_subdirectory(tests_pdi/) -add_subdirectory(tests_no-pdi/) \ No newline at end of file +# message("DISABLE_PDI:${DISABLE_PDI}") +if (DISABLE_PDI) + add_subdirectory(tests_no-pdi/) # no-pdi +else() + add_subdirectory(tests_pdi/) # pdi +endif() From efd9d5dc51bc6ee3f3fb29226183e3d2d59798e9 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 19 Mar 2025 13:11:42 +0100 Subject: [PATCH 038/372] PR feedback fixes 15 --- bin/build_and_run_all_tests | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 9c9fe4a35..398d5ab3a 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -122,6 +122,7 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $ # Configure, build & test for no-pdi cd "${TEST_DIR_NO_PDI}" +NO_PDI_TESTS="test_07_main_C test_07_main_CXX" cmake -DBUILD_BENCHMARKING=OFF -DDISABLE_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -j8 || true +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -j8 || true From 0857f73bd0fc34f8b4a5a39fddf00b583c1f67db Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 19 Mar 2025 13:32:52 +0100 Subject: [PATCH 039/372] PR feedback fixes 16 --- tests/add_all_tests.sh | 6 --- tests/tests_no-pdi/test_07_no-pdi.yml | 76 +++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 6 deletions(-) delete mode 100755 tests/add_all_tests.sh diff --git a/tests/add_all_tests.sh b/tests/add_all_tests.sh deleted file mode 100755 index aabd80a47..000000000 --- a/tests/add_all_tests.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -cd tests_no-pdi -rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake && cmake . -cd ../tests_pdi -rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake && cmake . -cd .. diff --git a/tests/tests_no-pdi/test_07_no-pdi.yml b/tests/tests_no-pdi/test_07_no-pdi.yml index e69de29bb..45381a721 100644 --- a/tests/tests_no-pdi/test_07_no-pdi.yml +++ b/tests/tests_no-pdi/test_07_no-pdi.yml @@ -0,0 +1,76 @@ +logging: + level: trace +data: + value_char: + type: char + char_array: + size: 3 + subtype: char + type: array + value_short: + type: int16 + short_array: + size: 3 + subtype: int16 + type: array + value_int: + type: int + int_array: + size: 3 + subtype: int + type: array + value_long: + type: int64 + long_array: + size: 3 + subtype: int64 + type: array + value_float: + type: float + float_array: + size: 3 + subtype: float + type: array + value_double: + type: double + double_array: + size: 3 + subtype: double + type: array +plugins: + set_value: + on_init: + - share: + - value_char: 42 + - char_array: [0, 1, 2] + - value_short: 4242 + - short_array: [3, 4, 5] + - value_int: 424242 + - int_array: [6, 7, 8] + - value_long: 424242424242 + - long_array: [9, 10, 11] + - value_float: 3.141592 + - float_array: + - 1.234567 + - 12.34567 + - 123.4567 + - value_double: 3.14159265 + - double_array: + - 1.23456789 + - 12.3456789 + - 123.456789 + on_finalize: + - release: + - value_char + - char_array + - value_short + - short_array + - value_int + - int_array + - value_long + - long_array + - value_float + - float_array + - value_double + - double_array + From 8e8f54c9be5d303bd5d97c69e8ad90ee696f81c0 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 25 Mar 2025 09:42:00 +0100 Subject: [PATCH 040/372] PR feedback fixes 17 - Fix no-pdi test and CI --- bin/build_and_run_all_tests | 8 ++++---- no-pdi/include/pdi.h | 3 +++ tests/tests_no-pdi/CMakeLists.txt | 2 +- tests/tests_no-pdi/test_07_no-pdi.h | 1 - 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 398d5ab3a..47a865aa1 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -113,9 +113,9 @@ fi # Configure, build & test -cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -j8 || true +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} ${MAKEFLAGS} || true @@ -123,6 +123,6 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $ cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DDISABLE_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DDISABLE_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -j8 || true +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} ${MAKEFLAGS} || true diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index ccf490663..ef5593e96 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -55,6 +55,9 @@ #ifndef PDI_H_ #define PDI_H_ +#include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/tests/tests_no-pdi/CMakeLists.txt b/tests/tests_no-pdi/CMakeLists.txt index 14316eae3..727f68b32 100644 --- a/tests/tests_no-pdi/CMakeLists.txt +++ b/tests/tests_no-pdi/CMakeLists.txt @@ -61,4 +61,4 @@ set_target_properties(test_07_main_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_07_main_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_07_main_CXX PROPERTIES LINKER_LANGUAGE CXX) target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) -add_test(NAME test_07_main_CXX COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_main.yml") \ No newline at end of file +add_test(NAME test_07_main_CXX COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_main.yml") diff --git a/tests/tests_no-pdi/test_07_no-pdi.h b/tests/tests_no-pdi/test_07_no-pdi.h index ef792ac49..0710445e6 100644 --- a/tests/tests_no-pdi/test_07_no-pdi.h +++ b/tests/tests_no-pdi/test_07_no-pdi.h @@ -24,7 +24,6 @@ #include -#include #include void share() From aed54a739d85a0fcc1da97c67edfb1b08f3d4eb0 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 28 Mar 2025 10:57:18 +0100 Subject: [PATCH 041/372] PR feedback fixes 18 - Fix no-pdi test and CI 2 --- tests/CMakeLists.txt | 2 - tests/tests_no-pdi/test_07_no-pdi.h | 78 +++++++++++++++++++++++------ 2 files changed, 63 insertions(+), 17 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 72ecbd617..37c937ca3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -30,12 +30,10 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" ON) -# option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" OFF) option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) -# message("DISABLE_PDI:${DISABLE_PDI}") if (DISABLE_PDI) add_subdirectory(tests_no-pdi/) # no-pdi else() diff --git a/tests/tests_no-pdi/test_07_no-pdi.h b/tests/tests_no-pdi/test_07_no-pdi.h index 0710445e6..ab268522c 100644 --- a/tests/tests_no-pdi/test_07_no-pdi.h +++ b/tests/tests_no-pdi/test_07_no-pdi.h @@ -29,61 +29,105 @@ void share() { int to_share[2] = {1, 1}; - assert(PDI_OK == PDI_share("to_share", to_share, PDI_OUT)); + if( PDI_OK != PDI_share("to_share", to_share, PDI_OUT) ) + { + fprintf(stderr, "*** Error: no-pdi share\n"); + exit(1); + } } void access() //access { int to_access[2] = {1, 1}; - assert(PDI_OK == PDI_access("to_access", (void**)&to_access, PDI_IN)); + if( PDI_OK != PDI_access("to_access", (void**)&to_access, PDI_IN) ) + { + fprintf(stderr, "*** Error: no-pdi access\n"); + exit(1); + } } void release() //access/release { int to_release[2] = {1, 1}; PDI_access("to_access", (void**)&to_release, PDI_IN); - assert(PDI_OK == PDI_release("to_release")); + if( PDI_OK != PDI_release("to_release") ) + { + fprintf(stderr, "*** Error: no-pdi release\n"); + exit(1); + } + } void reclaim() //share/reclaim { int to_reclaim[2] = {1, 1}; PDI_share("to_release", to_reclaim, PDI_OUT); - assert(PDI_OK == PDI_reclaim("to_reclaim")); + if( PDI_OK != PDI_reclaim("to_reclaim") ) + { + fprintf(stderr, "*** Error: no-pdi reclaim\n"); + exit(1); + } } void event() { - assert(PDI_OK == PDI_event("event_one")); + if( PDI_OK != PDI_event("event_one") ) + { + fprintf(stderr, "*** Error: no-pdi event\n"); + exit(1); + } } void expose() { int to_expose[2] = {1, 1}; - assert(PDI_OK == PDI_expose("to_expose", to_expose, PDI_OUT)); + if( PDI_OK != PDI_expose("to_expose", to_expose, PDI_OUT) ) + { + fprintf(stderr, "*** Error: no-pdi expose\n"); + exit(1); + } } void multi_expose() { int to_multi_expose[2] = {1, 1}; int to_multi_expose_two[2] = {2, 2}; - assert( - PDI_OK - == PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL) - ); + if( PDI_OK + != PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL) ) + { + fprintf(stderr, "*** Error: no-pdi multi_expose\n"); + exit(1); + } } void errhandler() { PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); - assert(current_handler.func == NULL && current_handler.context == NULL); + if( NULL != current_handler.func || NULL != current_handler.context ) + { + fprintf(stderr, "*** Error: no-pdi erhandler\n"); + exit(1); + } } int tests(int argc, char* argv[]) { - assert(PDI_OK == PDI_init(PC_parse_path(argv[1]))); + static const char* CONFIG_YAML + = "logging: trace \n"; - assert(PDI_errmsg()); + if( PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML)) ) + { + fprintf(stderr, "*** Error: no-pdi initialisation\n"); + exit(1); + } + + const char* errmsg = PDI_errmsg(); + if (strcmp(errmsg, "") != 0) + { + fprintf(stderr, "*** Error: no-pdi errmsg\n"); + exit(1); + } + errhandler(); share(); @@ -94,7 +138,11 @@ int tests(int argc, char* argv[]) expose(); multi_expose(); - assert(PDI_OK == PDI_finalize()); + if( PDI_OK != PDI_finalize()) + { + fprintf(stderr, "*** Error: no-pdi finalisation\n"); + exit(1); + } - return 0; + return EXIT_SUCCESS; } From fe4e53cb8e4553632269b7f8c77e48d85527ee5c Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 28 Mar 2025 11:01:46 +0100 Subject: [PATCH 042/372] PR feedback fixes 19 - Fix no-pdi test and CI 3 --- tests/tests_no-pdi/test_07_no-pdi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tests_no-pdi/test_07_no-pdi.h b/tests/tests_no-pdi/test_07_no-pdi.h index ab268522c..d5870ff43 100644 --- a/tests/tests_no-pdi/test_07_no-pdi.h +++ b/tests/tests_no-pdi/test_07_no-pdi.h @@ -122,7 +122,7 @@ int tests(int argc, char* argv[]) } const char* errmsg = PDI_errmsg(); - if (strcmp(errmsg, "") != 0) + if ( strcmp(errmsg, "") != 0 ) { fprintf(stderr, "*** Error: no-pdi errmsg\n"); exit(1); @@ -138,7 +138,7 @@ int tests(int argc, char* argv[]) expose(); multi_expose(); - if( PDI_OK != PDI_finalize()) + if( PDI_OK != PDI_finalize() ) { fprintf(stderr, "*** Error: no-pdi finalisation\n"); exit(1); From 01dafb3770a56192da22a9a8a6e573cf8c877790 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 28 Mar 2025 11:07:19 +0100 Subject: [PATCH 043/372] PR feedback fixes 20 - Fix no-pdi test and CI 4 --- tests/tests_no-pdi/test_07_no-pdi.h | 35 ++++++++++------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/tests/tests_no-pdi/test_07_no-pdi.h b/tests/tests_no-pdi/test_07_no-pdi.h index d5870ff43..1a8308450 100644 --- a/tests/tests_no-pdi/test_07_no-pdi.h +++ b/tests/tests_no-pdi/test_07_no-pdi.h @@ -29,8 +29,7 @@ void share() { int to_share[2] = {1, 1}; - if( PDI_OK != PDI_share("to_share", to_share, PDI_OUT) ) - { + if(PDI_OK != PDI_share("to_share", to_share, PDI_OUT)) { fprintf(stderr, "*** Error: no-pdi share\n"); exit(1); } @@ -39,8 +38,7 @@ void share() void access() //access { int to_access[2] = {1, 1}; - if( PDI_OK != PDI_access("to_access", (void**)&to_access, PDI_IN) ) - { + if(PDI_OK != PDI_access("to_access", (void**)&to_access, PDI_IN)) { fprintf(stderr, "*** Error: no-pdi access\n"); exit(1); } @@ -50,8 +48,7 @@ void release() //access/release { int to_release[2] = {1, 1}; PDI_access("to_access", (void**)&to_release, PDI_IN); - if( PDI_OK != PDI_release("to_release") ) - { + if(PDI_OK != PDI_release("to_release")) { fprintf(stderr, "*** Error: no-pdi release\n"); exit(1); } @@ -62,8 +59,7 @@ void reclaim() //share/reclaim { int to_reclaim[2] = {1, 1}; PDI_share("to_release", to_reclaim, PDI_OUT); - if( PDI_OK != PDI_reclaim("to_reclaim") ) - { + if(PDI_OK != PDI_reclaim("to_reclaim")) { fprintf(stderr, "*** Error: no-pdi reclaim\n"); exit(1); } @@ -71,8 +67,7 @@ void reclaim() //share/reclaim void event() { - if( PDI_OK != PDI_event("event_one") ) - { + if(PDI_OK != PDI_event("event_one")) { fprintf(stderr, "*** Error: no-pdi event\n"); exit(1); } @@ -81,8 +76,7 @@ void event() void expose() { int to_expose[2] = {1, 1}; - if( PDI_OK != PDI_expose("to_expose", to_expose, PDI_OUT) ) - { + if(PDI_OK != PDI_expose("to_expose", to_expose, PDI_OUT)) { fprintf(stderr, "*** Error: no-pdi expose\n"); exit(1); } @@ -92,9 +86,8 @@ void multi_expose() { int to_multi_expose[2] = {1, 1}; int to_multi_expose_two[2] = {2, 2}; - if( PDI_OK - != PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL) ) - { + if(PDI_OK + != PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL)) { fprintf(stderr, "*** Error: no-pdi multi_expose\n"); exit(1); } @@ -103,8 +96,7 @@ void multi_expose() void errhandler() { PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); - if( NULL != current_handler.func || NULL != current_handler.context ) - { + if(NULL != current_handler.func || NULL != current_handler.context) { fprintf(stderr, "*** Error: no-pdi erhandler\n"); exit(1); } @@ -115,15 +107,13 @@ int tests(int argc, char* argv[]) static const char* CONFIG_YAML = "logging: trace \n"; - if( PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML)) ) - { + if(PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML))) { fprintf(stderr, "*** Error: no-pdi initialisation\n"); exit(1); } const char* errmsg = PDI_errmsg(); - if ( strcmp(errmsg, "") != 0 ) - { + if(strcmp(errmsg, "") != 0) { fprintf(stderr, "*** Error: no-pdi errmsg\n"); exit(1); } @@ -138,8 +128,7 @@ int tests(int argc, char* argv[]) expose(); multi_expose(); - if( PDI_OK != PDI_finalize() ) - { + if(PDI_OK != PDI_finalize()) { fprintf(stderr, "*** Error: no-pdi finalisation\n"); exit(1); } From 0840c30a8b5f5fb24961bb0d719306c594dd0186 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 28 Mar 2025 11:11:30 +0100 Subject: [PATCH 044/372] PR feedback fixes 21 - Fix no-pdi test and CI 5 --- tests/tests_no-pdi/test_07_no-pdi.h | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/tests/tests_no-pdi/test_07_no-pdi.h b/tests/tests_no-pdi/test_07_no-pdi.h index 1a8308450..6feb29b1d 100644 --- a/tests/tests_no-pdi/test_07_no-pdi.h +++ b/tests/tests_no-pdi/test_07_no-pdi.h @@ -29,7 +29,7 @@ void share() { int to_share[2] = {1, 1}; - if(PDI_OK != PDI_share("to_share", to_share, PDI_OUT)) { + if (PDI_OK != PDI_share("to_share", to_share, PDI_OUT)) { fprintf(stderr, "*** Error: no-pdi share\n"); exit(1); } @@ -38,7 +38,7 @@ void share() void access() //access { int to_access[2] = {1, 1}; - if(PDI_OK != PDI_access("to_access", (void**)&to_access, PDI_IN)) { + if (PDI_OK != PDI_access("to_access", (void**)&to_access, PDI_IN)) { fprintf(stderr, "*** Error: no-pdi access\n"); exit(1); } @@ -48,7 +48,7 @@ void release() //access/release { int to_release[2] = {1, 1}; PDI_access("to_access", (void**)&to_release, PDI_IN); - if(PDI_OK != PDI_release("to_release")) { + if (PDI_OK != PDI_release("to_release")) { fprintf(stderr, "*** Error: no-pdi release\n"); exit(1); } @@ -59,7 +59,7 @@ void reclaim() //share/reclaim { int to_reclaim[2] = {1, 1}; PDI_share("to_release", to_reclaim, PDI_OUT); - if(PDI_OK != PDI_reclaim("to_reclaim")) { + if (PDI_OK != PDI_reclaim("to_reclaim")) { fprintf(stderr, "*** Error: no-pdi reclaim\n"); exit(1); } @@ -67,7 +67,7 @@ void reclaim() //share/reclaim void event() { - if(PDI_OK != PDI_event("event_one")) { + if (PDI_OK != PDI_event("event_one")) { fprintf(stderr, "*** Error: no-pdi event\n"); exit(1); } @@ -76,7 +76,7 @@ void event() void expose() { int to_expose[2] = {1, 1}; - if(PDI_OK != PDI_expose("to_expose", to_expose, PDI_OUT)) { + if (PDI_OK != PDI_expose("to_expose", to_expose, PDI_OUT)) { fprintf(stderr, "*** Error: no-pdi expose\n"); exit(1); } @@ -86,7 +86,7 @@ void multi_expose() { int to_multi_expose[2] = {1, 1}; int to_multi_expose_two[2] = {2, 2}; - if(PDI_OK + if (PDI_OK != PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL)) { fprintf(stderr, "*** Error: no-pdi multi_expose\n"); exit(1); @@ -96,7 +96,7 @@ void multi_expose() void errhandler() { PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); - if(NULL != current_handler.func || NULL != current_handler.context) { + if (NULL != current_handler.func || NULL != current_handler.context) { fprintf(stderr, "*** Error: no-pdi erhandler\n"); exit(1); } @@ -104,20 +104,19 @@ void errhandler() int tests(int argc, char* argv[]) { - static const char* CONFIG_YAML - = "logging: trace \n"; + static const char* CONFIG_YAML = "logging: trace \n"; - if(PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML))) { + if (PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML))) { fprintf(stderr, "*** Error: no-pdi initialisation\n"); exit(1); } - + const char* errmsg = PDI_errmsg(); - if(strcmp(errmsg, "") != 0) { + if (strcmp(errmsg, "") != 0) { fprintf(stderr, "*** Error: no-pdi errmsg\n"); exit(1); } - + errhandler(); share(); @@ -128,7 +127,7 @@ int tests(int argc, char* argv[]) expose(); multi_expose(); - if(PDI_OK != PDI_finalize()) { + if (PDI_OK != PDI_finalize()) { fprintf(stderr, "*** Error: no-pdi finalisation\n"); exit(1); } From abb21ca607e5754c1625ea9bb81ba1a432a7e0d4 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 28 Mar 2025 11:14:39 +0100 Subject: [PATCH 045/372] PR feedback fixes 22 - Fix no-pdi test and CI 6 --- tests/tests_no-pdi/test_07_no-pdi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tests_no-pdi/test_07_no-pdi.h b/tests/tests_no-pdi/test_07_no-pdi.h index 6feb29b1d..2e776fe15 100644 --- a/tests/tests_no-pdi/test_07_no-pdi.h +++ b/tests/tests_no-pdi/test_07_no-pdi.h @@ -52,7 +52,6 @@ void release() //access/release fprintf(stderr, "*** Error: no-pdi release\n"); exit(1); } - } void reclaim() //share/reclaim @@ -87,7 +86,8 @@ void multi_expose() int to_multi_expose[2] = {1, 1}; int to_multi_expose_two[2] = {2, 2}; if (PDI_OK - != PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL)) { + != PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL)) + { fprintf(stderr, "*** Error: no-pdi multi_expose\n"); exit(1); } From bda1941b0b7a63563a5e7df2fb33fbb56fbc993b Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 28 Mar 2025 11:18:02 +0100 Subject: [PATCH 046/372] PR feedback fixes 23 - Fix no-pdi test and CI 7 --- tests/tests_no-pdi/test_07_no-pdi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tests_no-pdi/test_07_no-pdi.h b/tests/tests_no-pdi/test_07_no-pdi.h index 2e776fe15..63c20ec49 100644 --- a/tests/tests_no-pdi/test_07_no-pdi.h +++ b/tests/tests_no-pdi/test_07_no-pdi.h @@ -86,7 +86,7 @@ void multi_expose() int to_multi_expose[2] = {1, 1}; int to_multi_expose_two[2] = {2, 2}; if (PDI_OK - != PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL)) + != PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL)) { fprintf(stderr, "*** Error: no-pdi multi_expose\n"); exit(1); @@ -104,7 +104,7 @@ void errhandler() int tests(int argc, char* argv[]) { - static const char* CONFIG_YAML = "logging: trace \n"; + static const char* CONFIG_YAML = "logging: trace \n"; if (PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML))) { fprintf(stderr, "*** Error: no-pdi initialisation\n"); From ae1856d4229507debaadcd4754d19cc1c788adc9 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 28 Mar 2025 11:29:02 +0100 Subject: [PATCH 047/372] PR feedback fixes 24 - Fix no-pdi test and CI 8 --- tests/tests_no-pdi/test_07_no-pdi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests_no-pdi/test_07_no-pdi.h b/tests/tests_no-pdi/test_07_no-pdi.h index 63c20ec49..08c3d0955 100644 --- a/tests/tests_no-pdi/test_07_no-pdi.h +++ b/tests/tests_no-pdi/test_07_no-pdi.h @@ -86,7 +86,7 @@ void multi_expose() int to_multi_expose[2] = {1, 1}; int to_multi_expose_two[2] = {2, 2}; if (PDI_OK - != PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL)) + != PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL)) { fprintf(stderr, "*** Error: no-pdi multi_expose\n"); exit(1); From dc7d5d240c898940aa17b6e984c81507d9239769 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 28 Mar 2025 13:42:25 +0100 Subject: [PATCH 048/372] PR feedback fixes 25 - Fix no-pdi test and CI 9 --- tests/tests_no-pdi/test_07_no-pdi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tests_no-pdi/test_07_no-pdi.h b/tests/tests_no-pdi/test_07_no-pdi.h index 08c3d0955..710c65671 100644 --- a/tests/tests_no-pdi/test_07_no-pdi.h +++ b/tests/tests_no-pdi/test_07_no-pdi.h @@ -86,7 +86,7 @@ void multi_expose() int to_multi_expose[2] = {1, 1}; int to_multi_expose_two[2] = {2, 2}; if (PDI_OK - != PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL)) + != PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL)) { fprintf(stderr, "*** Error: no-pdi multi_expose\n"); exit(1); @@ -97,7 +97,7 @@ void errhandler() { PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); if (NULL != current_handler.func || NULL != current_handler.context) { - fprintf(stderr, "*** Error: no-pdi erhandler\n"); + fprintf(stderr, "*** Error: no-pdi errhandler\n"); exit(1); } } From 55e8055b80911f1546685f74f276b979967033c1 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 28 Mar 2025 14:11:51 +0100 Subject: [PATCH 049/372] PR feedback fixes 26 - Fix no-pdi test and CI 10 --- tests/tests_no-pdi/test_07_main.c | 2 +- tests/tests_no-pdi/test_07_main.cpp | 2 +- tests/tests_no-pdi/test_07_no-pdi.h | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/tests_no-pdi/test_07_main.c b/tests/tests_no-pdi/test_07_main.c index c7bbb3c25..08d012ecb 100644 --- a/tests/tests_no-pdi/test_07_main.c +++ b/tests/tests_no-pdi/test_07_main.c @@ -30,6 +30,6 @@ int main(int argc, char* argv[]) { - assert(tests(argc, argv) == 0); + tests(argc, argv); printf("Disabled PDI ok for C++.\n"); } diff --git a/tests/tests_no-pdi/test_07_main.cpp b/tests/tests_no-pdi/test_07_main.cpp index c7bbb3c25..08d012ecb 100644 --- a/tests/tests_no-pdi/test_07_main.cpp +++ b/tests/tests_no-pdi/test_07_main.cpp @@ -30,6 +30,6 @@ int main(int argc, char* argv[]) { - assert(tests(argc, argv) == 0); + tests(argc, argv); printf("Disabled PDI ok for C++.\n"); } diff --git a/tests/tests_no-pdi/test_07_no-pdi.h b/tests/tests_no-pdi/test_07_no-pdi.h index 710c65671..132171b08 100644 --- a/tests/tests_no-pdi/test_07_no-pdi.h +++ b/tests/tests_no-pdi/test_07_no-pdi.h @@ -22,8 +22,6 @@ * THE SOFTWARE. ******************************************************************************/ -#include - #include void share() From 972fe8ce8c267144ca74fdc8e2772fbf620cef74 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 3 Apr 2025 08:52:01 +0200 Subject: [PATCH 050/372] PR feedback fixes 27 --- bin/build_and_run_all_tests | 4 +- tests/CMakeLists.txt | 4 +- tests/{tests_no-pdi => no_pdi}/CMakeLists.txt | 8 +- tests/{tests_no-pdi => no_pdi}/test_07_main.c | 4 - .../{tests_no-pdi => no_pdi}/test_07_main.cpp | 4 +- .../{tests_no-pdi => no_pdi}/test_07_no-pdi.h | 0 tests/{tests_pdi => pdi}/CMakeLists.txt | 0 tests/{tests_pdi => pdi}/test.h | 0 tests/{tests_pdi => pdi}/test_01.c | 0 tests/{tests_pdi => pdi}/test_01.yml | 0 tests/{tests_pdi => pdi}/test_02.c | 0 tests/{tests_pdi => pdi}/test_02.yml | 0 tests/{tests_pdi => pdi}/test_03.c | 0 tests/{tests_pdi => pdi}/test_03.yml | 0 tests/{tests_pdi => pdi}/test_04.c | 0 tests/{tests_pdi => pdi}/test_04.yml | 0 tests/{tests_pdi => pdi}/test_05.c | 0 tests/{tests_pdi => pdi}/test_05.yml | 0 tests/tests_no-pdi/test_07_no-pdi.yml | 76 ------------------- 19 files changed, 9 insertions(+), 91 deletions(-) rename tests/{tests_no-pdi => no_pdi}/CMakeLists.txt (92%) rename tests/{tests_no-pdi => no_pdi}/test_07_main.c (97%) rename tests/{tests_no-pdi => no_pdi}/test_07_main.cpp (96%) rename tests/{tests_no-pdi => no_pdi}/test_07_no-pdi.h (100%) rename tests/{tests_pdi => pdi}/CMakeLists.txt (100%) rename tests/{tests_pdi => pdi}/test.h (100%) rename tests/{tests_pdi => pdi}/test_01.c (100%) rename tests/{tests_pdi => pdi}/test_01.yml (100%) rename tests/{tests_pdi => pdi}/test_02.c (100%) rename tests/{tests_pdi => pdi}/test_02.yml (100%) rename tests/{tests_pdi => pdi}/test_03.c (100%) rename tests/{tests_pdi => pdi}/test_03.yml (100%) rename tests/{tests_pdi => pdi}/test_04.c (100%) rename tests/{tests_pdi => pdi}/test_04.yml (100%) rename tests/{tests_pdi => pdi}/test_05.c (100%) rename tests/{tests_pdi => pdi}/test_05.yml (100%) delete mode 100644 tests/tests_no-pdi/test_07_no-pdi.yml diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 47a865aa1..63c944a0f 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -29,7 +29,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -# set -xe +set -xe @@ -125,4 +125,4 @@ cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" cmake -DDISABLE_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} ${MAKEFLAGS} || true +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} ${MAKEFLAGS} diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 37c937ca3..74fcce4b9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -35,7 +35,7 @@ option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) if (DISABLE_PDI) - add_subdirectory(tests_no-pdi/) # no-pdi + add_subdirectory(no-pdi/) # no-pdi else() - add_subdirectory(tests_pdi/) # pdi + add_subdirectory(pdi/) # pdi endif() diff --git a/tests/tests_no-pdi/CMakeLists.txt b/tests/no_pdi/CMakeLists.txt similarity index 92% rename from tests/tests_no-pdi/CMakeLists.txt rename to tests/no_pdi/CMakeLists.txt index 727f68b32..cd422f38b 100644 --- a/tests/tests_no-pdi/CMakeLists.txt +++ b/tests/no_pdi/CMakeLists.txt @@ -25,7 +25,7 @@ cmake_minimum_required(VERSION 3.16...3.29) project(pdi_tests LANGUAGES C CXX) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +# list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") @@ -36,7 +36,6 @@ option(EXAMPLE_NO_PDI "Disable PDI using PDIConfig" OFF) include(CTest) find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -message(WARNING "PDI is disabled on test 07 for no pdi.") if(PDI_ROOT) message(WARNING "Using include through PDI_ROOT") include(${PDI_ROOT}/PDIConfig.cmake) @@ -44,14 +43,15 @@ else() #if(EXAMPLE_NO_PDI) message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) endif() -include_directories(${CMAKE_CURRENT_LIST_DIR}) +# include_directories(${CMAKE_CURRENT_LIST_DIR}) add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_07_main_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) -add_test(NAME test_07_main_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_main.yml") +# add_test(NAME test_07_main_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_main.yml") +add_test(NAME test_07_main_C COMMAND "$") add_executable(test_07_main_CXX test_07_main.cpp) set(BUILD_FLAGS_FOR_CXX "-Wall") diff --git a/tests/tests_no-pdi/test_07_main.c b/tests/no_pdi/test_07_main.c similarity index 97% rename from tests/tests_no-pdi/test_07_main.c rename to tests/no_pdi/test_07_main.c index 08d012ecb..b8786af6c 100644 --- a/tests/tests_no-pdi/test_07_main.c +++ b/tests/no_pdi/test_07_main.c @@ -24,10 +24,6 @@ #include -#ifdef __cplusplus -#include -#endif - int main(int argc, char* argv[]) { tests(argc, argv); diff --git a/tests/tests_no-pdi/test_07_main.cpp b/tests/no_pdi/test_07_main.cpp similarity index 96% rename from tests/tests_no-pdi/test_07_main.cpp rename to tests/no_pdi/test_07_main.cpp index 08d012ecb..a78cb175e 100644 --- a/tests/tests_no-pdi/test_07_main.cpp +++ b/tests/no_pdi/test_07_main.cpp @@ -24,12 +24,10 @@ #include -#ifdef __cplusplus #include -#endif int main(int argc, char* argv[]) { tests(argc, argv); - printf("Disabled PDI ok for C++.\n"); + std::cout << "Disabled PDI ok for C++." << std::endl; } diff --git a/tests/tests_no-pdi/test_07_no-pdi.h b/tests/no_pdi/test_07_no-pdi.h similarity index 100% rename from tests/tests_no-pdi/test_07_no-pdi.h rename to tests/no_pdi/test_07_no-pdi.h diff --git a/tests/tests_pdi/CMakeLists.txt b/tests/pdi/CMakeLists.txt similarity index 100% rename from tests/tests_pdi/CMakeLists.txt rename to tests/pdi/CMakeLists.txt diff --git a/tests/tests_pdi/test.h b/tests/pdi/test.h similarity index 100% rename from tests/tests_pdi/test.h rename to tests/pdi/test.h diff --git a/tests/tests_pdi/test_01.c b/tests/pdi/test_01.c similarity index 100% rename from tests/tests_pdi/test_01.c rename to tests/pdi/test_01.c diff --git a/tests/tests_pdi/test_01.yml b/tests/pdi/test_01.yml similarity index 100% rename from tests/tests_pdi/test_01.yml rename to tests/pdi/test_01.yml diff --git a/tests/tests_pdi/test_02.c b/tests/pdi/test_02.c similarity index 100% rename from tests/tests_pdi/test_02.c rename to tests/pdi/test_02.c diff --git a/tests/tests_pdi/test_02.yml b/tests/pdi/test_02.yml similarity index 100% rename from tests/tests_pdi/test_02.yml rename to tests/pdi/test_02.yml diff --git a/tests/tests_pdi/test_03.c b/tests/pdi/test_03.c similarity index 100% rename from tests/tests_pdi/test_03.c rename to tests/pdi/test_03.c diff --git a/tests/tests_pdi/test_03.yml b/tests/pdi/test_03.yml similarity index 100% rename from tests/tests_pdi/test_03.yml rename to tests/pdi/test_03.yml diff --git a/tests/tests_pdi/test_04.c b/tests/pdi/test_04.c similarity index 100% rename from tests/tests_pdi/test_04.c rename to tests/pdi/test_04.c diff --git a/tests/tests_pdi/test_04.yml b/tests/pdi/test_04.yml similarity index 100% rename from tests/tests_pdi/test_04.yml rename to tests/pdi/test_04.yml diff --git a/tests/tests_pdi/test_05.c b/tests/pdi/test_05.c similarity index 100% rename from tests/tests_pdi/test_05.c rename to tests/pdi/test_05.c diff --git a/tests/tests_pdi/test_05.yml b/tests/pdi/test_05.yml similarity index 100% rename from tests/tests_pdi/test_05.yml rename to tests/pdi/test_05.yml diff --git a/tests/tests_no-pdi/test_07_no-pdi.yml b/tests/tests_no-pdi/test_07_no-pdi.yml deleted file mode 100644 index 45381a721..000000000 --- a/tests/tests_no-pdi/test_07_no-pdi.yml +++ /dev/null @@ -1,76 +0,0 @@ -logging: - level: trace -data: - value_char: - type: char - char_array: - size: 3 - subtype: char - type: array - value_short: - type: int16 - short_array: - size: 3 - subtype: int16 - type: array - value_int: - type: int - int_array: - size: 3 - subtype: int - type: array - value_long: - type: int64 - long_array: - size: 3 - subtype: int64 - type: array - value_float: - type: float - float_array: - size: 3 - subtype: float - type: array - value_double: - type: double - double_array: - size: 3 - subtype: double - type: array -plugins: - set_value: - on_init: - - share: - - value_char: 42 - - char_array: [0, 1, 2] - - value_short: 4242 - - short_array: [3, 4, 5] - - value_int: 424242 - - int_array: [6, 7, 8] - - value_long: 424242424242 - - long_array: [9, 10, 11] - - value_float: 3.141592 - - float_array: - - 1.234567 - - 12.34567 - - 123.4567 - - value_double: 3.14159265 - - double_array: - - 1.23456789 - - 12.3456789 - - 123.456789 - on_finalize: - - release: - - value_char - - char_array - - value_short - - short_array - - value_int - - int_array - - value_long - - long_array - - value_float - - float_array - - value_double - - double_array - From 24f179571733f94f9ae3bb0827c7b0e3214560bd Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 3 Apr 2025 09:38:54 +0200 Subject: [PATCH 051/372] PR feedback fixes 28 --- tests/no_pdi/CMakeLists.txt | 4 ++-- tests/no_pdi/test_07_main.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/no_pdi/CMakeLists.txt b/tests/no_pdi/CMakeLists.txt index cd422f38b..0ce47c604 100644 --- a/tests/no_pdi/CMakeLists.txt +++ b/tests/no_pdi/CMakeLists.txt @@ -25,7 +25,7 @@ cmake_minimum_required(VERSION 3.16...3.29) project(pdi_tests LANGUAGES C CXX) -# list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") @@ -43,7 +43,7 @@ else() #if(EXAMPLE_NO_PDI) message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) endif() -# include_directories(${CMAKE_CURRENT_LIST_DIR}) +include_directories(${CMAKE_CURRENT_LIST_DIR}) add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") diff --git a/tests/no_pdi/test_07_main.cpp b/tests/no_pdi/test_07_main.cpp index a78cb175e..f42532c6c 100644 --- a/tests/no_pdi/test_07_main.cpp +++ b/tests/no_pdi/test_07_main.cpp @@ -29,5 +29,5 @@ int main(int argc, char* argv[]) { tests(argc, argv); - std::cout << "Disabled PDI ok for C++." << std::endl; + std::cout << "Disabled PDI ok for C++." << std::endl; } From 5975c61c7fd2298fa1a8a40c386867f3c2a3796b Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 3 Apr 2025 10:13:45 +0200 Subject: [PATCH 052/372] PR feedback fixes 29 --- tests/{no_pdi => no-pdi}/CMakeLists.txt | 0 tests/{no_pdi => no-pdi}/test_07_main.c | 0 tests/{no_pdi => no-pdi}/test_07_main.cpp | 0 tests/{no_pdi => no-pdi}/test_07_no-pdi.h | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename tests/{no_pdi => no-pdi}/CMakeLists.txt (100%) rename tests/{no_pdi => no-pdi}/test_07_main.c (100%) rename tests/{no_pdi => no-pdi}/test_07_main.cpp (100%) rename tests/{no_pdi => no-pdi}/test_07_no-pdi.h (100%) diff --git a/tests/no_pdi/CMakeLists.txt b/tests/no-pdi/CMakeLists.txt similarity index 100% rename from tests/no_pdi/CMakeLists.txt rename to tests/no-pdi/CMakeLists.txt diff --git a/tests/no_pdi/test_07_main.c b/tests/no-pdi/test_07_main.c similarity index 100% rename from tests/no_pdi/test_07_main.c rename to tests/no-pdi/test_07_main.c diff --git a/tests/no_pdi/test_07_main.cpp b/tests/no-pdi/test_07_main.cpp similarity index 100% rename from tests/no_pdi/test_07_main.cpp rename to tests/no-pdi/test_07_main.cpp diff --git a/tests/no_pdi/test_07_no-pdi.h b/tests/no-pdi/test_07_no-pdi.h similarity index 100% rename from tests/no_pdi/test_07_no-pdi.h rename to tests/no-pdi/test_07_no-pdi.h From d8c0dfd991fc33d8cebec2277f5ea33cd329ccd8 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 3 Apr 2025 10:37:36 +0200 Subject: [PATCH 053/372] PR feedback fixes 30 --- tests/no-pdi/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/no-pdi/CMakeLists.txt b/tests/no-pdi/CMakeLists.txt index 0ce47c604..b16fbc1b0 100644 --- a/tests/no-pdi/CMakeLists.txt +++ b/tests/no-pdi/CMakeLists.txt @@ -43,14 +43,13 @@ else() #if(EXAMPLE_NO_PDI) message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) endif() -include_directories(${CMAKE_CURRENT_LIST_DIR}) +# include_directories(${CMAKE_CURRENT_LIST_DIR}) add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_07_main_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) -# add_test(NAME test_07_main_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_main.yml") add_test(NAME test_07_main_C COMMAND "$") add_executable(test_07_main_CXX test_07_main.cpp) @@ -61,4 +60,4 @@ set_target_properties(test_07_main_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_07_main_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_07_main_CXX PROPERTIES LINKER_LANGUAGE CXX) target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) -add_test(NAME test_07_main_CXX COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_07_main.yml") +add_test(NAME test_07_main_CXX COMMAND "$") From 38218f5d9c2f87106eb6ce603ecbf459d7c3b530 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 3 Apr 2025 10:54:58 +0200 Subject: [PATCH 054/372] PR feedback fixes 31 --- tests/no-pdi/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/no-pdi/CMakeLists.txt b/tests/no-pdi/CMakeLists.txt index b16fbc1b0..603432436 100644 --- a/tests/no-pdi/CMakeLists.txt +++ b/tests/no-pdi/CMakeLists.txt @@ -25,7 +25,7 @@ cmake_minimum_required(VERSION 3.16...3.29) project(pdi_tests LANGUAGES C CXX) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +# list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") @@ -43,7 +43,7 @@ else() #if(EXAMPLE_NO_PDI) message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) endif() -# include_directories(${CMAKE_CURRENT_LIST_DIR}) +include_directories(${CMAKE_CURRENT_LIST_DIR}) add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") From 060f78b369c5c5ee65951e644d481838beaced04 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 3 Apr 2025 11:06:45 +0200 Subject: [PATCH 055/372] PR feedback fixes 32 --- tests/no-pdi/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/no-pdi/CMakeLists.txt b/tests/no-pdi/CMakeLists.txt index 603432436..cdaa008ae 100644 --- a/tests/no-pdi/CMakeLists.txt +++ b/tests/no-pdi/CMakeLists.txt @@ -25,7 +25,7 @@ cmake_minimum_required(VERSION 3.16...3.29) project(pdi_tests LANGUAGES C CXX) -# list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") From 246359e3629096305dcc9220d6360c72bfaa5772 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 3 Apr 2025 11:28:07 +0200 Subject: [PATCH 056/372] PR feedback fixes 33 --- bin/build_and_run_all_tests | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 63c944a0f..5b27a2dd2 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -111,18 +111,28 @@ fi -# Configure, build & test +# # Configure, build & test + +# cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} ${MAKEFLAGS} || true + + + +# # Configure, build & test for no-pdi + +# cd "${TEST_DIR_NO_PDI}" +# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" +# cmake -DDISABLE_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} ${MAKEFLAGS} -cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} ${MAKEFLAGS} || true -# Configure, build & test for no-pdi cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DDISABLE_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DDISABLE_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} ${MAKEFLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} ${MAKEFLAGS} \ No newline at end of file From e943368a3de536dda8ae9250128a25b804e6d03a Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 3 Apr 2025 11:59:16 +0200 Subject: [PATCH 057/372] PR feedback fixes 34 --- no-pdi/include/pdi.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index ef5593e96..7c13237e2 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -118,11 +118,11 @@ static const PDI_errhandler_t PDI_NULL_HANDLER = {NULL, NULL}; /** Prints the error message and aborts if the status is invalid */ -static const PDI_errhandler_t PDI_ASSERT_HANDLER = PDI_NULL_HANDLER; +static const PDI_errhandler_t PDI_ASSERT_HANDLER = {NULL, NULL}; /** Prints the error message and continue if the status is invalid */ -static const PDI_errhandler_t PDI_WARN_HANDLER = PDI_NULL_HANDLER; +static const PDI_errhandler_t PDI_WARN_HANDLER = {NULL, NULL}; /** Return a human-readabe message describing the last error that occured in PDI */ @@ -133,7 +133,7 @@ static inline const char* PDI_errmsg(void) /** Sets the error handler to use */ -static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t) +static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) { return PDI_NULL_HANDLER; } @@ -149,7 +149,7 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t) /** Initializes PDI */ -static inline PDI_status_t PDI_init(PC_tree_t) +static inline PDI_status_t PDI_init(PC_tree_t conf) { return PDI_OK; } @@ -164,7 +164,7 @@ static inline PDI_status_t PDI_finalize(void) /** Checks PDI API version */ -static inline PDI_status_t PDI_version(unsigned long*, unsigned long) +static inline PDI_status_t PDI_version(unsigned long* provided, unsigned long expected) { return PDI_OK; } @@ -193,14 +193,14 @@ typedef enum PDI_inout_e { /** Shares some data with PDI. The user code should not modify it before * a call to either PDI_release or PDI_reclaim. */ -static inline PDI_status_t PDI_share(const char*, void*, PDI_inout_t) +static inline PDI_status_t PDI_share(const char* name, void* data, PDI_inout_t access) { return PDI_OK; } /** Requests for PDI to access a data buffer. */ -static inline PDI_status_t PDI_access(const char*, void**, PDI_inout_t) +static inline PDI_status_t PDI_access(const char* name, void** buffer, PDI_inout_t inout) { return PDI_OK; } @@ -208,7 +208,7 @@ static inline PDI_status_t PDI_access(const char*, void**, PDI_inout_t) /** Releases ownership of a data shared with PDI. PDI is then responsible to * free the associated memory whenever necessary. */ -static inline PDI_status_t PDI_release(const char*) +static inline PDI_status_t PDI_release(const char* name) { return PDI_OK; } @@ -216,21 +216,21 @@ static inline PDI_status_t PDI_release(const char*) /** Reclaims ownership of a data buffer shared with PDI. PDI does not manage * the buffer memory anymore. */ -static inline PDI_status_t PDI_reclaim(const char*) +static inline PDI_status_t PDI_reclaim(const char* name) { return PDI_OK; } /** Triggers a PDI "event" */ -static inline PDI_status_t PDI_event(const char*) +static inline PDI_status_t PDI_event(const char* event) { return PDI_OK; } /** Shortly exposes some data to PDI. Equivalent to PDI_share + PDI_reclaim. */ -static inline PDI_status_t PDI_expose(const char*, void*, PDI_inout_t) +static inline PDI_status_t PDI_expose(const char* name, void* data, PDI_inout_t access) { return PDI_OK; } @@ -240,7 +240,7 @@ static inline PDI_status_t PDI_expose(const char*, void*, PDI_inout_t) * * NULL argument indicates an end of the list. */ -static inline PDI_status_t PDI_multi_expose(const char*, const char*, void*, PDI_inout_t, ...) +static inline PDI_status_t PDI_multi_expose(const char* event_name, const char* name, void* data, PDI_inout_t access, ...) { return PDI_OK; } @@ -259,7 +259,7 @@ static inline PDI_status_t PDI_multi_expose(const char*, const char*, void*, PDI * * \return an error status */ -static inline PDI_status_t PDI_transaction_begin(const char*) +static inline PDI_status_t PDI_transaction_begin(const char* name) { return PDI_OK; } From 6da98fee28a97dc9f3f3c1bf7be23134c46149aa Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 3 Apr 2025 14:48:42 +0200 Subject: [PATCH 058/372] PR feedback fixes 35 --- bin/build_and_run_all_tests | 3 +++ tests/no-pdi/test_07_main.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 5b27a2dd2..58339b867 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -130,6 +130,9 @@ fi +cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make ${MAKEFLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} ${MAKEFLAGS} || true cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" diff --git a/tests/no-pdi/test_07_main.c b/tests/no-pdi/test_07_main.c index b8786af6c..adffa6267 100644 --- a/tests/no-pdi/test_07_main.c +++ b/tests/no-pdi/test_07_main.c @@ -27,5 +27,5 @@ int main(int argc, char* argv[]) { tests(argc, argv); - printf("Disabled PDI ok for C++.\n"); + printf("Disabled PDI ok for C.\n"); } From 7c270049ecc1c3b3c20d4dc65a29348250fed909 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 3 Apr 2025 15:00:08 +0200 Subject: [PATCH 059/372] PR feedback fixes 36 --- bin/build_and_run_all_tests | 27 +++++++-------------------- tests/no-pdi/CMakeLists.txt | 4 ++-- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 58339b867..63c944a0f 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -111,31 +111,18 @@ fi -# # Configure, build & test - -# cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} ${MAKEFLAGS} || true - - - -# # Configure, build & test for no-pdi - -# cd "${TEST_DIR_NO_PDI}" -# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -# cmake -DDISABLE_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} ${MAKEFLAGS} +# Configure, build & test +cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make ${MAKEFLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} ${MAKEFLAGS} || true -cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} ${MAKEFLAGS} || true +# Configure, build & test for no-pdi cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DDISABLE_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DDISABLE_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} ${MAKEFLAGS} \ No newline at end of file +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} ${MAKEFLAGS} diff --git a/tests/no-pdi/CMakeLists.txt b/tests/no-pdi/CMakeLists.txt index cdaa008ae..b0c88c949 100644 --- a/tests/no-pdi/CMakeLists.txt +++ b/tests/no-pdi/CMakeLists.txt @@ -25,7 +25,7 @@ cmake_minimum_required(VERSION 3.16...3.29) project(pdi_tests LANGUAGES C CXX) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +# list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") @@ -43,7 +43,7 @@ else() #if(EXAMPLE_NO_PDI) message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) endif() -include_directories(${CMAKE_CURRENT_LIST_DIR}) +# include_directories(${CMAKE_CURRENT_LIST_DIR}) add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") From 64f993d317b561dd9cd5eecb7fdc8a8f0a58a05d Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 3 Apr 2025 15:31:36 +0200 Subject: [PATCH 060/372] PR feedback fixes 37 --- tests/no-pdi/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/no-pdi/CMakeLists.txt b/tests/no-pdi/CMakeLists.txt index b0c88c949..603432436 100644 --- a/tests/no-pdi/CMakeLists.txt +++ b/tests/no-pdi/CMakeLists.txt @@ -43,7 +43,7 @@ else() #if(EXAMPLE_NO_PDI) message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) endif() -# include_directories(${CMAKE_CURRENT_LIST_DIR}) +include_directories(${CMAKE_CURRENT_LIST_DIR}) add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") From e8ff194971acb5cb0b436b80e5401447c61ecc25 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 3 Apr 2025 15:51:52 +0200 Subject: [PATCH 061/372] PR feedback fixes 38 - CI OK except for unstable hdf5 issue --- bin/build_and_run_all_tests | 2 +- tests/no-pdi/CMakeLists.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 63c944a0f..74c8a69ed 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -123,6 +123,6 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $ cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DDISABLE_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} ${MAKEFLAGS} diff --git a/tests/no-pdi/CMakeLists.txt b/tests/no-pdi/CMakeLists.txt index 603432436..160c47d37 100644 --- a/tests/no-pdi/CMakeLists.txt +++ b/tests/no-pdi/CMakeLists.txt @@ -25,7 +25,6 @@ cmake_minimum_required(VERSION 3.16...3.29) project(pdi_tests LANGUAGES C CXX) -# list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") From b2960fc703f9d02bac7b303cc9b1970c3e591916 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 4 Apr 2025 08:49:24 +0200 Subject: [PATCH 062/372] PR feedback fixes 39 - CI OK except for unstable hdf5 issue --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 74c8a69ed..63c944a0f 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -123,6 +123,6 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $ cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DDISABLE_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} ${MAKEFLAGS} From 07c2b690b8e3305b6c6fd328ee6a2e47ffa5144f Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 4 Apr 2025 10:00:59 +0200 Subject: [PATCH 063/372] PR feedback fixes 40 - Update Using_PDI.md --- bin/build_and_run_all_tests | 4 ++-- pdi/docs/Using_PDI.md | 16 +++++++--------- tests/no-pdi/CMakeLists.txt | 4 ++-- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 63c944a0f..fab195fd5 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -115,7 +115,7 @@ fi cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} ${MAKEFLAGS} || true +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -j || true @@ -125,4 +125,4 @@ cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" cmake -DDISABLE_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} ${MAKEFLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -j diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 597073762..71bcfe692 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -45,21 +45,19 @@ which does not require to pass an additional argument at compilation but requires to add an option to the target `CMakeLists.txt`, which must be enabled through an option at compilation. -In this case, make sure to modify your target application `CMakeLists.txt` as illustrated in -`example/CMakeLists.txt`, -adding the CMake option `WITHOUT_PDI`, then use the following: +Use a `CMakeLists.txt` similar to `example/CMakeLists.txt` with `EXAMPLES_WITHOUT_PDI` for your target, +then use the following: ```bash -cmake . -DWITHOUT_PDI=ON +cmake . -DEXAMPLES_WITHOUT_PDI=ON ``` -Alternatively, if modifying the CMakeList.txt is unpractical, you can use the `find_package` method, -which does not require to modify the -target `CMakeLists.txt` but requires to compile with an added argument pointing to the no-pdi folder. +Alternatively, you can also use the `PDIConfig` method, +to compile with an added argument pointing to the no-pdi folder. -Use a `CMakeLists.txt` similar to `no-pdi_exampleTargetCMakeLists_findpackage.txt` for your target, +Use a `CMakeLists.txt` similar to `tests/no-pdi/CMakeLists.txt` with `PDI_ROOT` for your target, then use the following: ```bash -cmake . -DCMAKE_MODULE_PATH="////pdi/no-pdi/cmake" +cmake . -PDI_ROOT="////pdi/no-pdi/cmake" ``` %PDI can be re-enabled by reversing those modifications. diff --git a/tests/no-pdi/CMakeLists.txt b/tests/no-pdi/CMakeLists.txt index 160c47d37..100bf4c6e 100644 --- a/tests/no-pdi/CMakeLists.txt +++ b/tests/no-pdi/CMakeLists.txt @@ -30,7 +30,7 @@ set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" ON) option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) -option(EXAMPLE_NO_PDI "Disable PDI using PDIConfig" OFF) +option(EXAMPLES_NO_PDI "Disable PDI using PDIConfig" OFF) include(CTest) @@ -38,7 +38,7 @@ find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) if(PDI_ROOT) message(WARNING "Using include through PDI_ROOT") include(${PDI_ROOT}/PDIConfig.cmake) -else() #if(EXAMPLE_NO_PDI) +else() #if(EXAMPLES_NO_PDI) message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) endif() From d1d22cc7d8e1a7604505f30c77ed30ebac227166 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 4 Apr 2025 10:46:14 +0200 Subject: [PATCH 064/372] PR feedback fixes 41 - Update Using_PDI.md 2 --- pdi/docs/Using_PDI.md | 48 ++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 71bcfe692..b1390eef6 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -38,29 +38,7 @@ If source files (of application that uses %PDI) and specification tree file are For C make sure that source files that use %PDI API are including `pdi.h` header file. For Fortran make sure that source files that use %PDI API are using `%PDI` module file (`USE %PDI`). -%PDI can be disabled by using the `no-pdi` directory. - -You can use the `include`/`target_include_directories` method, -which does not require to pass an additional argument at compilation -but requires to add an option to the target `CMakeLists.txt`, -which must be enabled through an option at compilation. - -Use a `CMakeLists.txt` similar to `example/CMakeLists.txt` with `EXAMPLES_WITHOUT_PDI` for your target, -then use the following: -```bash -cmake . -DEXAMPLES_WITHOUT_PDI=ON -``` - -Alternatively, you can also use the `PDIConfig` method, -to compile with an added argument pointing to the no-pdi folder. - -Use a `CMakeLists.txt` similar to `tests/no-pdi/CMakeLists.txt` with `PDI_ROOT` for your target, -then use the following: -```bash -cmake . -PDI_ROOT="////pdi/no-pdi/cmake" -``` - -%PDI can be re-enabled by reversing those modifications. +%PDI can be disabled by using the [`no-pdi` directory](#deactivate_PDI). ### Compiling by hand {#compiling_by_hand} @@ -117,3 +95,27 @@ plugins in 4 steps (it will use the first plugin found): 2. `plugin_path` subtree in specification tree: \ref plugin_path_map_node, 3. Relative path of used %PDI shared object `libpdi.so`, 4. `LD_LIBRARY_PATH` environment variable that is colon separated list. + +## How to deactivate PDI {#deactivate_PDI} + +You can use the `PDIConfig` method, +which does not require to pass an additional argument at compilation +but requires to add an option to the target `CMakeLists.txt`, +which must be enabled through an option at compilation. + +Use a `CMakeLists.txt` similar to `example/CMakeLists.txt` with `EXAMPLES_WITHOUT_PDI` for your target, +then use the following: +```bash +cmake . -DEXAMPLES_WITHOUT_PDI=ON +``` + +Alternatively, you can also use the `PDIConfig` method +to compile with an added argument pointing to the no-pdi folder. + +Use a `CMakeLists.txt` similar to `tests/no-pdi/CMakeLists.txt` with `PDI_ROOT` for your target, +then use the following: +```bash +cmake . -PDI_ROOT="////pdi/no-pdi/cmake" +``` + +%PDI can be re-enabled by reversing those modifications. From fdd6945117b6bb5ca799518ad72d0d40aa1bed3b Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 4 Apr 2025 10:58:08 +0200 Subject: [PATCH 065/372] PR feedback fixes 42 - Update Using_PDI.md 3 --- pdi/docs/Using_PDI.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index b1390eef6..78fbfb01a 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -38,7 +38,7 @@ If source files (of application that uses %PDI) and specification tree file are For C make sure that source files that use %PDI API are including `pdi.h` header file. For Fortran make sure that source files that use %PDI API are using `%PDI` module file (`USE %PDI`). -%PDI can be disabled by using the [`no-pdi` directory](#deactivate_PDI). +%PDI can be disabled by using the `no-pdi` directory (see section ["How to deactivate PDI"](#deactivate_pdi)). ### Compiling by hand {#compiling_by_hand} @@ -96,7 +96,7 @@ plugins in 4 steps (it will use the first plugin found): 3. Relative path of used %PDI shared object `libpdi.so`, 4. `LD_LIBRARY_PATH` environment variable that is colon separated list. -## How to deactivate PDI {#deactivate_PDI} +## How to deactivate PDI {#deactivate_pdi} You can use the `PDIConfig` method, which does not require to pass an additional argument at compilation From 50d49b8ac34a55cfae202642ac4d33acaa48168d Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 4 Apr 2025 14:25:13 +0200 Subject: [PATCH 066/372] PR feedback fixes 43 - Update Using_PDI.md 4 --- pdi/docs/Using_PDI.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 78fbfb01a..8a73d37ec 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -103,12 +103,16 @@ which does not require to pass an additional argument at compilation but requires to add an option to the target `CMakeLists.txt`, which must be enabled through an option at compilation. +### Using a no-pdi included in the currently used pdi repository + Use a `CMakeLists.txt` similar to `example/CMakeLists.txt` with `EXAMPLES_WITHOUT_PDI` for your target, then use the following: ```bash cmake . -DEXAMPLES_WITHOUT_PDI=ON ``` +### Using a specific no-pdi through a full path + Alternatively, you can also use the `PDIConfig` method to compile with an added argument pointing to the no-pdi folder. From 7626f12bc2426e6c6a34c3c7edeb277b32f6956c Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 10 Apr 2025 16:28:54 +0200 Subject: [PATCH 067/372] PR feedback fixes 44 - Clarify Using_PDI.md and update to v1.9.0 of PDI (const) --- example/CMakeLists.txt | 13 ++++++++----- no-pdi/include/pdi.h | 6 +++--- pdi/docs/Using_PDI.md | 21 ++++++++++++--------- tests/no-pdi/CMakeLists.txt | 4 ++-- 4 files changed, 25 insertions(+), 19 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index ff4faeb47..d26205ccf 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -48,11 +48,14 @@ endif() # Includes include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) -option(EXAMPLES_WITHOUT_PDI "Disable PDI" OFF) - -if(EXAMPLES_WITHOUT_PDI) - message(WARNING "PDI is disabled.") - include(${CMAKE_CURRENT_LIST_DIR}/../no-pdi/cmake/no-pdi.cmake) +option(EXAMPLES_WITHOUT_PDI "Disable PDI using local relative path to PDIConfig" OFF) + +if(PDI_ROOT) + message(WARNING "Using include through PDI_ROOT's full path") + include(${PDI_ROOT}/PDIConfig.cmake) +elseif(EXAMPLES_WITHOUT_PDI) + message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR's relative path") + include(${CMAKE_CURRENT_LIST_DIR}/../no-pdi/cmake/PDIConfig.cmake) else() find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) endif() diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 7c13237e2..9976ac55d 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -193,7 +193,7 @@ typedef enum PDI_inout_e { /** Shares some data with PDI. The user code should not modify it before * a call to either PDI_release or PDI_reclaim. */ -static inline PDI_status_t PDI_share(const char* name, void* data, PDI_inout_t access) +static inline PDI_status_t PDI_share(const char* name, const void* data, PDI_inout_t access) { return PDI_OK; } @@ -230,7 +230,7 @@ static inline PDI_status_t PDI_event(const char* event) /** Shortly exposes some data to PDI. Equivalent to PDI_share + PDI_reclaim. */ -static inline PDI_status_t PDI_expose(const char* name, void* data, PDI_inout_t access) +static inline PDI_status_t PDI_expose(const char* name, const void* data, PDI_inout_t access) { return PDI_OK; } @@ -240,7 +240,7 @@ static inline PDI_status_t PDI_expose(const char* name, void* data, PDI_inout_t * * NULL argument indicates an end of the list. */ -static inline PDI_status_t PDI_multi_expose(const char* event_name, const char* name, void* data, PDI_inout_t access, ...) +static inline PDI_status_t PDI_multi_expose(const char* event_name, const char* name, const void* data, PDI_inout_t access, ...) { return PDI_OK; } diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 8a73d37ec..e122f53d5 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -98,14 +98,16 @@ plugins in 4 steps (it will use the first plugin found): ## How to deactivate PDI {#deactivate_pdi} -You can use the `PDIConfig` method, -which does not require to pass an additional argument at compilation -but requires to add an option to the target `CMakeLists.txt`, -which must be enabled through an option at compilation. +### Using the no-pdi included in the currently used pdi repository -### Using a no-pdi included in the currently used pdi repository +You can use the no-pdi folder of your pdi installation, +which does not require to specify a path at compilation +but requires to add an option ("EXAMPLES_WITHOUT_PDI" in the below example) +to the target CMakeLists.txt, +which must be enabled through a chosen cmake argument at compilation. -Use a `CMakeLists.txt` similar to `example/CMakeLists.txt` with `EXAMPLES_WITHOUT_PDI` for your target, +Use a CMakeLists.txt similar to example/CMakeLists.txt +with `if(EXAMPLES_WITHOUT_PDI)` and `option(EXAMPLES_WITHOUT_PDI)` for your target, then use the following: ```bash cmake . -DEXAMPLES_WITHOUT_PDI=ON @@ -113,10 +115,11 @@ cmake . -DEXAMPLES_WITHOUT_PDI=ON ### Using a specific no-pdi through a full path -Alternatively, you can also use the `PDIConfig` method -to compile with an added argument pointing to the no-pdi folder. +Alternatively, you can use a specific no-pdi folder among your system, +to compile with an added argument pointing to this no-pdi folder using a full path. -Use a `CMakeLists.txt` similar to `tests/no-pdi/CMakeLists.txt` with `PDI_ROOT` for your target, +Use a CMakeLists.txt similar to example/CMakeLists.txt +with `if(PDI_ROOT)` for your target, then use the following: ```bash cmake . -PDI_ROOT="////pdi/no-pdi/cmake" diff --git a/tests/no-pdi/CMakeLists.txt b/tests/no-pdi/CMakeLists.txt index 100bf4c6e..494e68641 100644 --- a/tests/no-pdi/CMakeLists.txt +++ b/tests/no-pdi/CMakeLists.txt @@ -30,7 +30,7 @@ set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" ON) option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) -option(EXAMPLES_NO_PDI "Disable PDI using PDIConfig" OFF) +option(EXAMPLES_NO_PDI "Disable PDI using local relative path to PDIConfig" OFF) include(CTest) @@ -38,7 +38,7 @@ find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) if(PDI_ROOT) message(WARNING "Using include through PDI_ROOT") include(${PDI_ROOT}/PDIConfig.cmake) -else() #if(EXAMPLES_NO_PDI) +else() #elseif(EXAMPLES_NO_PDI) message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) endif() From 8a9bde8a84e75c86144d9a47323b8cffbd16176d Mon Sep 17 00:00:00 2001 From: JAuriac <56091659+JAuriac@users.noreply.github.com> Date: Sat, 14 Jun 2025 12:21:40 +0200 Subject: [PATCH 068/372] Update no-pdi/CMakeLists.txt - Full path for PDIConfig.cmake Co-authored-by: Julien Bigot --- no-pdi/CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index 9b577189a..c4227dbbf 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -30,8 +30,4 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES C CXX) -# Set the CMAKE_PREFIX_PATH to include the directory containing PDIConfig.cmake -set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") - -# Include PDI -include(cmake/PDIConfig.cmake) \ No newline at end of file +include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake") \ No newline at end of file From 454cfd8d2a091ae435e6805baea8eed652386a62 Mon Sep 17 00:00:00 2001 From: JAuriac <56091659+JAuriac@users.noreply.github.com> Date: Sat, 14 Jun 2025 12:23:47 +0200 Subject: [PATCH 069/372] Update pdi/docs/Using_PDI.md - Specify how to place the folder of no-pdi Co-authored-by: Julien Bigot --- pdi/docs/Using_PDI.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index e122f53d5..878415ed6 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -100,11 +100,9 @@ plugins in 4 steps (it will use the first plugin found): ### Using the no-pdi included in the currently used pdi repository -You can use the no-pdi folder of your pdi installation, -which does not require to specify a path at compilation -but requires to add an option ("EXAMPLES_WITHOUT_PDI" in the below example) -to the target CMakeLists.txt, -which must be enabled through a chosen cmake argument at compilation. +You can copy the `no-pdi` folder from PDI in your application repository, and +add an option (`BUILD_WITHOUT_PDI` in the example below) to your +`CMakeLists.txt` to use this mock folder instead of the real PDI. Use a CMakeLists.txt similar to example/CMakeLists.txt with `if(EXAMPLES_WITHOUT_PDI)` and `option(EXAMPLES_WITHOUT_PDI)` for your target, From 47973aeb07e20a4086a6e3513e89646add0dde5c Mon Sep 17 00:00:00 2001 From: JAuriac <56091659+JAuriac@users.noreply.github.com> Date: Sat, 14 Jun 2025 12:32:52 +0200 Subject: [PATCH 070/372] Update pull_request_template.md - Add mention of keeping no-pdi up-to-date --- .github/pull_request_template.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d523beb65..5f73cfea0 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -7,7 +7,8 @@ Before merging your code, please check the following: * [ ] you have added a line describing your changes to the Changelog; * [ ] you have added unit tests for any new or improved feature; * [ ] in case you updated dependencies, you have checked pdi/docs/CheckList.md; -* [ ] in case you added a new member to pdi.h, add the equivalent empty member to no-pdi/include/pdi.h +* [ ] in case you added a new member to pdi.h, add the equivalent empty member to no-pdi/include/pdi.h; +* [ ] all versions changes (including PDI itself and CMake) must be reflected on no-pdi; * you have checked your code format: - [ ] you have checked that you respect all conventions specified in CONTRIBUTING.md; - [ ] you have checked that the indentation and formatting conforms to the `.clang-format`; From f1c38ea82500dee2150e9f0034a2619a4ba1b703 Mon Sep 17 00:00:00 2001 From: JAuriac <56091659+JAuriac@users.noreply.github.com> Date: Sat, 14 Jun 2025 12:44:26 +0200 Subject: [PATCH 071/372] Update bin/build_and_run_all_tests - Change test directory to include two subdirectories Co-authored-by: Julien Bigot --- bin/build_and_run_all_tests | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index fab195fd5..ddc3de6e0 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -39,14 +39,17 @@ SRCDIR="${PWD}" TEST_DIR="${TEST_DIR:-${PWD}}" cd "${TEST_DIR}" cd "$(mktemp -d pdibuild.XXXXX)" -TEST_DIR="${PWD}" +TEST_DIR_ROOT="${PWD}" -cd "${SRCDIR}" -TEST_DIR_NO_PDI="${TEST_DIR_NO_PDI:-${PWD}}" -cd "${TEST_DIR_NO_PDI}" -cd "$(mktemp -d pdibuild.XXXXX)" +mkdir no_pdi +cd no_pdi TEST_DIR_NO_PDI="${PWD}" +cd "${TEST_DIR_ROOT}" +mkdir with_pdi +cd with_pdi +TEST_DIR="${PWD}" + cd "${SRCDIR}" cd "$(dirname "$0")/.." SRCDIR="${PWD}" From beb04c4a6d311751633a43a2fd5c7d56ab572cc1 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 27 Jun 2025 10:09:51 +0200 Subject: [PATCH 072/372] Update test folder layout to run no-pdi tests with both pdi and no-pdi --- .github/pull_request_template.md | 3 +- bin/build_and_run_all_tests | 7 ++-- example/CMakeLists.txt | 14 +------ example/README.md | 7 ++++ pdi/docs/CheckList.md | 1 + tests/CMakeLists.txt | 57 ++++++++++++++++++++++--- tests/no-pdi/CMakeLists.txt | 62 ---------------------------- tests/pdi/CMakeLists.txt | 64 ----------------------------- tests/{pdi => }/test.h | 0 tests/{pdi => }/test_01.c | 0 tests/{pdi => }/test_01.yml | 0 tests/{pdi => }/test_02.c | 0 tests/{pdi => }/test_02.yml | 0 tests/{pdi => }/test_03.c | 0 tests/{pdi => }/test_03.yml | 0 tests/{pdi => }/test_04.c | 0 tests/{pdi => }/test_04.yml | 0 tests/{pdi => }/test_05.c | 0 tests/{pdi => }/test_05.yml | 0 tests/{no-pdi => }/test_07_main.c | 0 tests/{no-pdi => }/test_07_main.cpp | 0 tests/{no-pdi => }/test_07_no-pdi.h | 0 22 files changed, 67 insertions(+), 148 deletions(-) delete mode 100644 tests/no-pdi/CMakeLists.txt delete mode 100644 tests/pdi/CMakeLists.txt rename tests/{pdi => }/test.h (100%) rename tests/{pdi => }/test_01.c (100%) rename tests/{pdi => }/test_01.yml (100%) rename tests/{pdi => }/test_02.c (100%) rename tests/{pdi => }/test_02.yml (100%) rename tests/{pdi => }/test_03.c (100%) rename tests/{pdi => }/test_03.yml (100%) rename tests/{pdi => }/test_04.c (100%) rename tests/{pdi => }/test_04.yml (100%) rename tests/{pdi => }/test_05.c (100%) rename tests/{pdi => }/test_05.yml (100%) rename tests/{no-pdi => }/test_07_main.c (100%) rename tests/{no-pdi => }/test_07_main.cpp (100%) rename tests/{no-pdi => }/test_07_no-pdi.h (100%) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 5f73cfea0..acef804c8 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -7,8 +7,7 @@ Before merging your code, please check the following: * [ ] you have added a line describing your changes to the Changelog; * [ ] you have added unit tests for any new or improved feature; * [ ] in case you updated dependencies, you have checked pdi/docs/CheckList.md; -* [ ] in case you added a new member to pdi.h, add the equivalent empty member to no-pdi/include/pdi.h; -* [ ] all versions changes (including PDI itself and CMake) must be reflected on no-pdi; +* [ ] in case of a change in pdi.h, this same change must be reflected in no-pdi/include/pdi.h; * you have checked your code format: - [ ] you have checked that you respect all conventions specified in CONTRIBUTING.md; - [ ] you have checked that the indentation and formatting conforms to the `.clang-format`; diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index ddc3de6e0..4055d4c4a 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -118,14 +118,15 @@ fi cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -j || true +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} # Configure, build & test for no-pdi cd "${TEST_DIR_NO_PDI}" +RELATIVE_MODULE_PATH="../../no-pdi/cmake" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DDISABLE_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DCMAKE_MODULE_PATH="${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -j +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index d26205ccf..f6e3cabf9 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -48,17 +48,7 @@ endif() # Includes include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) -option(EXAMPLES_WITHOUT_PDI "Disable PDI using local relative path to PDIConfig" OFF) - -if(PDI_ROOT) - message(WARNING "Using include through PDI_ROOT's full path") - include(${PDI_ROOT}/PDIConfig.cmake) -elseif(EXAMPLES_WITHOUT_PDI) - message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR's relative path") - include(${CMAKE_CURRENT_LIST_DIR}/../no-pdi/cmake/PDIConfig.cmake) -else() - find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) -endif() +find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) find_library(LIB_M m DOC "The math library") # Default standard in the project is C11 @@ -153,4 +143,4 @@ if("${BUILD_PYTHON}") add_test(NAME PDI_example_trace_P COMMAND "${MPIEXEC}" "${MPIEXEC_NUMPROC_FLAG}" 3 ${MPIEXEC_PREFLAGS} "$" "${Python3_EXECUTABLE}" ${MPIEXEC_POSTFLAGS} "${CMAKE_CURRENT_SOURCE_DIR}/example.py" "${CMAKE_CURRENT_SOURCE_DIR}/trace.yml") set_property(TEST PDI_example_trace_P PROPERTY TIMEOUT 15) set_property(TEST PDI_example_trace_P PROPERTY PROCESSORS 3) -endif("${BUILD_PYTHON}") +endif("${BUILD_PYTHON}") \ No newline at end of file diff --git a/example/README.md b/example/README.md index 3b5752e3c..5675b362a 100644 --- a/example/README.md +++ b/example/README.md @@ -117,3 +117,10 @@ Above instruction will share `iter` and `main_field`, call `newiter` event and t This is the place when plugins will read/write our data. We have covered the logic behind the %PDI example. Now you can start the \ref Hands_on. + +## PDI deactivation {#pdi_deactivation} + +Use `no-pdi` instead of `pdi` when building with: +```bash +cmake -DCMAKE_MODULE_PATH=/no-pdi/cmake .. +``` diff --git a/pdi/docs/CheckList.md b/pdi/docs/CheckList.md index 55a09dc78..5436535d8 100644 --- a/pdi/docs/CheckList.md +++ b/pdi/docs/CheckList.md @@ -24,6 +24,7 @@ To publish a new minor or major release: * start from the main branch * change the version in `pdi/VERSION` * change the version in `pdi/docs/Source_installation.md` +* all versions changes (including PDI itself and CMake) must be reflected on no-pdi * go over all `CHANGELOG.md` files and mark the just released version * commit these changes into a new version branch (`v${X}.${Y}`) * tag the new release: `git tag -m "PDI release ${X}.${Y}.0" -s "${X}.${Y}.0"` diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 74fcce4b9..905157990 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -34,8 +34,55 @@ option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) -if (DISABLE_PDI) - add_subdirectory(no-pdi/) # no-pdi -else() - add_subdirectory(pdi/) # pdi -endif() +find_package(PDI REQUIRED COMPONENTS C) + +if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") + +add_executable(test_01_C test_01.c) +target_link_libraries(test_01_C PDI::PDI_C) +add_test(NAME test_01_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_01.yml") + +add_executable(test_02_C test_02.c) +target_link_libraries(test_02_C PDI::PDI_C) +add_test(NAME test_02_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_02.yml") + +add_executable(test_03_C test_03.c) +target_link_libraries(test_03_C PDI::PDI_C) +add_test(NAME test_03_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_03.yml") + +add_executable(test_04_C test_04.c) +target_link_libraries(test_04_C PDI::PDI_C) +add_test(NAME test_04_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_04.yml") + +endif("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") +if("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") + +add_executable(test_05_C test_05.c) +target_link_libraries(test_05_C PDI::PDI_C) +add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_05.yml") + +endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") + +# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +# if(EXAMPLES_NO_PDI) +# message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") +# include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) +# endif() +# include_directories(${CMAKE_CURRENT_LIST_DIR}) + +add_executable(test_07_main_C test_07_main.c) +set(BUILD_FLAGS_FOR_C "-Wall") +target_compile_options(test_07_main_C PRIVATE + $<$:${BUILD_FLAGS_FOR_C}>) +target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) +add_test(NAME test_07_main_C COMMAND "$") + +add_executable(test_07_main_CXX test_07_main.cpp) +set(BUILD_FLAGS_FOR_CXX "-Wall") +target_compile_options(test_07_main_CXX PRIVATE + $<$:${BUILD_FLAGS_FOR_CXX}>) +set_target_properties(test_07_main_CXX PROPERTIES CXX_STANDARD 11) +set_target_properties(test_07_main_CXX PROPERTIES LANGUAGE CXX) +set_target_properties(test_07_main_CXX PROPERTIES LINKER_LANGUAGE CXX) +target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) +add_test(NAME test_07_main_CXX COMMAND "$") diff --git a/tests/no-pdi/CMakeLists.txt b/tests/no-pdi/CMakeLists.txt deleted file mode 100644 index 494e68641..000000000 --- a/tests/no-pdi/CMakeLists.txt +++ /dev/null @@ -1,62 +0,0 @@ -#============================================================================= -# Copyright (C) 2020 Institute of Bioorganic Chemistry Polish Academy of Science (PSNC) -# Copyright (C) 2020-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * 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. -# * Neither the name of CEA nor the names of its contributors may be used to -# endorse or promote products derived from this software without specific -# prior written permission. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#============================================================================= - -cmake_minimum_required(VERSION 3.16...3.29) -project(pdi_tests LANGUAGES C CXX) - -set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") - -option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" ON) -option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) -option(EXAMPLES_NO_PDI "Disable PDI using local relative path to PDIConfig" OFF) - -include(CTest) - -find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -if(PDI_ROOT) - message(WARNING "Using include through PDI_ROOT") - include(${PDI_ROOT}/PDIConfig.cmake) -else() #elseif(EXAMPLES_NO_PDI) - message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") - include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) -endif() -include_directories(${CMAKE_CURRENT_LIST_DIR}) - -add_executable(test_07_main_C test_07_main.c) -set(BUILD_FLAGS_FOR_C "-Wall") -target_compile_options(test_07_main_C PRIVATE - $<$:${BUILD_FLAGS_FOR_C}>) -target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) -add_test(NAME test_07_main_C COMMAND "$") - -add_executable(test_07_main_CXX test_07_main.cpp) -set(BUILD_FLAGS_FOR_CXX "-Wall") -target_compile_options(test_07_main_CXX PRIVATE - $<$:${BUILD_FLAGS_FOR_CXX}>) -set_target_properties(test_07_main_CXX PROPERTIES CXX_STANDARD 11) -set_target_properties(test_07_main_CXX PROPERTIES LANGUAGE CXX) -set_target_properties(test_07_main_CXX PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) -add_test(NAME test_07_main_CXX COMMAND "$") diff --git a/tests/pdi/CMakeLists.txt b/tests/pdi/CMakeLists.txt deleted file mode 100644 index 535ab009f..000000000 --- a/tests/pdi/CMakeLists.txt +++ /dev/null @@ -1,64 +0,0 @@ -#============================================================================= -# Copyright (C) 2020 Institute of Bioorganic Chemistry Polish Academy of Science (PSNC) -# Copyright (C) 2020-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * 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. -# * Neither the name of CEA nor the names of its contributors may be used to -# endorse or promote products derived from this software without specific -# prior written permission. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#============================================================================= - -cmake_minimum_required(VERSION 3.16...3.29) -project(pdi_tests LANGUAGES C CXX) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") - -set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") - -option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" ON) -option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) - -include(CTest) - -find_package(PDI REQUIRED COMPONENTS C) - -if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") - -add_executable(test_01_C test_01.c) -target_link_libraries(test_01_C PDI::PDI_C) -add_test(NAME test_01_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_01.yml") - -add_executable(test_02_C test_02.c) -target_link_libraries(test_02_C PDI::PDI_C) -add_test(NAME test_02_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_02.yml") - -add_executable(test_03_C test_03.c) -target_link_libraries(test_03_C PDI::PDI_C) -add_test(NAME test_03_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_03.yml") - -add_executable(test_04_C test_04.c) -target_link_libraries(test_04_C PDI::PDI_C) -add_test(NAME test_04_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_04.yml") - -endif("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") -if("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") - -add_executable(test_05_C test_05.c) -target_link_libraries(test_05_C PDI::PDI_C) -add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_05.yml") - -endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") \ No newline at end of file diff --git a/tests/pdi/test.h b/tests/test.h similarity index 100% rename from tests/pdi/test.h rename to tests/test.h diff --git a/tests/pdi/test_01.c b/tests/test_01.c similarity index 100% rename from tests/pdi/test_01.c rename to tests/test_01.c diff --git a/tests/pdi/test_01.yml b/tests/test_01.yml similarity index 100% rename from tests/pdi/test_01.yml rename to tests/test_01.yml diff --git a/tests/pdi/test_02.c b/tests/test_02.c similarity index 100% rename from tests/pdi/test_02.c rename to tests/test_02.c diff --git a/tests/pdi/test_02.yml b/tests/test_02.yml similarity index 100% rename from tests/pdi/test_02.yml rename to tests/test_02.yml diff --git a/tests/pdi/test_03.c b/tests/test_03.c similarity index 100% rename from tests/pdi/test_03.c rename to tests/test_03.c diff --git a/tests/pdi/test_03.yml b/tests/test_03.yml similarity index 100% rename from tests/pdi/test_03.yml rename to tests/test_03.yml diff --git a/tests/pdi/test_04.c b/tests/test_04.c similarity index 100% rename from tests/pdi/test_04.c rename to tests/test_04.c diff --git a/tests/pdi/test_04.yml b/tests/test_04.yml similarity index 100% rename from tests/pdi/test_04.yml rename to tests/test_04.yml diff --git a/tests/pdi/test_05.c b/tests/test_05.c similarity index 100% rename from tests/pdi/test_05.c rename to tests/test_05.c diff --git a/tests/pdi/test_05.yml b/tests/test_05.yml similarity index 100% rename from tests/pdi/test_05.yml rename to tests/test_05.yml diff --git a/tests/no-pdi/test_07_main.c b/tests/test_07_main.c similarity index 100% rename from tests/no-pdi/test_07_main.c rename to tests/test_07_main.c diff --git a/tests/no-pdi/test_07_main.cpp b/tests/test_07_main.cpp similarity index 100% rename from tests/no-pdi/test_07_main.cpp rename to tests/test_07_main.cpp diff --git a/tests/no-pdi/test_07_no-pdi.h b/tests/test_07_no-pdi.h similarity index 100% rename from tests/no-pdi/test_07_no-pdi.h rename to tests/test_07_no-pdi.h From cff8d6488265d5663f46ef0d8022c01fc0a1b9b3 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 27 Jun 2025 10:24:11 +0200 Subject: [PATCH 073/372] Update pdi/docs/Using_PDI.md to remove mentions of PDI_ROOT and instead mention CMAKE_MODULE_PATH --- pdi/docs/Using_PDI.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 878415ed6..f6623afed 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -104,11 +104,19 @@ You can copy the `no-pdi` folder from PDI in your application repository, and add an option (`BUILD_WITHOUT_PDI` in the example below) to your `CMakeLists.txt` to use this mock folder instead of the real PDI. -Use a CMakeLists.txt similar to example/CMakeLists.txt -with `if(EXAMPLES_WITHOUT_PDI)` and `option(EXAMPLES_WITHOUT_PDI)` for your target, -then use the following: +In your `CMakeLists.txt`, replace the `find_package(PDI)` with code like the +following one: +```CMake +option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) +if(BUILD_WITHOUT_PDI) + include("${CMAKE_CURRENT_LIST_DIR}/no-pdi/cmake/PDIConfig.cmake) +else() + find_package(PDI REQUIRED) +endif() +``` +Then you can build your project with this option specified to disable PDI: ```bash -cmake . -DEXAMPLES_WITHOUT_PDI=ON +cmake . -DBUILD_WITHOUT_PDI=ON ``` ### Using a specific no-pdi through a full path @@ -116,11 +124,10 @@ cmake . -DEXAMPLES_WITHOUT_PDI=ON Alternatively, you can use a specific no-pdi folder among your system, to compile with an added argument pointing to this no-pdi folder using a full path. -Use a CMakeLists.txt similar to example/CMakeLists.txt -with `if(PDI_ROOT)` for your target, +Use a CMakeLists.txt similar to example/CMakeLists.txt, then use the following: ```bash -cmake . -PDI_ROOT="////pdi/no-pdi/cmake" +cmake . -DCMAKE_MODULE_PATH=/no-pdi/cmake ``` -%PDI can be re-enabled by reversing those modifications. +%PDI can be re-enabled by reverting those modifications. From 60244a8db25e45c6d92330afbe3c775f6f7fc13a Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 27 Jun 2025 11:31:30 +0200 Subject: [PATCH 074/372] Update tests' CMakeLists (fix) --- tests/CMakeLists.txt | 2 +- tests/test_07_main.c | 2 +- tests/test_07_main.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 905157990..6d964c8bc 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -63,7 +63,7 @@ add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOUR endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") -# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) # if(EXAMPLES_NO_PDI) # message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") # include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) diff --git a/tests/test_07_main.c b/tests/test_07_main.c index adffa6267..93fc87d01 100644 --- a/tests/test_07_main.c +++ b/tests/test_07_main.c @@ -22,7 +22,7 @@ * THE SOFTWARE. ******************************************************************************/ -#include +#include "test_07_no-pdi.h" int main(int argc, char* argv[]) { diff --git a/tests/test_07_main.cpp b/tests/test_07_main.cpp index f42532c6c..1e7863991 100644 --- a/tests/test_07_main.cpp +++ b/tests/test_07_main.cpp @@ -22,7 +22,7 @@ * THE SOFTWARE. ******************************************************************************/ -#include +#include "test_07_no-pdi.h" #include From 3a2dff9e084d7c319c21227b6d9d859992cc7e05 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 27 Jun 2025 14:18:35 +0200 Subject: [PATCH 075/372] Fix no-pdi test compatibility with pdi 1 --- tests/test_07_no-pdi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 132171b08..841236db8 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -115,7 +115,7 @@ int tests(int argc, char* argv[]) exit(1); } - errhandler(); + // errhandler(); share(); access(); From f5b14250ab7eed59c5e093202267620f656e9140 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 27 Jun 2025 14:56:09 +0200 Subject: [PATCH 076/372] Fix no-pdi test compatibility with pdi 2 --- bin/build_and_run_all_tests | 2 +- tests/test_07_no-pdi.h | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 4055d4c4a..b346dd5cf 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -120,7 +120,7 @@ cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} - +echo "############" # Configure, build & test for no-pdi diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 841236db8..d985ae15d 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -102,7 +102,17 @@ void errhandler() int tests(int argc, char* argv[]) { - static const char* CONFIG_YAML = "logging: trace \n"; + static const char* CONFIG_YAML = + "logging: trace \n" + "data: \n" + " to_share: {type: array, subtype: int, size: 2} \n" + " to_access: {type: array, subtype: int, size: 2} \n" + " to_release: {type: array, subtype: int, size: 2} \n" + " to_reclaim: {type: array, subtype: int, size: 2} \n" + " to_expose: {type: array, subtype: int, size: 2} \n" + " to_multi_expose: {type: array, subtype: int, size: 2} \n" + " to_multi_expose_two: {type: array, subtype: int, size: 2} \n"; + // "plugins: \n" if (PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML))) { fprintf(stderr, "*** Error: no-pdi initialisation\n"); From 9126a17e9ba89d465d3075d36b2073a69d50d33f Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 27 Jun 2025 15:13:38 +0200 Subject: [PATCH 077/372] Fix no-pdi test compatibility with pdi 3 --- bin/build_and_run_all_tests | 4 ++-- tests/test_07_no-pdi.h | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index b346dd5cf..e5d66b753 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -116,7 +116,7 @@ fi # Configure, build & test -cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} @@ -127,6 +127,6 @@ echo "############" cd "${TEST_DIR_NO_PDI}" RELATIVE_MODULE_PATH="../../no-pdi/cmake" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DCMAKE_MODULE_PATH="${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DCMAKE_MODULE_PATH="${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index d985ae15d..0312002ee 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -103,15 +103,15 @@ void errhandler() int tests(int argc, char* argv[]) { static const char* CONFIG_YAML = - "logging: trace \n" - "data: \n" - " to_share: {type: array, subtype: int, size: 2} \n" - " to_access: {type: array, subtype: int, size: 2} \n" - " to_release: {type: array, subtype: int, size: 2} \n" - " to_reclaim: {type: array, subtype: int, size: 2} \n" - " to_expose: {type: array, subtype: int, size: 2} \n" - " to_multi_expose: {type: array, subtype: int, size: 2} \n" - " to_multi_expose_two: {type: array, subtype: int, size: 2} \n"; + "logging: trace \n" + "data: \n" + " to_share: {type: array, subtype: int, size: 2} \n" + " to_access: {type: array, subtype: int, size: 2} \n" + " to_release: {type: array, subtype: int, size: 2} \n" + " to_reclaim: {type: array, subtype: int, size: 2} \n" + " to_expose: {type: array, subtype: int, size: 2} \n" + " to_multi_expose: {type: array, subtype: int, size: 2} \n" + " to_multi_expose_two: {type: array, subtype: int, size: 2} \n"; // "plugins: \n" if (PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML))) { @@ -125,7 +125,7 @@ int tests(int argc, char* argv[]) exit(1); } - // errhandler(); + errhandler(); share(); access(); From 0220fe2ef4bf2ba7805b7092d18bfa18655c725c Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 27 Jun 2025 15:25:44 +0200 Subject: [PATCH 078/372] Fix no-pdi test compatibility with pdi 4 --- tests/test_07_no-pdi.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 0312002ee..c6e8b3ee2 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -94,6 +94,8 @@ void multi_expose() void errhandler() { PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); + fprintf(stderr, "*** errhandler func %s\n", current_handler.func); + fprintf(stderr, "*** errhandler context %s\n", current_handler.context); if (NULL != current_handler.func || NULL != current_handler.context) { fprintf(stderr, "*** Error: no-pdi errhandler\n"); exit(1); @@ -102,17 +104,17 @@ void errhandler() int tests(int argc, char* argv[]) { - static const char* CONFIG_YAML = - "logging: trace \n" - "data: \n" - " to_share: {type: array, subtype: int, size: 2} \n" - " to_access: {type: array, subtype: int, size: 2} \n" - " to_release: {type: array, subtype: int, size: 2} \n" - " to_reclaim: {type: array, subtype: int, size: 2} \n" - " to_expose: {type: array, subtype: int, size: 2} \n" - " to_multi_expose: {type: array, subtype: int, size: 2} \n" - " to_multi_expose_two: {type: array, subtype: int, size: 2} \n"; - // "plugins: \n" + static const char* CONFIG_YAML + = "logging: trace \n" + "data: \n" + " to_share: {type: array, subtype: int, size: 2} \n" + " to_access: {type: array, subtype: int, size: 2} \n" + " to_release: {type: array, subtype: int, size: 2} \n" + " to_reclaim: {type: array, subtype: int, size: 2} \n" + " to_expose: {type: array, subtype: int, size: 2} \n" + " to_multi_expose: {type: array, subtype: int, size: 2} \n" + " to_multi_expose_two: {type: array, subtype: int, size: 2} \n"; + // "plugins: \n" if (PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML))) { fprintf(stderr, "*** Error: no-pdi initialisation\n"); From 4906d62ce4f9dcca6d2f2c1f67d1defbc060d2eb Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 27 Jun 2025 15:32:15 +0200 Subject: [PATCH 079/372] Fix no-pdi test compatibility with pdi 5 --- tests/test_07_no-pdi.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index c6e8b3ee2..83955a29a 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -96,7 +96,7 @@ void errhandler() PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); fprintf(stderr, "*** errhandler func %s\n", current_handler.func); fprintf(stderr, "*** errhandler context %s\n", current_handler.context); - if (NULL != current_handler.func || NULL != current_handler.context) { + if (null != current_handler.func || null != current_handler.context) { fprintf(stderr, "*** Error: no-pdi errhandler\n"); exit(1); } @@ -104,7 +104,7 @@ void errhandler() int tests(int argc, char* argv[]) { - static const char* CONFIG_YAML + static const char* CONFIG_YAML = "logging: trace \n" "data: \n" " to_share: {type: array, subtype: int, size: 2} \n" @@ -114,7 +114,6 @@ int tests(int argc, char* argv[]) " to_expose: {type: array, subtype: int, size: 2} \n" " to_multi_expose: {type: array, subtype: int, size: 2} \n" " to_multi_expose_two: {type: array, subtype: int, size: 2} \n"; - // "plugins: \n" if (PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML))) { fprintf(stderr, "*** Error: no-pdi initialisation\n"); From dcd210985c88792516fb03c15d45b042672d53e3 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 27 Jun 2025 15:38:36 +0200 Subject: [PATCH 080/372] Fix no-pdi test compatibility with pdi 6 --- tests/test_07_no-pdi.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 83955a29a..29fe3e41d 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -91,16 +91,17 @@ void multi_expose() } } -void errhandler() -{ - PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); - fprintf(stderr, "*** errhandler func %s\n", current_handler.func); - fprintf(stderr, "*** errhandler context %s\n", current_handler.context); - if (null != current_handler.func || null != current_handler.context) { - fprintf(stderr, "*** Error: no-pdi errhandler\n"); - exit(1); - } -} +// void errhandler() +// { +// PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); +// fprintf(stderr, "*** errhandler func %s\n", current_handler.func); +// fprintf(stderr, "*** errhandler context %s\n", current_handler.context); +// if (NULL != current_handler.func || NULL != current_handler.context) { +// if (null != current_handler.func || null != current_handler.context) { +// fprintf(stderr, "*** Error: no-pdi errhandler\n"); +// exit(1); +// } +// } int tests(int argc, char* argv[]) { From 650cd47119edfcff1dd6580fa83ef210162e916f Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 13:02:47 +0200 Subject: [PATCH 081/372] Fix no-pdi test compatibility with pdi 7 --- bin/build_and_run_all_tests | 51 ++++++++++++++++++++++++------------- tests/test_07_no-pdi.h | 24 ++++++++--------- 2 files changed, 46 insertions(+), 29 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index e5d66b753..ebef45e6f 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -33,21 +33,37 @@ set -xe +# # Make our work dirs +# SRCDIR="${PWD}" + +# TEST_DIR="${TEST_DIR:-${PWD}}" +# cd "${TEST_DIR}" +# cd "$(mktemp -d pdibuild.XXXXX)" +# TEST_DIR_ROOT="${PWD}" + +# mkdir no_pdi +# cd no_pdi +# TEST_DIR_NO_PDI="${PWD}" + +# cd "${TEST_DIR_ROOT}" +# mkdir with_pdi +# cd with_pdi +# TEST_DIR="${PWD}" + +# cd "${SRCDIR}" +# cd "$(dirname "$0")/.." +# SRCDIR="${PWD}" + +# cd "${TEST_DIR}" + + +###################################### # Make our work dirs SRCDIR="${PWD}" TEST_DIR="${TEST_DIR:-${PWD}}" cd "${TEST_DIR}" cd "$(mktemp -d pdibuild.XXXXX)" -TEST_DIR_ROOT="${PWD}" - -mkdir no_pdi -cd no_pdi -TEST_DIR_NO_PDI="${PWD}" - -cd "${TEST_DIR_ROOT}" -mkdir with_pdi -cd with_pdi TEST_DIR="${PWD}" cd "${SRCDIR}" @@ -55,6 +71,7 @@ cd "$(dirname "$0")/.." SRCDIR="${PWD}" cd "${TEST_DIR}" +###################################### # Gather options @@ -117,16 +134,16 @@ fi # Configure, build & test cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +make verbose=1 ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} echo "############" # Configure, build & test for no-pdi -cd "${TEST_DIR_NO_PDI}" -RELATIVE_MODULE_PATH="../../no-pdi/cmake" -NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DCMAKE_MODULE_PATH="${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +# cd "${TEST_DIR_NO_PDI}" +# RELATIVE_MODULE_PATH="../../no-pdi/cmake" +# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" +# cmake -DBUILD_BENCHMARKING=OFF -DCMAKE_MODULE_PATH="${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 29fe3e41d..5107fee52 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -91,17 +91,17 @@ void multi_expose() } } -// void errhandler() -// { -// PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); -// fprintf(stderr, "*** errhandler func %s\n", current_handler.func); -// fprintf(stderr, "*** errhandler context %s\n", current_handler.context); -// if (NULL != current_handler.func || NULL != current_handler.context) { -// if (null != current_handler.func || null != current_handler.context) { -// fprintf(stderr, "*** Error: no-pdi errhandler\n"); -// exit(1); -// } -// } +void errhandler() +{ + PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); + fprintf(stderr, "*** errhandler func %s\n", current_handler.func); + fprintf(stderr, "*** errhandler context %s\n", current_handler.context); + if (NULL != current_handler.func || NULL != current_handler.context) { + // if (null != current_handler.func || null != current_handler.context) { + fprintf(stderr, "*** Error: no-pdi errhandler\n"); + exit(1); + } +} int tests(int argc, char* argv[]) { @@ -127,7 +127,7 @@ int tests(int argc, char* argv[]) exit(1); } - errhandler(); + // errhandler(); share(); access(); From dea9d5d15f5c7be104e81b6ee6e22d45ffdf8b7d Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 13:08:24 +0200 Subject: [PATCH 082/372] Fix no-pdi test compatibility with pdi 8 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index ebef45e6f..670c04019 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -135,7 +135,7 @@ fi cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make verbose=1 ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} echo "############" From 81bd94da8975b48ec2d691f1216b1f76b654c1ca Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 14:35:00 +0200 Subject: [PATCH 083/372] Fix no-pdi test compatibility with pdi 9 --- tests/test_07_no-pdi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 5107fee52..c15bf790a 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -45,7 +45,7 @@ void access() //access void release() //access/release { int to_release[2] = {1, 1}; - PDI_access("to_access", (void**)&to_release, PDI_IN); + PDI_access("to_release", (void**)&to_release, PDI_IN); if (PDI_OK != PDI_release("to_release")) { fprintf(stderr, "*** Error: no-pdi release\n"); exit(1); @@ -55,7 +55,7 @@ void release() //access/release void reclaim() //share/reclaim { int to_reclaim[2] = {1, 1}; - PDI_share("to_release", to_reclaim, PDI_OUT); + PDI_share("to_reclaim", to_reclaim, PDI_OUT); if (PDI_OK != PDI_reclaim("to_reclaim")) { fprintf(stderr, "*** Error: no-pdi reclaim\n"); exit(1); From c78167643bfa15a90424aa9e181a4acf9d38ffac Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 14:45:30 +0200 Subject: [PATCH 084/372] Fix no-pdi test compatibility with pdi 10 --- tests/test_07_no-pdi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index c15bf790a..134a30e22 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -36,6 +36,7 @@ void share() void access() //access { int to_access[2] = {1, 1}; + PDI_share("to_access", to_access, PDI_OUT); if (PDI_OK != PDI_access("to_access", (void**)&to_access, PDI_IN)) { fprintf(stderr, "*** Error: no-pdi access\n"); exit(1); From a9521165af450c4a40da968422297af35de005f9 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 14:52:22 +0200 Subject: [PATCH 085/372] Fix no-pdi test compatibility with pdi 11 --- tests/test_07_no-pdi.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 134a30e22..b9ec04e73 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -24,7 +24,7 @@ #include -void share() +void share() //share { int to_share[2] = {1, 1}; if (PDI_OK != PDI_share("to_share", to_share, PDI_OUT)) { @@ -33,7 +33,7 @@ void share() } } -void access() //access +void access() //share/access { int to_access[2] = {1, 1}; PDI_share("to_access", to_access, PDI_OUT); @@ -43,10 +43,10 @@ void access() //access } } -void release() //access/release +void release() //share/release { int to_release[2] = {1, 1}; - PDI_access("to_release", (void**)&to_release, PDI_IN); + PDI_share("to_release", to_release, PDI_OUT); if (PDI_OK != PDI_release("to_release")) { fprintf(stderr, "*** Error: no-pdi release\n"); exit(1); From 8deda1dcbb5abcbc4587e6acbf12df422795b56e Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 14:59:44 +0200 Subject: [PATCH 086/372] Fix no-pdi test compatibility with pdi 12 --- tests/test_07_no-pdi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index b9ec04e73..46db7c221 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -47,6 +47,7 @@ void release() //share/release { int to_release[2] = {1, 1}; PDI_share("to_release", to_release, PDI_OUT); + PDI_access("to_release", (void**)&to_release, PDI_IN); if (PDI_OK != PDI_release("to_release")) { fprintf(stderr, "*** Error: no-pdi release\n"); exit(1); From bd9a05d54c08885e981213062f347c80fb41e705 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 15:06:29 +0200 Subject: [PATCH 087/372] Fix no-pdi test compatibility with pdi 13 --- tests/test_07_no-pdi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 46db7c221..36f2b51af 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -129,7 +129,7 @@ int tests(int argc, char* argv[]) exit(1); } - // errhandler(); + errhandler(); share(); access(); From 8971e5ed75952511ce56e1f12e45ec97aa6b2a9f Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 15:20:09 +0200 Subject: [PATCH 088/372] Fix no-pdi test compatibility with pdi 14 --- tests/test_07_no-pdi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 36f2b51af..0b2691417 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -96,8 +96,8 @@ void multi_expose() void errhandler() { PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); - fprintf(stderr, "*** errhandler func %s\n", current_handler.func); - fprintf(stderr, "*** errhandler context %s\n", current_handler.context); + fprintf(stderr, "*** errhandler func %p\n", (void*)current_handler.func); + fprintf(stderr, "*** errhandler context %p\n", current_handler.context); if (NULL != current_handler.func || NULL != current_handler.context) { // if (null != current_handler.func || null != current_handler.context) { fprintf(stderr, "*** Error: no-pdi errhandler\n"); From 027bb403763dbc69116a6972327022d59304a14c Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 15:44:22 +0200 Subject: [PATCH 089/372] Fix no-pdi test compatibility with pdi 15 --- tests/test_07_no-pdi.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 0b2691417..ed4ac2cf9 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -95,6 +95,8 @@ void multi_expose() void errhandler() { + fprintf(stderr, "*** PDI_NULL_HANDLER func %p\n", (void*)PDI_NULL_HANDLER.func); + fprintf(stderr, "*** PDI_NULL_HANDLER context %p\n", PDI_NULL_HANDLER.context); PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); fprintf(stderr, "*** errhandler func %p\n", (void*)current_handler.func); fprintf(stderr, "*** errhandler context %p\n", current_handler.context); From df13728b54a8cd3e6f674e385e8e20eab4e89e53 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 16:14:55 +0200 Subject: [PATCH 090/372] Fix no-pdi test compatibility with pdi 16 --- tests/test_07_no-pdi.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index ed4ac2cf9..9a3b2178f 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -95,13 +95,8 @@ void multi_expose() void errhandler() { - fprintf(stderr, "*** PDI_NULL_HANDLER func %p\n", (void*)PDI_NULL_HANDLER.func); - fprintf(stderr, "*** PDI_NULL_HANDLER context %p\n", PDI_NULL_HANDLER.context); PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); - fprintf(stderr, "*** errhandler func %p\n", (void*)current_handler.func); - fprintf(stderr, "*** errhandler context %p\n", current_handler.context); - if (NULL != current_handler.func || NULL != current_handler.context) { - // if (null != current_handler.func || null != current_handler.context) { + if (NULL != current_handler.context) { fprintf(stderr, "*** Error: no-pdi errhandler\n"); exit(1); } From 238a878f1872bd88858e175ba05a813244d43088 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 16:26:21 +0200 Subject: [PATCH 091/372] Fix no-pdi test compatibility with pdi 17 --- bin/build_and_run_all_tests | 62 ++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 670c04019..27e489eae 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -33,37 +33,21 @@ set -xe -# # Make our work dirs -# SRCDIR="${PWD}" - -# TEST_DIR="${TEST_DIR:-${PWD}}" -# cd "${TEST_DIR}" -# cd "$(mktemp -d pdibuild.XXXXX)" -# TEST_DIR_ROOT="${PWD}" - -# mkdir no_pdi -# cd no_pdi -# TEST_DIR_NO_PDI="${PWD}" - -# cd "${TEST_DIR_ROOT}" -# mkdir with_pdi -# cd with_pdi -# TEST_DIR="${PWD}" - -# cd "${SRCDIR}" -# cd "$(dirname "$0")/.." -# SRCDIR="${PWD}" - -# cd "${TEST_DIR}" - - -###################################### # Make our work dirs SRCDIR="${PWD}" TEST_DIR="${TEST_DIR:-${PWD}}" cd "${TEST_DIR}" cd "$(mktemp -d pdibuild.XXXXX)" +TEST_DIR_ROOT="${PWD}" + +mkdir no_pdi +cd no_pdi +TEST_DIR_NO_PDI="${PWD}" + +cd "${TEST_DIR_ROOT}" +mkdir with_pdi +cd with_pdi TEST_DIR="${PWD}" cd "${SRCDIR}" @@ -71,6 +55,22 @@ cd "$(dirname "$0")/.." SRCDIR="${PWD}" cd "${TEST_DIR}" + + +###################################### +# # Make our work dirs +# SRCDIR="${PWD}" + +# TEST_DIR="${TEST_DIR:-${PWD}}" +# cd "${TEST_DIR}" +# cd "$(mktemp -d pdibuild.XXXXX)" +# TEST_DIR="${PWD}" + +# cd "${SRCDIR}" +# cd "$(dirname "$0")/.." +# SRCDIR="${PWD}" + +# cd "${TEST_DIR}" ###################################### @@ -141,9 +141,9 @@ echo "############" # Configure, build & test for no-pdi -# cd "${TEST_DIR_NO_PDI}" -# RELATIVE_MODULE_PATH="../../no-pdi/cmake" -# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -# cmake -DBUILD_BENCHMARKING=OFF -DCMAKE_MODULE_PATH="${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +cd "${TEST_DIR_NO_PDI}" +RELATIVE_MODULE_PATH="../../no-pdi/cmake" +NO_PDI_TESTS="test_07_main_C test_07_main_CXX" +cmake -DBUILD_BENCHMARKING=OFF -DCMAKE_MODULE_PATH="${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make ${MAKEFLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From c11e5df6aaa57b48c935e9962fcd49f7a3115d24 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 17:05:54 +0200 Subject: [PATCH 092/372] Fix no-pdi test compatibility with pdi 18 --- bin/build_and_run_all_tests | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 27e489eae..9611eedd4 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -133,17 +133,18 @@ fi # Configure, build & test -cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make verbose=1 ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# make verbose=1 ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} echo "############" # Configure, build & test for no-pdi cd "${TEST_DIR_NO_PDI}" -RELATIVE_MODULE_PATH="../../no-pdi/cmake" +RELATIVE_MODULE_PATH="../../../no-pdi/cmake" +ls "${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DCMAKE_MODULE_PATH="${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From 0a15657bf6ed0d087700a92b4bd1446cb397c0ec Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 17:13:17 +0200 Subject: [PATCH 093/372] Fix no-pdi test compatibility with pdi 19 --- bin/build_and_run_all_tests | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 9611eedd4..fbca50e84 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -142,8 +142,11 @@ echo "############" # Configure, build & test for no-pdi cd "${TEST_DIR_NO_PDI}" -RELATIVE_MODULE_PATH="../../../no-pdi/cmake" +RELATIVE_MODULE_PATH="../../no-pdi/cmake" ls "${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" +ls "${TEST_DIR_NO_PDI}" +ls "${TEST_DIR_NO_PDI}/.." +ls "${TEST_DIR_NO_PDI}/../.." NO_PDI_TESTS="test_07_main_C test_07_main_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} From 094a3b698d512d08b1f3a89a3352e18253e6f82c Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 17:16:20 +0200 Subject: [PATCH 094/372] Fix no-pdi test compatibility with pdi 20 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index fbca50e84..d48509fb1 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -143,7 +143,7 @@ echo "############" cd "${TEST_DIR_NO_PDI}" RELATIVE_MODULE_PATH="../../no-pdi/cmake" -ls "${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" +# ls "${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" ls "${TEST_DIR_NO_PDI}" ls "${TEST_DIR_NO_PDI}/.." ls "${TEST_DIR_NO_PDI}/../.." From 427ade6321f3f3cc2770c10f7ae0f5d3e247ace2 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 17:32:40 +0200 Subject: [PATCH 095/372] Fix no-pdi test compatibility with pdi 21 --- bin/build_and_run_all_tests | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index d48509fb1..f20cebce9 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -133,9 +133,9 @@ fi # Configure, build & test -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# make verbose=1 ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make verbose=1 ${MAKEFLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} echo "############" @@ -147,6 +147,7 @@ RELATIVE_MODULE_PATH="../../no-pdi/cmake" ls "${TEST_DIR_NO_PDI}" ls "${TEST_DIR_NO_PDI}/.." ls "${TEST_DIR_NO_PDI}/../.." +ls "${TEST_DIR_NO_PDI}/../with_pdi" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} From 7260557ca6ec6607cc83352c172da0275d57d137 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Sun, 29 Jun 2025 17:40:36 +0200 Subject: [PATCH 096/372] Fix no-pdi test compatibility with pdi 22 --- bin/build_and_run_all_tests | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index f20cebce9..cea1cd9f3 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -147,6 +147,9 @@ RELATIVE_MODULE_PATH="../../no-pdi/cmake" ls "${TEST_DIR_NO_PDI}" ls "${TEST_DIR_NO_PDI}/.." ls "${TEST_DIR_NO_PDI}/../.." +cd "${TEST_DIR_NO_PDI}/../.." +find . -name "cmake" +cd - ls "${TEST_DIR_NO_PDI}/../with_pdi" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" From e106beb83bfe548d7a81d0fc1429b880f6d25a57 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 30 Jun 2025 09:44:54 +0200 Subject: [PATCH 097/372] Fix no-pdi test compatibility with pdi 23 --- bin/build_and_run_all_tests | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index cea1cd9f3..60a7c54fb 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -147,6 +147,7 @@ RELATIVE_MODULE_PATH="../../no-pdi/cmake" ls "${TEST_DIR_NO_PDI}" ls "${TEST_DIR_NO_PDI}/.." ls "${TEST_DIR_NO_PDI}/../.." +ls "${SRCDIR}" cd "${TEST_DIR_NO_PDI}/../.." find . -name "cmake" cd - From 7e2def853c634e386628fd1ee72951fb15b94bb4 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 30 Jun 2025 09:48:21 +0200 Subject: [PATCH 098/372] Fix no-pdi test compatibility with pdi 24 --- bin/build_and_run_all_tests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 60a7c54fb..5ab607079 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -142,7 +142,7 @@ echo "############" # Configure, build & test for no-pdi cd "${TEST_DIR_NO_PDI}" -RELATIVE_MODULE_PATH="../../no-pdi/cmake" +RELATIVE_MODULE_PATH="no-pdi/cmake" # ls "${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" ls "${TEST_DIR_NO_PDI}" ls "${TEST_DIR_NO_PDI}/.." @@ -153,6 +153,6 @@ find . -name "cmake" cd - ls "${TEST_DIR_NO_PDI}/../with_pdi" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From f7c3db2e290ebd810738861af45804053eea7934 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 30 Jun 2025 09:59:45 +0200 Subject: [PATCH 099/372] Fix no-pdi test compatibility with pdi 25 --- bin/build_and_run_all_tests | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 5ab607079..f6ba39df3 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -57,22 +57,6 @@ SRCDIR="${PWD}" cd "${TEST_DIR}" -###################################### -# # Make our work dirs -# SRCDIR="${PWD}" - -# TEST_DIR="${TEST_DIR:-${PWD}}" -# cd "${TEST_DIR}" -# cd "$(mktemp -d pdibuild.XXXXX)" -# TEST_DIR="${PWD}" - -# cd "${SRCDIR}" -# cd "$(dirname "$0")/.." -# SRCDIR="${PWD}" - -# cd "${TEST_DIR}" -###################################### - # Gather options @@ -131,10 +115,10 @@ fi -# Configure, build & test +# Configure, build & test for pdi -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make verbose=1 ${MAKEFLAGS} +cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} echo "############" @@ -143,16 +127,7 @@ echo "############" cd "${TEST_DIR_NO_PDI}" RELATIVE_MODULE_PATH="no-pdi/cmake" -# ls "${TEST_DIR_NO_PDI}/${RELATIVE_MODULE_PATH}" -ls "${TEST_DIR_NO_PDI}" -ls "${TEST_DIR_NO_PDI}/.." -ls "${TEST_DIR_NO_PDI}/../.." -ls "${SRCDIR}" -cd "${TEST_DIR_NO_PDI}/../.." -find . -name "cmake" -cd - -ls "${TEST_DIR_NO_PDI}/../with_pdi" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From 5b77cfad574bd32bac249aca3245ef4aea4bd074 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 30 Jun 2025 15:35:21 +0200 Subject: [PATCH 100/372] Fix no-pdi test compatibility with pdi 26 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index f6ba39df3..9632ee47c 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -128,6 +128,6 @@ echo "############" cd "${TEST_DIR_NO_PDI}" RELATIVE_MODULE_PATH="no-pdi/cmake" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From 073e9339c3595331fd8a1836ab311113d11683c5 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 10:16:53 +0200 Subject: [PATCH 101/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init --- bin/build_and_run_all_tests | 35 ++++++++++++++++++++++++++++++----- no-pdi/include/pdi.h | 1 - pdi/docs/Using_PDI.md | 10 +++++++--- tests/CMakeLists.txt | 23 ++++++++++++++++------- tests/test_07_no-pdi.h | 2 ++ 5 files changed, 55 insertions(+), 16 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 9632ee47c..9728890f7 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -50,6 +50,11 @@ mkdir with_pdi cd with_pdi TEST_DIR="${PWD}" +cd "${TEST_DIR_ROOT}" +mkdir api_pdi +cd api_pdi +TEST_DIR_API="${PWD}" + cd "${SRCDIR}" cd "$(dirname "$0")/.." SRCDIR="${PWD}" @@ -115,7 +120,7 @@ fi -# Configure, build & test for pdi +# Configure, build & test for pdi, with Paraconf cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} @@ -123,11 +128,31 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $ echo "############" -# Configure, build & test for no-pdi +# Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf + +if pkg-config --exists paraconf; then + # cd "${TEST_DIR_API}" + cd "${SRCDIR}/example" + RELATIVE_MODULE_PATH="no-pdi/cmake" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${PWD}" + make ${MAKEFLAGS} + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" + + cd "${TEST_DIR_NO_PDI}" + NO_PDI_TESTS="test_07_main_C test_07_main_CXX" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" + make ${MAKEFLAGS} + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +else + echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." +fi + +echo "############" + +# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf -cd "${TEST_DIR_NO_PDI}" -RELATIVE_MODULE_PATH="no-pdi/cmake" +cd "${TEST_DIR_API}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 9976ac55d..e87fd0861 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -55,7 +55,6 @@ #ifndef PDI_H_ #define PDI_H_ -#include #include #ifdef __cplusplus diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index f6623afed..962dfb9c2 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -100,7 +100,7 @@ plugins in 4 steps (it will use the first plugin found): ### Using the no-pdi included in the currently used pdi repository -You can copy the `no-pdi` folder from PDI in your application repository, and +You can copy the `no-pdi` folder from PDI in your application repository, and add an option (`BUILD_WITHOUT_PDI` in the example below) to your `CMakeLists.txt` to use this mock folder instead of the real PDI. @@ -109,7 +109,7 @@ following one: ```CMake option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) if(BUILD_WITHOUT_PDI) - include("${CMAKE_CURRENT_LIST_DIR}/no-pdi/cmake/PDIConfig.cmake) + include("${CMAKE_CURRENT_LIST_DIR}/no-pdi/cmake/PDIConfig.cmake") else() find_package(PDI REQUIRED) endif() @@ -118,6 +118,8 @@ Then you can build your project with this option specified to disable PDI: ```bash cmake . -DBUILD_WITHOUT_PDI=ON ``` +This is the preferred method of using no-pdi, as the following may result in +a conflict when using a dependency toward Paraconf outside of PDI. ### Using a specific no-pdi through a full path @@ -127,7 +129,9 @@ to compile with an added argument pointing to this no-pdi folder using a full pa Use a CMakeLists.txt similar to example/CMakeLists.txt, then use the following: ```bash -cmake . -DCMAKE_MODULE_PATH=/no-pdi/cmake +cmake . -DCMAKE_MODULE_PATH="////pdi/no-pdi/cmake" ``` +This is not the preferred method of using no-pdi, as it may result in +a conflict when using a dependency toward Paraconf outside of PDI. %PDI can be re-enabled by reverting those modifications. diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6d964c8bc..df5831aaa 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -34,7 +34,16 @@ option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) -find_package(PDI REQUIRED COMPONENTS C) +# find_package(PDI REQUIRED COMPONENTS C) + +option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) +if(BUILD_WITHOUT_PDI) + # include("${CMAKE_CURRENT_LIST_DIR}/no-pdi/cmake/PDIConfig.cmake") + message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") + include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake") +else() + find_package(PDI REQUIRED COMPONENTS C) +endif() if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") @@ -63,12 +72,12 @@ add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOUR endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") -find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -# if(EXAMPLES_NO_PDI) -# message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") -# include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) -# endif() -# include_directories(${CMAKE_CURRENT_LIST_DIR}) +# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +# # if(EXAMPLES_NO_PDI) +# # message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") +# # include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) +# # endif() +# # include_directories(${CMAKE_CURRENT_LIST_DIR}) add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 9a3b2178f..53c014335 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -104,6 +104,7 @@ void errhandler() int tests(int argc, char* argv[]) { + #ifdef PARACONF_H__ static const char* CONFIG_YAML = "logging: trace \n" "data: \n" @@ -119,6 +120,7 @@ int tests(int argc, char* argv[]) fprintf(stderr, "*** Error: no-pdi initialisation\n"); exit(1); } + #endif const char* errmsg = PDI_errmsg(); if (strcmp(errmsg, "") != 0) { From 8797d3df029f84e1af3f84273a868366d80420f9 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 10:43:41 +0200 Subject: [PATCH 102/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 2 --- bin/build_and_run_all_tests | 5 +++-- tests/test_07_no-pdi.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 9728890f7..eff80e617 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -122,7 +122,7 @@ fi # Configure, build & test for pdi, with Paraconf -cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} @@ -152,7 +152,8 @@ echo "############" # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf cd "${TEST_DIR_API}" +echo "TEST_DIR_API: ${TEST_DIR_API}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON --trace-expand -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 53c014335..2e23acd1e 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -104,7 +104,7 @@ void errhandler() int tests(int argc, char* argv[]) { - #ifdef PARACONF_H__ +#ifdef PARACONF_H__ static const char* CONFIG_YAML = "logging: trace \n" "data: \n" @@ -120,7 +120,7 @@ int tests(int argc, char* argv[]) fprintf(stderr, "*** Error: no-pdi initialisation\n"); exit(1); } - #endif +#endif const char* errmsg = PDI_errmsg(); if (strcmp(errmsg, "") != 0) { From 29fcc32fa829b6ac9d9738e2eb5b5c558ff2c639 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 13:23:50 +0200 Subject: [PATCH 103/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 3 --- bin/build_and_run_all_tests | 2 +- tests/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index eff80e617..26c3d1e39 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -154,6 +154,6 @@ echo "############" cd "${TEST_DIR_API}" echo "TEST_DIR_API: ${TEST_DIR_API}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON --trace-expand -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index df5831aaa..57ba2cb5b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -37,11 +37,13 @@ include(CTest) # find_package(PDI REQUIRED COMPONENTS C) option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) +message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") if(BUILD_WITHOUT_PDI) # include("${CMAKE_CURRENT_LIST_DIR}/no-pdi/cmake/PDIConfig.cmake") message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake") else() + message(WARNING "Using find_package by default") find_package(PDI REQUIRED COMPONENTS C) endif() From 48e897911de3859dea115123accd983b42096322 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 13:48:19 +0200 Subject: [PATCH 104/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 4 --- bin/build_and_run_all_tests | 3 +++ tests/CMakeLists.txt | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 26c3d1e39..d015c5b46 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -151,6 +151,9 @@ echo "############" # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf +echo "ls SRCDIR:" +ls "${SRCDIR}" + cd "${TEST_DIR_API}" echo "TEST_DIR_API: ${TEST_DIR_API}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 57ba2cb5b..6234c67a8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -36,12 +36,15 @@ include(CTest) # find_package(PDI REQUIRED COMPONENTS C) +message(WARNING "BUILD_WITHOUT_PDI before: ${BUILD_WITHOUT_PDI}") option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") +message(WARNING "l'include: ${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") if(BUILD_WITHOUT_PDI) # include("${CMAKE_CURRENT_LIST_DIR}/no-pdi/cmake/PDIConfig.cmake") message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") - include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake") + # include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") else() message(WARNING "Using find_package by default") find_package(PDI REQUIRED COMPONENTS C) From f6ef93acf0e6d4db909b4d019f2d9c68386eb80e Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 14:10:31 +0200 Subject: [PATCH 105/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 5 --- bin/build_and_run_all_tests | 52 ++++++++++++++++++------------------- tests/CMakeLists.txt | 8 ++++-- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index d015c5b46..25d3e613d 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -120,32 +120,32 @@ fi -# Configure, build & test for pdi, with Paraconf - -cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} - -echo "############" - -# Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf - -if pkg-config --exists paraconf; then - # cd "${TEST_DIR_API}" - cd "${SRCDIR}/example" - RELATIVE_MODULE_PATH="no-pdi/cmake" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${PWD}" - make ${MAKEFLAGS} - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" - - cd "${TEST_DIR_NO_PDI}" - NO_PDI_TESTS="test_07_main_C test_07_main_CXX" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" - make ${MAKEFLAGS} - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -else - echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." -fi +# # Configure, build & test for pdi, with Paraconf + +# cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} + +# echo "############" + +# # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf + +# if pkg-config --exists paraconf; then +# # cd "${TEST_DIR_API}" +# cd "${SRCDIR}/example" +# RELATIVE_MODULE_PATH="no-pdi/cmake" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${PWD}" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" + +# cd "${TEST_DIR_NO_PDI}" +# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +# else +# echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." +# fi echo "############" diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6234c67a8..bdfb71247 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -37,14 +37,18 @@ include(CTest) # find_package(PDI REQUIRED COMPONENTS C) message(WARNING "BUILD_WITHOUT_PDI before: ${BUILD_WITHOUT_PDI}") +message(WARNING "DIST_PROFILE: ${DIST_PROFILE}") +message(WARNING "BUILD_FORTRAN: ${BUILD_FORTRAN}") option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") -message(WARNING "l'include: ${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") +# message(WARNING "l'include: ${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") +message(WARNING "l'include: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") if(BUILD_WITHOUT_PDI) # include("${CMAKE_CURRENT_LIST_DIR}/no-pdi/cmake/PDIConfig.cmake") message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") # include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake") - include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") + # include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") + include("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") else() message(WARNING "Using find_package by default") find_package(PDI REQUIRED COMPONENTS C) From 901cdc6846dacc5cec54e0021547d187b679bce0 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 14:13:41 +0200 Subject: [PATCH 106/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 6 --- tests/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index bdfb71247..11d5fb6b0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -39,6 +39,7 @@ include(CTest) message(WARNING "BUILD_WITHOUT_PDI before: ${BUILD_WITHOUT_PDI}") message(WARNING "DIST_PROFILE: ${DIST_PROFILE}") message(WARNING "BUILD_FORTRAN: ${BUILD_FORTRAN}") +message(WARNING "ici: ${CMAKE_CURRENT_LIST_DIR}") option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") # message(WARNING "l'include: ${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") From e6f7d57cc45145c4fe957912607e64fee1466735 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 14:20:34 +0200 Subject: [PATCH 107/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 7 --- tests/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 11d5fb6b0..4f628a0e4 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -37,13 +37,13 @@ include(CTest) # find_package(PDI REQUIRED COMPONENTS C) message(WARNING "BUILD_WITHOUT_PDI before: ${BUILD_WITHOUT_PDI}") -message(WARNING "DIST_PROFILE: ${DIST_PROFILE}") -message(WARNING "BUILD_FORTRAN: ${BUILD_FORTRAN}") -message(WARNING "ici: ${CMAKE_CURRENT_LIST_DIR}") +# message(WARNING "DIST_PROFILE: ${DIST_PROFILE}") +# message(WARNING "BUILD_FORTRAN: ${BUILD_FORTRAN}") +# message(WARNING "ici: ${CMAKE_CURRENT_LIST_DIR}") option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) -message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") +# message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") # message(WARNING "l'include: ${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") -message(WARNING "l'include: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") +# message(WARNING "l'include: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") if(BUILD_WITHOUT_PDI) # include("${CMAKE_CURRENT_LIST_DIR}/no-pdi/cmake/PDIConfig.cmake") message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") From b9d3598d06bbeb7aa0d3750239f8901d00aa5ec8 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 14:24:49 +0200 Subject: [PATCH 108/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 8 --- bin/build_and_run_all_tests | 2 +- tests/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 25d3e613d..bcb840259 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -157,6 +157,6 @@ ls "${SRCDIR}" cd "${TEST_DIR_API}" echo "TEST_DIR_API: ${TEST_DIR_API}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4f628a0e4..937778f15 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -38,7 +38,7 @@ include(CTest) message(WARNING "BUILD_WITHOUT_PDI before: ${BUILD_WITHOUT_PDI}") # message(WARNING "DIST_PROFILE: ${DIST_PROFILE}") -# message(WARNING "BUILD_FORTRAN: ${BUILD_FORTRAN}") +message(WARNING "BUILD_UNSTABLE: ${BUILD_UNSTABLE}") # message(WARNING "ici: ${CMAKE_CURRENT_LIST_DIR}") option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) # message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") From 730a90c418e842954aea27cba7098fbc04bb1919 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 14:29:09 +0200 Subject: [PATCH 109/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 9 --- tests/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 937778f15..86dfacde1 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -37,11 +37,11 @@ include(CTest) # find_package(PDI REQUIRED COMPONENTS C) message(WARNING "BUILD_WITHOUT_PDI before: ${BUILD_WITHOUT_PDI}") -# message(WARNING "DIST_PROFILE: ${DIST_PROFILE}") +message(WARNING "DIST_PROFILE: ${DIST_PROFILE}") message(WARNING "BUILD_UNSTABLE: ${BUILD_UNSTABLE}") -# message(WARNING "ici: ${CMAKE_CURRENT_LIST_DIR}") +message(WARNING "ici: ${CMAKE_CURRENT_LIST_DIR}") option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) -# message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") +message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") # message(WARNING "l'include: ${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") # message(WARNING "l'include: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") if(BUILD_WITHOUT_PDI) From c8f5930ef98a447c1db71eff27e15e3f8cac0d27 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 14:39:49 +0200 Subject: [PATCH 110/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 10 --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 86dfacde1..a9499c6b9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -49,7 +49,7 @@ if(BUILD_WITHOUT_PDI) message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") # include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake") # include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") - include("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") + include("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include/pdi.h") else() message(WARNING "Using find_package by default") find_package(PDI REQUIRED COMPONENTS C) From 4d175124ff324f20ca47b2fb54a420dc2374379e Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 14:47:07 +0200 Subject: [PATCH 111/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 11 --- tests/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a9499c6b9..aae6e1700 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -49,7 +49,8 @@ if(BUILD_WITHOUT_PDI) message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") # include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake") # include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") - include("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include/pdi.h") + # include("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include/pdi.h") + include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") else() message(WARNING "Using find_package by default") find_package(PDI REQUIRED COMPONENTS C) From e5b95fa445861529d5403746d9aaf167d7745405 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 14:51:20 +0200 Subject: [PATCH 112/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 12 --- tests/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index aae6e1700..ba1449535 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -94,7 +94,8 @@ add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_07_main_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) -target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) +# target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) +target_link_libraries(test_07_main_C PDI::PDI_C) add_test(NAME test_07_main_C COMMAND "$") add_executable(test_07_main_CXX test_07_main.cpp) @@ -104,5 +105,6 @@ target_compile_options(test_07_main_CXX PRIVATE set_target_properties(test_07_main_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_07_main_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_07_main_CXX PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) +# target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) +target_link_libraries(test_07_main_CXX PDI::PDI_C) add_test(NAME test_07_main_CXX COMMAND "$") From 6dcad591d9286146849961e2359bf4df49849b34 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 14:58:44 +0200 Subject: [PATCH 113/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 13 --- tests/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ba1449535..ff11ba206 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -51,6 +51,9 @@ if(BUILD_WITHOUT_PDI) # include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") # include("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include/pdi.h") include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") + add_library(PDI_C INTERFACE) + target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") + add_library(PDI::PDI_C ALIAS PDI_C) else() message(WARNING "Using find_package by default") find_package(PDI REQUIRED COMPONENTS C) From a2c729fb0e597c418a6176a2fbd97d5c78ecac96 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 15:07:05 +0200 Subject: [PATCH 114/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 14 --- bin/build_and_run_all_tests | 68 +++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index bcb840259..877bcff8d 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -120,43 +120,45 @@ fi -# # Configure, build & test for pdi, with Paraconf +# Configure, build & test for pdi, with Paraconf -# cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make ${MAKEFLAGS} +# ls . ## pour trouver où faire un ldd, pour trouver paraconf +ls . +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -# echo "############" +echo "############" -# # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf - -# if pkg-config --exists paraconf; then -# # cd "${TEST_DIR_API}" -# cd "${SRCDIR}/example" -# RELATIVE_MODULE_PATH="no-pdi/cmake" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${PWD}" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" - -# cd "${TEST_DIR_NO_PDI}" -# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -# else -# echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." -# fi +# Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf + +if pkg-config --exists paraconf; then + # cd "${TEST_DIR_API}" + cd "${SRCDIR}/example" + RELATIVE_MODULE_PATH="no-pdi/cmake" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${PWD}" + make ${MAKEFLAGS} + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" + + cd "${TEST_DIR_NO_PDI}" + NO_PDI_TESTS="test_07_main_C test_07_main_CXX" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" + make ${MAKEFLAGS} + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +else + echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." +fi -echo "############" +# echo "############" -# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf +# # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf -echo "ls SRCDIR:" -ls "${SRCDIR}" +# echo "ls SRCDIR:" +# ls "${SRCDIR}" -cd "${TEST_DIR_API}" -echo "TEST_DIR_API: ${TEST_DIR_API}" -NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +# cd "${TEST_DIR_API}" +# echo "TEST_DIR_API: ${TEST_DIR_API}" +# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From 3918fba2aff97d4a31fa0cc4b08adf5522872402 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 15:18:05 +0200 Subject: [PATCH 115/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 15 --- bin/build_and_run_all_tests | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 877bcff8d..e05574896 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -126,6 +126,10 @@ cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} # ls . ## pour trouver où faire un ldd, pour trouver paraconf ls . +echo "ldd" +ldd PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C +echo "ldd grep" +ldd your_binary | grep '^libparaconf.so.1 =>' | egrep -v 'not found' ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} echo "############" From ae0f60d05ee20b6559c845c77dc0248f71869dd9 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 15:42:08 +0200 Subject: [PATCH 116/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 16 --- bin/build_and_run_all_tests | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index e05574896..a4c825219 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -127,16 +127,18 @@ make ${MAKEFLAGS} # ls . ## pour trouver où faire un ldd, pour trouver paraconf ls . echo "ldd" -ldd PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C +ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" echo "ldd grep" -ldd your_binary | grep '^libparaconf.so.1 =>' | egrep -v 'not found' +ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep '^libparaconf.so.1 =>' | egrep -v 'not found' +ls "x${PDI_LIBS}" ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} echo "############" # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf -if pkg-config --exists paraconf; then +# if pkg-config --exists paraconf; then +if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep -q '^libparaconf.so.1 =>' | egrep -qv 'not found'; then # cd "${TEST_DIR_API}" cd "${SRCDIR}/example" RELATIVE_MODULE_PATH="no-pdi/cmake" From be1fc962551e5178044ac5fc69373255196fcfba Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 15:55:01 +0200 Subject: [PATCH 117/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 17 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index a4c825219..1b13aed41 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -138,7 +138,7 @@ echo "############" # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf # if pkg-config --exists paraconf; then -if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep -q '^libparaconf.so.1 =>' | egrep -qv 'not found'; then +if (ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep -q '^libparaconf.so.1 =>' | egrep -qv 'not found'); then # cd "${TEST_DIR_API}" cd "${SRCDIR}/example" RELATIVE_MODULE_PATH="no-pdi/cmake" From fe41946884fe539454758c1dbac82692cd24f16e Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 16:29:21 +0200 Subject: [PATCH 118/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 18 --- bin/build_and_run_all_tests | 4 ++-- no-pdi/include/pdi.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 1b13aed41..2148619a7 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -129,8 +129,8 @@ ls . echo "ldd" ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" echo "ldd grep" -ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep '^libparaconf.so.1 =>' | egrep -v 'not found' -ls "x${PDI_LIBS}" +ldd ("PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep '^libparaconf.so.1 =>' | egrep -v 'not found') +# ls "x${PDI_LIBS}" ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} echo "############" diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index e87fd0861..39bfd2773 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -148,6 +148,7 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) /** Initializes PDI */ +typedef struct PC_tree_s {} PC_tree_t; //ajouter ifdef pour ne pas empêcher "no-pdi+paraconf" static inline PDI_status_t PDI_init(PC_tree_t conf) { return PDI_OK; From f9c24e104a866776066e4d237aeff21ffa5af82e Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 16:38:05 +0200 Subject: [PATCH 119/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 19 --- bin/build_and_run_all_tests | 4 ++-- no-pdi/include/pdi.h | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 2148619a7..0bc8f1c51 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -129,7 +129,7 @@ ls . echo "ldd" ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" echo "ldd grep" -ldd ("PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep '^libparaconf.so.1 =>' | egrep -v 'not found') +ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep -q '^libparaconf.so.1 =>' | egrep -qv 'not found' # ls "x${PDI_LIBS}" ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} @@ -138,7 +138,7 @@ echo "############" # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf # if pkg-config --exists paraconf; then -if (ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep -q '^libparaconf.so.1 =>' | egrep -qv 'not found'); then +if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep -q '^libparaconf.so.1 =>' | egrep -qv 'not found'; then # cd "${TEST_DIR_API}" cd "${SRCDIR}/example" RELATIVE_MODULE_PATH="no-pdi/cmake" diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 39bfd2773..a555e9e4d 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -148,7 +148,11 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) /** Initializes PDI */ -typedef struct PC_tree_s {} PC_tree_t; //ajouter ifdef pour ne pas empêcher "no-pdi+paraconf" +#ifndef PARACONF_H__ +typedef struct PC_tree_s { +} PC_tree_t; //ajouter ifdef pour ne pas empêcher "no-pdi+paraconf" +#endif + static inline PDI_status_t PDI_init(PC_tree_t conf) { return PDI_OK; From 4f2137235196a531f7c56e7851f212e0b45d06c2 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 18 Jul 2025 16:48:25 +0200 Subject: [PATCH 120/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 20 --- bin/build_and_run_all_tests | 4 ++-- no-pdi/include/pdi.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 0bc8f1c51..9d0b5f025 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -129,7 +129,7 @@ ls . echo "ldd" ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" echo "ldd grep" -ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep -q '^libparaconf.so.1 =>' | egrep -qv 'not found' +ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep '^libparaconf.so.1 =>' | grep -vq 'not found' # ls "x${PDI_LIBS}" ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} @@ -138,7 +138,7 @@ echo "############" # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf # if pkg-config --exists paraconf; then -if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep -q '^libparaconf.so.1 =>' | egrep -qv 'not found'; then +if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep '^libparaconf.so.1 =>' | grep -vq 'not found'; then # cd "${TEST_DIR_API}" cd "${SRCDIR}/example" RELATIVE_MODULE_PATH="no-pdi/cmake" diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index a555e9e4d..db4e0c890 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -148,7 +148,7 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) /** Initializes PDI */ -#ifndef PARACONF_H__ +#ifndef PARACONF_H__ typedef struct PC_tree_s { } PC_tree_t; //ajouter ifdef pour ne pas empêcher "no-pdi+paraconf" #endif From 206a706f444ebb95367959434134c0ea827a308c Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 10:06:47 +0200 Subject: [PATCH 121/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 21 --- bin/build_and_run_all_tests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 9d0b5f025..26829a74e 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -129,7 +129,7 @@ ls . echo "ldd" ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" echo "ldd grep" -ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep '^libparaconf.so.1 =>' | grep -vq 'not found' +ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -vq 'not found' # ls "x${PDI_LIBS}" ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} @@ -138,7 +138,7 @@ echo "############" # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf # if pkg-config --exists paraconf; then -if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep '^libparaconf.so.1 =>' | grep -vq 'not found'; then +if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -vq 'not found'; then # cd "${TEST_DIR_API}" cd "${SRCDIR}/example" RELATIVE_MODULE_PATH="no-pdi/cmake" From c7ada35877786741dbca60d572966c276e0a74f0 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 10:08:27 +0200 Subject: [PATCH 122/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 22 --- bin/build_and_run_all_tests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 26829a74e..681a5d570 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -129,7 +129,7 @@ ls . echo "ldd" ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" echo "ldd grep" -ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -vq 'not found' +ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found' # ls "x${PDI_LIBS}" ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} @@ -138,7 +138,7 @@ echo "############" # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf # if pkg-config --exists paraconf; then -if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -vq 'not found'; then +if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # cd "${TEST_DIR_API}" cd "${SRCDIR}/example" RELATIVE_MODULE_PATH="no-pdi/cmake" From 47c44052dbae723b5f0286544d6cdbeb74be9af0 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 10:27:56 +0200 Subject: [PATCH 123/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 23 --- bin/build_and_run_all_tests | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 681a5d570..c66836bf9 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -140,12 +140,16 @@ echo "############" # if pkg-config --exists paraconf; then if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # cd "${TEST_DIR_API}" + ls "${SRCDIR}/example" cd "${SRCDIR}/example" + mkdir build_example && cd build_example RELATIVE_MODULE_PATH="no-pdi/cmake" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${PWD}" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} .. make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" + echo "############" + cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" From 186c3742763a36198342a92be93f70ce0731e474 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 10:36:25 +0200 Subject: [PATCH 124/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 24 --- bin/build_and_run_all_tests | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index c66836bf9..cd7952338 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -139,12 +139,12 @@ echo "############" # if pkg-config --exists paraconf; then if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then - # cd "${TEST_DIR_API}" - ls "${SRCDIR}/example" - cd "${SRCDIR}/example" - mkdir build_example && cd build_example + cd "${TEST_DIR_API}" + # ls "${SRCDIR}/example" + # cd "${SRCDIR}/example" + # mkdir build_example && cd build_example RELATIVE_MODULE_PATH="no-pdi/cmake" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} .. + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" From b3acc9cd6ae65daf85c1686dfe1418a9fc35bb47 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 10:54:04 +0200 Subject: [PATCH 125/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 25 --- bin/build_and_run_all_tests | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index cd7952338..ca4f40149 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -144,6 +144,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => # cd "${SRCDIR}/example" # mkdir build_example && cd build_example RELATIVE_MODULE_PATH="no-pdi/cmake" + ls "${SRCDIR}/${RELATIVE_MODULE_PATH}" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" From efe2d4d5178527631c9371f23c87b8be4b345d7e Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 11:17:54 +0200 Subject: [PATCH 126/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 26 --- bin/build_and_run_all_tests | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index ca4f40149..22577e6f9 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -123,7 +123,9 @@ fi # Configure, build & test for pdi, with Paraconf cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# echo "verbose" make ${MAKEFLAGS} +# make VERBOSE=1 -j1 # ls . ## pour trouver où faire un ldd, pour trouver paraconf ls . echo "ldd" @@ -131,6 +133,7 @@ ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" echo "ldd grep" ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found' # ls "x${PDI_LIBS}" +echo "après ldd" ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} echo "############" @@ -160,7 +163,7 @@ else echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." fi -# echo "############" +echo "############" # # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf From 30aeb06d8da3e00a759460b579df9b0b59116c5a Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 11:28:41 +0200 Subject: [PATCH 127/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 27 --- bin/build_and_run_all_tests | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 22577e6f9..b2bee6394 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -136,7 +136,7 @@ ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | echo "après ldd" ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -echo "############" +echo "############1" # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf @@ -146,24 +146,27 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => # ls "${SRCDIR}/example" # cd "${SRCDIR}/example" # mkdir build_example && cd build_example - RELATIVE_MODULE_PATH="no-pdi/cmake" + # RELATIVE_MODULE_PATH="no-pdi/cmake" + RELATIVE_MODULE_PATH="no-pdi" ls "${SRCDIR}/${RELATIVE_MODULE_PATH}" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" - echo "############" + echo "############2" cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" + # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} else echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." fi -echo "############" +echo "############3" # # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf From 4cc2f9e4ec0294f02edd446c8ef0d158e13a5b38 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 12:05:34 +0200 Subject: [PATCH 128/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 28 --- bin/build_and_run_all_tests | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index b2bee6394..c66f1c1cb 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -150,7 +150,9 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => RELATIVE_MODULE_PATH="no-pdi" ls "${SRCDIR}/${RELATIVE_MODULE_PATH}" # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + PARACONF_PATH=$(ldd "test_05_C" | grep 'libparaconf.so.1 =>' | sed -n 's/.*=> \(\/[^ ]*\) (.*/\1/p') + PARACONF_DIR=$(dirname "$PARACONF_PATH") + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" @@ -159,7 +161,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} else From 4a3e674cecbf61ad254e7e591a551e96a503c496 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 13:10:25 +0200 Subject: [PATCH 129/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 29 --- no-pdi/include/pdi.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index db4e0c890..6d634b394 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -55,6 +55,12 @@ #ifndef PDI_H_ #define PDI_H_ +#if defined __has_include + #if __has_include() + #include + #endif +#endif + #include #ifdef __cplusplus From 3594f01f00ae00f6900f3a956a38329e19c7cffd Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 13:16:33 +0200 Subject: [PATCH 130/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 30 --- bin/build_and_run_all_tests | 6 +++--- no-pdi/include/pdi.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index c66f1c1cb..37a8ee91e 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -142,16 +142,16 @@ echo "############1" # if pkg-config --exists paraconf; then if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then + cd "${SRCDIR}/example" + PARACONF_PATH=$(ldd "test_05_C" | grep 'libparaconf.so.1 =>' | sed -n 's/.*=> \(\/[^ ]*\) (.*/\1/p') + PARACONF_DIR=$(dirname "$PARACONF_PATH") cd "${TEST_DIR_API}" # ls "${SRCDIR}/example" - # cd "${SRCDIR}/example" # mkdir build_example && cd build_example # RELATIVE_MODULE_PATH="no-pdi/cmake" RELATIVE_MODULE_PATH="no-pdi" ls "${SRCDIR}/${RELATIVE_MODULE_PATH}" # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" - PARACONF_PATH=$(ldd "test_05_C" | grep 'libparaconf.so.1 =>' | sed -n 's/.*=> \(\/[^ ]*\) (.*/\1/p') - PARACONF_DIR=$(dirname "$PARACONF_PATH") cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 6d634b394..2d1efb383 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -56,9 +56,9 @@ #define PDI_H_ #if defined __has_include - #if __has_include() - #include - #endif +#if __has_include() +#include +#endif #endif #include From 2a48741ade3e605e58716a5a7b1248498b43f9c6 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 13:23:36 +0200 Subject: [PATCH 131/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 31 --- bin/build_and_run_all_tests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 37a8ee91e..0772518bb 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -142,10 +142,10 @@ echo "############1" # if pkg-config --exists paraconf; then if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then - cd "${SRCDIR}/example" - PARACONF_PATH=$(ldd "test_05_C" | grep 'libparaconf.so.1 =>' | sed -n 's/.*=> \(\/[^ ]*\) (.*/\1/p') + PARACONF_PATH=$(ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | sed -n 's/.*=> \(\/[^ ]*\) (.*/\1/p') PARACONF_DIR=$(dirname "$PARACONF_PATH") cd "${TEST_DIR_API}" + # cd "${SRCDIR}/example" # ls "${SRCDIR}/example" # mkdir build_example && cd build_example # RELATIVE_MODULE_PATH="no-pdi/cmake" From 99f00aeab34afb58f36043bc86248520ee51dcb6 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 13:25:11 +0200 Subject: [PATCH 132/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 32 --- bin/build_and_run_all_tests | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 0772518bb..e218f058e 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -136,7 +136,7 @@ ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | echo "après ldd" ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -echo "############1" +echo "############ 1" # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf @@ -156,7 +156,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" - echo "############2" + echo "############ 2" cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" @@ -168,7 +168,7 @@ else echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." fi -echo "############3" +echo "############ 3" # # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf From e9bdb055e8daa23faa823da9463d57942c4e9f80 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 13:34:07 +0200 Subject: [PATCH 133/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 33 --- bin/build_and_run_all_tests | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index e218f058e..59ce08e26 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -142,8 +142,11 @@ echo "############ 1" # if pkg-config --exists paraconf; then if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then - PARACONF_PATH=$(ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | sed -n 's/.*=> \(\/[^ ]*\) (.*/\1/p') - PARACONF_DIR=$(dirname "$PARACONF_PATH") + # PARACONF_PATH=$(ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | sed -n 's/.*=> \(\/[^ ]*\) (.*/\1/p') + # PARACONF_DIR=$(dirname "$PARACONF_PATH") + RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" + echo "PARACONF_DIR: " + PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") cd "${TEST_DIR_API}" # cd "${SRCDIR}/example" # ls "${SRCDIR}/example" From 156cd5458cb1cb2b7f71ec658826b874fe299685 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 13:51:29 +0200 Subject: [PATCH 134/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 34 --- bin/build_and_run_all_tests | 1 + no-pdi/CMakeLists.txt | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 59ce08e26..d20acc97d 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -157,6 +157,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} + ls "PDI_TESTS/src/PDI_TESTS_pkg-build" ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" echo "############ 2" diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index c4227dbbf..6394275a3 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -30,4 +30,18 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES C CXX) -include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake") \ No newline at end of file +include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake") + +if("${paraconf_DIR}") + sbuild_add_dependency(paraconf "${USE_DEFAULT}" + EMBEDDED_PATH "${paraconf_DIR}" + COMPONENTS ${PARACONF_COMPONENTS} + SOURCE_SUBDIR "paraconf" + CMAKE_CACHE_ARGS + "-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=TRUE" + "-DUSE_yaml:STRING=SYSTEM" + "-DBUILD_TESTING:BOOL=OFF" + DEPENDS "yaml" + VERSION 1.0.0 +) +endif() \ No newline at end of file From e6069e34ad519b6a8b4ef35591ba251b60681c84 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 15:06:09 +0200 Subject: [PATCH 135/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 35 --- bin/build_and_run_all_tests | 84 ++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index d20acc97d..b28127a88 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -138,50 +138,50 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $ echo "############ 1" -# Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf - -# if pkg-config --exists paraconf; then -if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then - # PARACONF_PATH=$(ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | sed -n 's/.*=> \(\/[^ ]*\) (.*/\1/p') - # PARACONF_DIR=$(dirname "$PARACONF_PATH") - RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" - echo "PARACONF_DIR: " - PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") - cd "${TEST_DIR_API}" - # cd "${SRCDIR}/example" - # ls "${SRCDIR}/example" - # mkdir build_example && cd build_example - # RELATIVE_MODULE_PATH="no-pdi/cmake" - RELATIVE_MODULE_PATH="no-pdi" - ls "${SRCDIR}/${RELATIVE_MODULE_PATH}" - # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" - make ${MAKEFLAGS} - ls "PDI_TESTS/src/PDI_TESTS_pkg-build" - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" - - echo "############ 2" - - cd "${TEST_DIR_NO_PDI}" - NO_PDI_TESTS="test_07_main_C test_07_main_CXX" - # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" - make ${MAKEFLAGS} - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -else - echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." -fi +# # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf + +# # if pkg-config --exists paraconf; then +# if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then +# # PARACONF_PATH=$(ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | sed -n 's/.*=> \(\/[^ ]*\) (.*/\1/p') +# # PARACONF_DIR=$(dirname "$PARACONF_PATH") +# RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" +# echo "PARACONF_DIR: " +# PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") +# cd "${TEST_DIR_API}" +# # cd "${SRCDIR}/example" +# # ls "${SRCDIR}/example" +# # mkdir build_example && cd build_example +# # RELATIVE_MODULE_PATH="no-pdi/cmake" +# RELATIVE_MODULE_PATH="no-pdi" +# ls "${SRCDIR}/${RELATIVE_MODULE_PATH}" +# # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +# make ${MAKEFLAGS} +# ls "PDI_TESTS/src/PDI_TESTS_pkg-build" +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" + +# echo "############ 2" + +# cd "${TEST_DIR_NO_PDI}" +# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" +# # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +# else +# echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." +# fi echo "############ 3" -# # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf +# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf -# echo "ls SRCDIR:" -# ls "${SRCDIR}" +echo "ls SRCDIR:" +ls "${SRCDIR}" -# cd "${TEST_DIR_API}" -# echo "TEST_DIR_API: ${TEST_DIR_API}" -# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +cd "${TEST_DIR_API}" +echo "TEST_DIR_API: ${TEST_DIR_API}" +NO_PDI_TESTS="test_07_main_C test_07_main_CXX" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make ${MAKEFLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From bb67cd34871c56852db4d25e5682b46b1a4f21ad Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 15:11:16 +0200 Subject: [PATCH 136/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 36 --- bin/build_and_run_all_tests | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index b28127a88..0c9a7b110 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -127,13 +127,13 @@ cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} # make VERBOSE=1 -j1 # ls . ## pour trouver où faire un ldd, pour trouver paraconf -ls . -echo "ldd" -ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" -echo "ldd grep" -ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found' -# ls "x${PDI_LIBS}" -echo "après ldd" +# ls . +# echo "ldd" +# ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" +# echo "ldd grep" +# ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found' +# # ls "x${PDI_LIBS}" +# echo "après ldd" ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} echo "############ 1" @@ -172,7 +172,7 @@ echo "############ 1" # echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." # fi -echo "############ 3" +# echo "############ 3" # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf From f3f2416420f1b9fa69feb8862f4b5eaeeb244f1b Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 15:42:42 +0200 Subject: [PATCH 137/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 37 --- CMakeLists.txt | 2 +- bin/build_and_run_all_tests | 2 +- example/CMakeLists.txt | 2 ++ no-pdi/CMakeLists.txt | 2 ++ tests/CMakeLists.txt | 3 ++- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a4b2ace5f..a8af55d14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI_DIST LANGUAGES C CXX) - +message(WARNING "ici pdi: ${CMAKE_CURRENT_LIST_DIR}") ### Build options diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 0c9a7b110..f338d7526 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -182,6 +182,6 @@ ls "${SRCDIR}" cd "${TEST_DIR_API}" echo "TEST_DIR_API: ${TEST_DIR_API}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index f6e3cabf9..cbe9e18dd 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -31,6 +31,8 @@ cmake_minimum_required(VERSION 3.16...3.29) project(pdi_examples LANGUAGES C) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +message(WARNING "ici example: ${CMAKE_CURRENT_LIST_DIR}") + set(MPI_COMPONENTS C) set(PDI_COMPONENTS C) diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index 6394275a3..11bfd2812 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -30,6 +30,8 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES C CXX) +message(WARNING "ici no-pdi: ${CMAKE_CURRENT_LIST_DIR}") + include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake") if("${paraconf_DIR}") diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ff11ba206..cbbb510e9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -39,7 +39,7 @@ include(CTest) message(WARNING "BUILD_WITHOUT_PDI before: ${BUILD_WITHOUT_PDI}") message(WARNING "DIST_PROFILE: ${DIST_PROFILE}") message(WARNING "BUILD_UNSTABLE: ${BUILD_UNSTABLE}") -message(WARNING "ici: ${CMAKE_CURRENT_LIST_DIR}") +message(WARNING "ici test: ${CMAKE_CURRENT_LIST_DIR}") option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") # message(WARNING "l'include: ${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") @@ -47,6 +47,7 @@ message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") if(BUILD_WITHOUT_PDI) # include("${CMAKE_CURRENT_LIST_DIR}/no-pdi/cmake/PDIConfig.cmake") message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") + message(WARNING "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") # include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake") # include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") # include("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include/pdi.h") From 958b8f994c9e99b6a3f32552f83f7552868efb95 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 16:20:08 +0200 Subject: [PATCH 138/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 38 --- bin/build_and_run_all_tests | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index f338d7526..bed2d6544 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -182,6 +182,7 @@ ls "${SRCDIR}" cd "${TEST_DIR_API}" echo "TEST_DIR_API: ${TEST_DIR_API}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make ${MAKEFLAGS} +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# make ${MAKEFLAGS} +make -j1 ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From 56c0e4cdc4e8fb09af10208d35867ee5acee0832 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 16:37:03 +0200 Subject: [PATCH 139/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 39 --- bin/build_and_run_all_tests | 7 ++++--- no-pdi/CMakeLists.txt | 26 +++++++++++++------------- pdi/CMakeLists.txt | 1 + 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index bed2d6544..bd7ec3e6b 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -182,7 +182,8 @@ ls "${SRCDIR}" cd "${TEST_DIR_API}" echo "TEST_DIR_API: ${TEST_DIR_API}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# make ${MAKEFLAGS} -make -j1 +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +make ${MAKEFLAGS} +# make -j1 ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index 11bfd2812..a7a6e1381 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -34,16 +34,16 @@ message(WARNING "ici no-pdi: ${CMAKE_CURRENT_LIST_DIR}") include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake") -if("${paraconf_DIR}") - sbuild_add_dependency(paraconf "${USE_DEFAULT}" - EMBEDDED_PATH "${paraconf_DIR}" - COMPONENTS ${PARACONF_COMPONENTS} - SOURCE_SUBDIR "paraconf" - CMAKE_CACHE_ARGS - "-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=TRUE" - "-DUSE_yaml:STRING=SYSTEM" - "-DBUILD_TESTING:BOOL=OFF" - DEPENDS "yaml" - VERSION 1.0.0 -) -endif() \ No newline at end of file +# if("${paraconf_DIR}") +# sbuild_add_dependency(paraconf "${USE_DEFAULT}" +# EMBEDDED_PATH "${paraconf_DIR}" +# COMPONENTS ${PARACONF_COMPONENTS} +# SOURCE_SUBDIR "paraconf" +# CMAKE_CACHE_ARGS +# "-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=TRUE" +# "-DUSE_yaml:STRING=SYSTEM" +# "-DBUILD_TESTING:BOOL=OFF" +# DEPENDS "yaml" +# VERSION 1.0.0 +# ) +# endif() \ No newline at end of file diff --git a/pdi/CMakeLists.txt b/pdi/CMakeLists.txt index 4348faf8c..add52a34f 100644 --- a/pdi/CMakeLists.txt +++ b/pdi/CMakeLists.txt @@ -31,6 +31,7 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES CXX C) list(APPEND CMAKE_MODULE_PATH "${PDI_SOURCE_DIR}/cmake") +message(WARNING "ici pdi/pdi: ${CMAKE_CURRENT_LIST_DIR}") # Version From f41b5fa9e0031265566e96c30e9c82333ce14435 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 21 Jul 2025 16:43:40 +0200 Subject: [PATCH 140/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 40 --- tests/test_07_no-pdi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 2e23acd1e..2b44260db 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -104,7 +104,7 @@ void errhandler() int tests(int argc, char* argv[]) { -#ifdef PARACONF_H__ +// #ifdef PARACONF_H__ static const char* CONFIG_YAML = "logging: trace \n" "data: \n" @@ -120,7 +120,7 @@ int tests(int argc, char* argv[]) fprintf(stderr, "*** Error: no-pdi initialisation\n"); exit(1); } -#endif +// #endif const char* errmsg = PDI_errmsg(); if (strcmp(errmsg, "") != 0) { From 8b74e76eabaa1b3d749f0df0450bf5bc8cfb9aa6 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 08:36:21 +0200 Subject: [PATCH 141/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 41 --- tests/test_07_no-pdi.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 2b44260db..9bf1711ad 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -104,7 +104,7 @@ void errhandler() int tests(int argc, char* argv[]) { -// #ifdef PARACONF_H__ + // #ifdef PARACONF_H__ static const char* CONFIG_YAML = "logging: trace \n" "data: \n" @@ -116,11 +116,13 @@ int tests(int argc, char* argv[]) " to_multi_expose: {type: array, subtype: int, size: 2} \n" " to_multi_expose_two: {type: array, subtype: int, size: 2} \n"; - if (PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML))) { + // if (PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML))) { + PC_tree_t empty_PC_tree = {}; + if (PDI_OK != PDI_init(empty_PC_tree)) { fprintf(stderr, "*** Error: no-pdi initialisation\n"); exit(1); } -// #endif + // #endif const char* errmsg = PDI_errmsg(); if (strcmp(errmsg, "") != 0) { From c9b777c47bfb82c0711e334f6855576c0fd6ec4d Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 09:03:17 +0200 Subject: [PATCH 142/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 42 --- tests/test_07_no-pdi.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 9bf1711ad..bc1215616 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -23,6 +23,13 @@ ******************************************************************************/ #include +#ifdef __cplusplus +# include +# include +#else +# include +# include +#endif void share() //share { From 1aba98b9ea70b0e33fd2ebfd4a287d7dd7bc6364 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 09:11:00 +0200 Subject: [PATCH 143/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 43 --- tests/test_07_no-pdi.h | 52 ++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index bc1215616..fb9d7858e 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -24,11 +24,13 @@ #include #ifdef __cplusplus -# include -# include +#include +#include +#include #else -# include -# include +#include +#include +#include #endif void share() //share @@ -36,7 +38,7 @@ void share() //share int to_share[2] = {1, 1}; if (PDI_OK != PDI_share("to_share", to_share, PDI_OUT)) { fprintf(stderr, "*** Error: no-pdi share\n"); - exit(1); + exit(EXIT_FAILURE); } } @@ -46,7 +48,7 @@ void access() //share/access PDI_share("to_access", to_access, PDI_OUT); if (PDI_OK != PDI_access("to_access", (void**)&to_access, PDI_IN)) { fprintf(stderr, "*** Error: no-pdi access\n"); - exit(1); + exit(EXIT_FAILURE); } } @@ -57,7 +59,7 @@ void release() //share/release PDI_access("to_release", (void**)&to_release, PDI_IN); if (PDI_OK != PDI_release("to_release")) { fprintf(stderr, "*** Error: no-pdi release\n"); - exit(1); + exit(EXIT_FAILURE); } } @@ -67,7 +69,7 @@ void reclaim() //share/reclaim PDI_share("to_reclaim", to_reclaim, PDI_OUT); if (PDI_OK != PDI_reclaim("to_reclaim")) { fprintf(stderr, "*** Error: no-pdi reclaim\n"); - exit(1); + exit(EXIT_FAILURE); } } @@ -75,7 +77,7 @@ void event() { if (PDI_OK != PDI_event("event_one")) { fprintf(stderr, "*** Error: no-pdi event\n"); - exit(1); + exit(EXIT_FAILURE); } } @@ -84,7 +86,7 @@ void expose() int to_expose[2] = {1, 1}; if (PDI_OK != PDI_expose("to_expose", to_expose, PDI_OUT)) { fprintf(stderr, "*** Error: no-pdi expose\n"); - exit(1); + exit(EXIT_FAILURE); } } @@ -96,7 +98,7 @@ void multi_expose() != PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL)) { fprintf(stderr, "*** Error: no-pdi multi_expose\n"); - exit(1); + exit(EXIT_FAILURE); } } @@ -105,36 +107,36 @@ void errhandler() PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); if (NULL != current_handler.context) { fprintf(stderr, "*** Error: no-pdi errhandler\n"); - exit(1); + exit(EXIT_FAILURE); } } int tests(int argc, char* argv[]) { // #ifdef PARACONF_H__ - static const char* CONFIG_YAML - = "logging: trace \n" - "data: \n" - " to_share: {type: array, subtype: int, size: 2} \n" - " to_access: {type: array, subtype: int, size: 2} \n" - " to_release: {type: array, subtype: int, size: 2} \n" - " to_reclaim: {type: array, subtype: int, size: 2} \n" - " to_expose: {type: array, subtype: int, size: 2} \n" - " to_multi_expose: {type: array, subtype: int, size: 2} \n" - " to_multi_expose_two: {type: array, subtype: int, size: 2} \n"; + // static const char* CONFIG_YAML + // = "logging: trace \n" + // "data: \n" + // " to_share: {type: array, subtype: int, size: 2} \n" + // " to_access: {type: array, subtype: int, size: 2} \n" + // " to_release: {type: array, subtype: int, size: 2} \n" + // " to_reclaim: {type: array, subtype: int, size: 2} \n" + // " to_expose: {type: array, subtype: int, size: 2} \n" + // " to_multi_expose: {type: array, subtype: int, size: 2} \n" + // " to_multi_expose_two: {type: array, subtype: int, size: 2} \n"; // if (PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML))) { PC_tree_t empty_PC_tree = {}; if (PDI_OK != PDI_init(empty_PC_tree)) { fprintf(stderr, "*** Error: no-pdi initialisation\n"); - exit(1); + exit(EXIT_FAILURE); } // #endif const char* errmsg = PDI_errmsg(); if (strcmp(errmsg, "") != 0) { fprintf(stderr, "*** Error: no-pdi errmsg\n"); - exit(1); + exit(EXIT_FAILURE); } errhandler(); @@ -149,7 +151,7 @@ int tests(int argc, char* argv[]) if (PDI_OK != PDI_finalize()) { fprintf(stderr, "*** Error: no-pdi finalisation\n"); - exit(1); + exit(EXIT_FAILURE); } return EXIT_SUCCESS; From 3c59a69df6961149f82d606de70e2d69fd3547b8 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 09:17:45 +0200 Subject: [PATCH 144/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 44 --- bin/build_and_run_all_tests | 3 ++- tests/test_07_no-pdi.h | 36 ++++++++++++++++++++---------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index bd7ec3e6b..cfd6696b9 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -165,7 +165,8 @@ echo "############ 1" # cd "${TEST_DIR_NO_PDI}" # NO_PDI_TESTS="test_07_main_C test_07_main_CXX" # # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" # make ${MAKEFLAGS} # ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} # else diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index fb9d7858e..860829884 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -113,25 +113,29 @@ void errhandler() int tests(int argc, char* argv[]) { - // #ifdef PARACONF_H__ - // static const char* CONFIG_YAML - // = "logging: trace \n" - // "data: \n" - // " to_share: {type: array, subtype: int, size: 2} \n" - // " to_access: {type: array, subtype: int, size: 2} \n" - // " to_release: {type: array, subtype: int, size: 2} \n" - // " to_reclaim: {type: array, subtype: int, size: 2} \n" - // " to_expose: {type: array, subtype: int, size: 2} \n" - // " to_multi_expose: {type: array, subtype: int, size: 2} \n" - // " to_multi_expose_two: {type: array, subtype: int, size: 2} \n"; - - // if (PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML))) { - PC_tree_t empty_PC_tree = {}; - if (PDI_OK != PDI_init(empty_PC_tree)) { + #ifdef PARACONF_H__ + static const char* CONFIG_YAML + = "logging: trace \n" + "data: \n" + " to_share: {type: array, subtype: int, size: 2} \n" + " to_access: {type: array, subtype: int, size: 2} \n" + " to_release: {type: array, subtype: int, size: 2} \n" + " to_reclaim: {type: array, subtype: int, size: 2} \n" + " to_expose: {type: array, subtype: int, size: 2} \n" + " to_multi_expose: {type: array, subtype: int, size: 2} \n" + " to_multi_expose_two: {type: array, subtype: int, size: 2} \n"; + + if (PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML))) { fprintf(stderr, "*** Error: no-pdi initialisation\n"); exit(EXIT_FAILURE); } - // #endif + #else + PC_tree_t mock_PC_tree = {}; + if (PDI_OK != PDI_init(mock_PC_tree)) { + fprintf(stderr, "*** Error: no-pdi initialisation\n"); + exit(EXIT_FAILURE); + } + #endif const char* errmsg = PDI_errmsg(); if (strcmp(errmsg, "") != 0) { From 1d728ab164d63b160c86714ffd0c4df667f0d920 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 09:48:10 +0200 Subject: [PATCH 145/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 45 --- tests/test_07_no-pdi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 860829884..3072178f8 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -113,7 +113,7 @@ void errhandler() int tests(int argc, char* argv[]) { - #ifdef PARACONF_H__ +#ifdef PC_parse_string static const char* CONFIG_YAML = "logging: trace \n" "data: \n" @@ -129,13 +129,13 @@ int tests(int argc, char* argv[]) fprintf(stderr, "*** Error: no-pdi initialisation\n"); exit(EXIT_FAILURE); } - #else +#else PC_tree_t mock_PC_tree = {}; if (PDI_OK != PDI_init(mock_PC_tree)) { fprintf(stderr, "*** Error: no-pdi initialisation\n"); exit(EXIT_FAILURE); } - #endif +#endif const char* errmsg = PDI_errmsg(); if (strcmp(errmsg, "") != 0) { From 1b563a3ee9eb71dda19c58180d0b8936b0b41643 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 09:58:11 +0200 Subject: [PATCH 146/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 46 --- bin/build_and_run_all_tests | 89 ++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index cfd6696b9..beafbfc16 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -138,53 +138,52 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $ echo "############ 1" -# # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf - -# # if pkg-config --exists paraconf; then -# if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then -# # PARACONF_PATH=$(ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | sed -n 's/.*=> \(\/[^ ]*\) (.*/\1/p') -# # PARACONF_DIR=$(dirname "$PARACONF_PATH") -# RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" -# echo "PARACONF_DIR: " -# PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") -# cd "${TEST_DIR_API}" -# # cd "${SRCDIR}/example" -# # ls "${SRCDIR}/example" -# # mkdir build_example && cd build_example -# # RELATIVE_MODULE_PATH="no-pdi/cmake" -# RELATIVE_MODULE_PATH="no-pdi" -# ls "${SRCDIR}/${RELATIVE_MODULE_PATH}" -# # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -# make ${MAKEFLAGS} -# ls "PDI_TESTS/src/PDI_TESTS_pkg-build" -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" - -# echo "############ 2" - -# cd "${TEST_DIR_NO_PDI}" -# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -# # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -# else -# echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." -# fi +# Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf + +# if pkg-config --exists paraconf; then +if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then + # PARACONF_PATH=$(ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | sed -n 's/.*=> \(\/[^ ]*\) (.*/\1/p') + # PARACONF_DIR=$(dirname "$PARACONF_PATH") + RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" + echo "PARACONF_DIR: " + PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") + + # cd "${TEST_DIR_API}" + # # cd "${SRCDIR}/example" + # # ls "${SRCDIR}/example" + # # mkdir build_example && cd build_example + # # RELATIVE_MODULE_PATH="no-pdi/cmake" + # RELATIVE_MODULE_PATH="no-pdi" + # ls "${SRCDIR}/${RELATIVE_MODULE_PATH}" + # # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + # make ${MAKEFLAGS} + # ls "PDI_TESTS/src/PDI_TESTS_pkg-build" + # ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" + + echo "############ 2" + + cd "${TEST_DIR_NO_PDI}" + NO_PDI_TESTS="test_07_main_C test_07_main_CXX" + # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" + # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" + make ${MAKEFLAGS} + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +else + echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." +fi # echo "############ 3" -# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf +# # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf -echo "ls SRCDIR:" -ls "${SRCDIR}" +# echo "ls SRCDIR:" +# ls "${SRCDIR}" -cd "${TEST_DIR_API}" -echo "TEST_DIR_API: ${TEST_DIR_API}" -NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -make ${MAKEFLAGS} -# make -j1 -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +# cd "${TEST_DIR_API}" +# echo "TEST_DIR_API: ${TEST_DIR_API}" +# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From e574751474ccfdab653b337d9033660c35346ff8 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 10:03:39 +0200 Subject: [PATCH 147/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 47 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index beafbfc16..bc02bb0a9 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -153,7 +153,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => # # ls "${SRCDIR}/example" # # mkdir build_example && cd build_example # # RELATIVE_MODULE_PATH="no-pdi/cmake" - # RELATIVE_MODULE_PATH="no-pdi" + RELATIVE_MODULE_PATH="no-pdi" # ls "${SRCDIR}/${RELATIVE_MODULE_PATH}" # # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" From 22cdc98026981d9abc7f0a13948d50d0ab5848c9 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 10:13:43 +0200 Subject: [PATCH 148/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 48 --- bin/build_and_run_all_tests | 42 ++++++++++++++++++------------------- pdi/docs/Using_PDI.md | 6 +++++- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index bc02bb0a9..033c22989 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -148,18 +148,18 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => echo "PARACONF_DIR: " PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") - # cd "${TEST_DIR_API}" - # # cd "${SRCDIR}/example" - # # ls "${SRCDIR}/example" - # # mkdir build_example && cd build_example - # # RELATIVE_MODULE_PATH="no-pdi/cmake" + cd "${TEST_DIR_API}" + # cd "${SRCDIR}/example" + # ls "${SRCDIR}/example" + # mkdir build_example && cd build_example + # RELATIVE_MODULE_PATH="no-pdi/cmake" RELATIVE_MODULE_PATH="no-pdi" - # ls "${SRCDIR}/${RELATIVE_MODULE_PATH}" - # # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" - # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" - # make ${MAKEFLAGS} - # ls "PDI_TESTS/src/PDI_TESTS_pkg-build" - # ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" + ls "${SRCDIR}/${RELATIVE_MODULE_PATH}" + # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + make ${MAKEFLAGS} + ls "PDI_TESTS/src/PDI_TESTS_pkg-build" + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" echo "############ 2" @@ -174,16 +174,16 @@ else echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." fi -# echo "############ 3" +echo "############ 3" -# # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf +# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf -# echo "ls SRCDIR:" -# ls "${SRCDIR}" +echo "ls SRCDIR:" +ls "${SRCDIR}" -# cd "${TEST_DIR_API}" -# echo "TEST_DIR_API: ${TEST_DIR_API}" -# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +cd "${TEST_DIR_API}" +echo "TEST_DIR_API: ${TEST_DIR_API}" +NO_PDI_TESTS="test_07_main_C test_07_main_CXX" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +make ${MAKEFLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 962dfb9c2..5dbcb447f 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -109,7 +109,10 @@ following one: ```CMake option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) if(BUILD_WITHOUT_PDI) - include("${CMAKE_CURRENT_LIST_DIR}/no-pdi/cmake/PDIConfig.cmake") + include_directories("////pdi/no-pdi/include") + add_library(PDI_C INTERFACE) + target_include_directories(PDI_C INTERFACE "////pdi/no-pdi/include") + add_library(PDI::PDI_C ALIAS PDI_C) else() find_package(PDI REQUIRED) endif() @@ -120,6 +123,7 @@ cmake . -DBUILD_WITHOUT_PDI=ON ``` This is the preferred method of using no-pdi, as the following may result in a conflict when using a dependency toward Paraconf outside of PDI. +You can refer to `pdi/tests/CMakeLists.txt` for an example. ### Using a specific no-pdi through a full path From 58f29498534b93ba5942739478aeab5e14e66b47 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 10:59:50 +0200 Subject: [PATCH 149/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 49 --- bin/build_and_run_all_tests | 20 ++++++++++---------- example/CMakeLists.txt | 6 ++++++ tests/CMakeLists.txt | 6 ++++++ tests/test_07_no-pdi.h | 16 ++++++++-------- 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 033c22989..c52f8e76f 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -174,16 +174,16 @@ else echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." fi -echo "############ 3" +# echo "############ 3" -# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf +# # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf -echo "ls SRCDIR:" -ls "${SRCDIR}" +# echo "ls SRCDIR:" +# ls "${SRCDIR}" -cd "${TEST_DIR_API}" -echo "TEST_DIR_API: ${TEST_DIR_API}" -NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +# cd "${TEST_DIR_API}" +# echo "TEST_DIR_API: ${TEST_DIR_API}" +# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index cbe9e18dd..35fe441af 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -33,6 +33,12 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") message(WARNING "ici example: ${CMAKE_CURRENT_LIST_DIR}") +if(paraconf_DIR) +{ + message(WARNING "paraconf_DIR was specified") + find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +} + set(MPI_COMPONENTS C) set(PDI_COMPONENTS C) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index cbbb510e9..28953ac53 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -94,6 +94,12 @@ endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") # # endif() # # include_directories(${CMAKE_CURRENT_LIST_DIR}) +if(paraconf_DIR) +{ + message(WARNING "paraconf_DIR was specified") + find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +} + add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_07_main_C PRIVATE diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 3072178f8..e851f5044 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -113,7 +113,7 @@ void errhandler() int tests(int argc, char* argv[]) { -#ifdef PC_parse_string +// #ifdef PC_parse_string static const char* CONFIG_YAML = "logging: trace \n" "data: \n" @@ -129,13 +129,13 @@ int tests(int argc, char* argv[]) fprintf(stderr, "*** Error: no-pdi initialisation\n"); exit(EXIT_FAILURE); } -#else - PC_tree_t mock_PC_tree = {}; - if (PDI_OK != PDI_init(mock_PC_tree)) { - fprintf(stderr, "*** Error: no-pdi initialisation\n"); - exit(EXIT_FAILURE); - } -#endif +// #else +// PC_tree_t mock_PC_tree = {}; +// if (PDI_OK != PDI_init(mock_PC_tree)) { +// fprintf(stderr, "*** Error: no-pdi initialisation\n"); +// exit(EXIT_FAILURE); +// } +// #endif const char* errmsg = PDI_errmsg(); if (strcmp(errmsg, "") != 0) { From d9ab60da34a70efa4b528e22f09469326ff5697b Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 11:05:33 +0200 Subject: [PATCH 150/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 50 --- example/CMakeLists.txt | 3 +-- tests/CMakeLists.txt | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 35fe441af..4e8821616 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -34,10 +34,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") message(WARNING "ici example: ${CMAKE_CURRENT_LIST_DIR}") if(paraconf_DIR) -{ message(WARNING "paraconf_DIR was specified") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -} +endif() set(MPI_COMPONENTS C) set(PDI_COMPONENTS C) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 28953ac53..6d5dc2a4c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -95,10 +95,9 @@ endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") # # include_directories(${CMAKE_CURRENT_LIST_DIR}) if(paraconf_DIR) -{ message(WARNING "paraconf_DIR was specified") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -} +endif() add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") From 431f0d83fc717bf0890b83eab964e6661ae9cac6 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 11:31:11 +0200 Subject: [PATCH 151/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 51 --- bin/build_and_run_all_tests | 7 +++++-- example/CMakeLists.txt | 17 +++++++++++------ tests/CMakeLists.txt | 19 +++++++++++++------ 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index c52f8e76f..462190bd3 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -156,10 +156,12 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => RELATIVE_MODULE_PATH="no-pdi" ls "${SRCDIR}/${RELATIVE_MODULE_PATH}" # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ls "PDI_TESTS/src/PDI_TESTS_pkg-build" ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" + make clean echo "############ 2" @@ -167,7 +169,8 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => NO_PDI_TESTS="test_07_main_C test_07_main_CXX" # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" + # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} else diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 4e8821616..a20649d62 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -33,11 +33,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") message(WARNING "ici example: ${CMAKE_CURRENT_LIST_DIR}") -if(paraconf_DIR) - message(WARNING "paraconf_DIR was specified") - find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -endif() - set(MPI_COMPONENTS C) set(PDI_COMPONENTS C) @@ -82,9 +77,19 @@ end module endif() endif() +option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) +if(BUILD_WITH_PARACONF) + message(WARNING "Building with Paraconf") + find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +endif() add_executable(PDI_example_C example.c) -target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) +# target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) +if(BUILD_WITH_PARACONF) + target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) +else() + target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) +endif() if("${BUILD_FORTRAN}") add_executable(PDI_example_F example.F90) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6d5dc2a4c..04929d66a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -94,8 +94,9 @@ endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") # # endif() # # include_directories(${CMAKE_CURRENT_LIST_DIR}) -if(paraconf_DIR) - message(WARNING "paraconf_DIR was specified") +option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) +if(BUILD_WITH_PARACONF) + message(WARNING "Building with Paraconf") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) endif() @@ -103,8 +104,11 @@ add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_07_main_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) -# target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) -target_link_libraries(test_07_main_C PDI::PDI_C) +if(BUILD_WITH_PARACONF) + target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) +else() + target_link_libraries(test_07_main_C PDI::PDI_C) +endif() add_test(NAME test_07_main_C COMMAND "$") add_executable(test_07_main_CXX test_07_main.cpp) @@ -114,6 +118,9 @@ target_compile_options(test_07_main_CXX PRIVATE set_target_properties(test_07_main_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_07_main_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_07_main_CXX PROPERTIES LINKER_LANGUAGE CXX) -# target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) -target_link_libraries(test_07_main_CXX PDI::PDI_C) +if(BUILD_WITH_PARACONF) + target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) +else() + target_link_libraries(test_07_main_CXX PDI::PDI_C) +endif() add_test(NAME test_07_main_CXX COMMAND "$") From 028abffd6f3c9ac77849c873efb15e56fde9a439 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 11:40:39 +0200 Subject: [PATCH 152/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 52 --- no-pdi/include/pdi.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 2d1efb383..4fbed2626 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -154,9 +154,13 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) /** Initializes PDI */ -#ifndef PARACONF_H__ +#ifndef PARACONF_H__ // Add ifndef to not prevent "no-pdi with paraconf" typedef struct PC_tree_s { -} PC_tree_t; //ajouter ifdef pour ne pas empêcher "no-pdi+paraconf" +} PC_tree_t; + +PC_tree_t PC_parse_string(const char* document) { + return PC_tree_t mock_PC_tree = {}; +} #endif static inline PDI_status_t PDI_init(PC_tree_t conf) From f445425d09537591ce945ba3fb3ab505c67cf6bd Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 13:51:10 +0200 Subject: [PATCH 153/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 53 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 462190bd3..6fba72cd0 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -159,7 +159,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} - ls "PDI_TESTS/src/PDI_TESTS_pkg-build" + # ls "PDI_TESTS/src/PDI_TESTS_pkg-build" ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" make clean From f16cbc6fcc058fd2cb9d0107abeb7288b3c06618 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 14:04:17 +0200 Subject: [PATCH 154/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 54 --- bin/build_and_run_all_tests | 3 ++- tests/test_07_no-pdi.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 6fba72cd0..9a7e2856f 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -160,8 +160,9 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} # ls "PDI_TESTS/src/PDI_TESTS_pkg-build" + ls . ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" - make clean + # make clean echo "############ 2" diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index e851f5044..3789ae092 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -32,6 +32,9 @@ #include #include #endif +#ifndef PC_parse_string +#include +#endif void share() //share { From 2aa2727fb8ead2346ac457ad52f1c779fd2bd7aa Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 14:17:37 +0200 Subject: [PATCH 155/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 55 --- bin/build_and_run_all_tests | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 9a7e2856f..dcc77f4ab 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -160,7 +160,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} # ls "PDI_TESTS/src/PDI_TESTS_pkg-build" - ls . + ls -l . ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" # make clean @@ -173,6 +173,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} + ls -l . ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} else echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." From ac49bff0db399834597b48c91de7675e0491dfca Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 14:24:25 +0200 Subject: [PATCH 156/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 56 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index dcc77f4ab..4aad16dad 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -161,7 +161,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => make ${MAKEFLAGS} # ls "PDI_TESTS/src/PDI_TESTS_pkg-build" ls -l . - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R "PDI_example_C" + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C # make clean echo "############ 2" From bbeab7f7c24baf023a38876af33ba928f82f50ec Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 14:39:38 +0200 Subject: [PATCH 157/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 57 --- example/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index a20649d62..8777e50be 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -86,10 +86,13 @@ endif() add_executable(PDI_example_C example.c) # target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) if(BUILD_WITH_PARACONF) + message(WARNING "PDI_example_C with paraconf") target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) else() + message(WARNING "PDI_example_C without paraconf") target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) endif() +add_test(NAME PDI_example_C COMMAND "$") if("${BUILD_FORTRAN}") add_executable(PDI_example_F example.F90) From 48b32a56197353522e731b0e22ef1e4d35b160a0 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 14:46:39 +0200 Subject: [PATCH 158/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 58 --- example/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 8777e50be..778dcf072 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -92,7 +92,7 @@ else() message(WARNING "PDI_example_C without paraconf") target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) endif() -add_test(NAME PDI_example_C COMMAND "$") +add_test(NAME PDI_example_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/pluginless.yml") if("${BUILD_FORTRAN}") add_executable(PDI_example_F example.F90) From dbe6931fc2984e86658f368ec1508e490978ae6d Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 14:54:12 +0200 Subject: [PATCH 159/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 59 --- example/pluginless.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 example/pluginless.yml diff --git a/example/pluginless.yml b/example/pluginless.yml new file mode 100644 index 000000000..71de7685d --- /dev/null +++ b/example/pluginless.yml @@ -0,0 +1,17 @@ +# duration in seconds +duration: 0.75 +# global [height, width] (excluding boundary conditions or ghosts) +datasize: [60, 12] +# degree of parallelism +parallelism: { height: 3, width: 1 } + +# only the following config is passed to PDI +pdi: + metadata: # type of small values for which PDI keeps a copy + iter: int # current iteration id + dsize: { size: 2, type: array, subtype: int } # local data size including ghosts/boundary + psize: { size: 2, type: array, subtype: int } # number of processes in each dimension + pcoord: { size: 2, type: array, subtype: int } # coordinate of the process + data: # type of values for which PDI does not keep a copy + main_field: { size: [ '$dsize[0]', '$dsize[1]' ], type: array, subtype: double } + From e983a1f300b106dde2eba9caee6b4907ba055043 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 15:04:18 +0200 Subject: [PATCH 160/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 60 --- example/CMakeLists.txt | 5 ++++- pdi/docs/Using_PDI.md | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 778dcf072..b71529bd1 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -92,7 +92,10 @@ else() message(WARNING "PDI_example_C without paraconf") target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) endif() -add_test(NAME PDI_example_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/pluginless.yml") +# add_test(NAME PDI_example_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/pluginless.yml") +add_test(NAME PDI_example_C COMMAND "${MPIEXEC}" "${MPIEXEC_NUMPROC_FLAG}" 3 ${MPIEXEC_PREFLAGS} "$" ${MPIEXEC_POSTFLAGS} "${CMAKE_CURRENT_SOURCE_DIR}/pluginless.yml") +set_property(TEST PDI_example_C PROPERTY TIMEOUT 15) +set_property(TEST PDI_example_C PROPERTY PROCESSORS 3) if("${BUILD_FORTRAN}") add_executable(PDI_example_F example.F90) diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 5dbcb447f..29dda8c6f 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -135,6 +135,7 @@ then use the following: ```bash cmake . -DCMAKE_MODULE_PATH="////pdi/no-pdi/cmake" ``` +You may also need This is not the preferred method of using no-pdi, as it may result in a conflict when using a dependency toward Paraconf outside of PDI. From c14a9fcc125faea3fe2a9c4e338a767ade15b828 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 15:23:28 +0200 Subject: [PATCH 161/372] Account for Paraconf availability; cleaning --- bin/build_and_run_all_tests | 47 +++++++------------------------------ example/CMakeLists.txt | 2 -- no-pdi/CMakeLists.txt | 14 ----------- pdi/docs/Using_PDI.md | 7 +++++- tests/CMakeLists.txt | 24 ++----------------- tests/test_07_no-pdi.h | 8 ------- 6 files changed, 16 insertions(+), 86 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 4aad16dad..64a5c5189 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -123,72 +123,41 @@ fi # Configure, build & test for pdi, with Paraconf cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# echo "verbose" make ${MAKEFLAGS} -# make VERBOSE=1 -j1 -# ls . ## pour trouver où faire un ldd, pour trouver paraconf -# ls . -# echo "ldd" -# ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" -# echo "ldd grep" -# ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found' -# # ls "x${PDI_LIBS}" -# echo "après ldd" ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} echo "############ 1" # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf -# if pkg-config --exists paraconf; then -if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then - # PARACONF_PATH=$(ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | sed -n 's/.*=> \(\/[^ ]*\) (.*/\1/p') - # PARACONF_DIR=$(dirname "$PARACONF_PATH") +if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" echo "PARACONF_DIR: " PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") cd "${TEST_DIR_API}" - # cd "${SRCDIR}/example" - # ls "${SRCDIR}/example" - # mkdir build_example && cd build_example - # RELATIVE_MODULE_PATH="no-pdi/cmake" RELATIVE_MODULE_PATH="no-pdi" - ls "${SRCDIR}/${RELATIVE_MODULE_PATH}" - # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" - # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} - # ls "PDI_TESTS/src/PDI_TESTS_pkg-build" - ls -l . ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C - # make clean echo "############ 2" cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" - # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_MODULE_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" - # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" - # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -Dparaconf_DIR="${PARACONF_DIR}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} - ls -l . ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} else echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." fi -# echo "############ 3" +echo "############ 3" -# # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf +# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf -# echo "ls SRCDIR:" -# ls "${SRCDIR}" - -# cd "${TEST_DIR_API}" -# echo "TEST_DIR_API: ${TEST_DIR_API}" -# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +cd "${TEST_DIR_API}" +NO_PDI_TESTS="test_07_main_C test_07_main_CXX" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +make ${MAKEFLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index b71529bd1..5428a59e3 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -84,7 +84,6 @@ if(BUILD_WITH_PARACONF) endif() add_executable(PDI_example_C example.c) -# target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) if(BUILD_WITH_PARACONF) message(WARNING "PDI_example_C with paraconf") target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) @@ -92,7 +91,6 @@ else() message(WARNING "PDI_example_C without paraconf") target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) endif() -# add_test(NAME PDI_example_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/pluginless.yml") add_test(NAME PDI_example_C COMMAND "${MPIEXEC}" "${MPIEXEC_NUMPROC_FLAG}" 3 ${MPIEXEC_PREFLAGS} "$" ${MPIEXEC_POSTFLAGS} "${CMAKE_CURRENT_SOURCE_DIR}/pluginless.yml") set_property(TEST PDI_example_C PROPERTY TIMEOUT 15) set_property(TEST PDI_example_C PROPERTY PROCESSORS 3) diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index a7a6e1381..254a3c0b5 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -33,17 +33,3 @@ project(PDI LANGUAGES C CXX) message(WARNING "ici no-pdi: ${CMAKE_CURRENT_LIST_DIR}") include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake") - -# if("${paraconf_DIR}") -# sbuild_add_dependency(paraconf "${USE_DEFAULT}" -# EMBEDDED_PATH "${paraconf_DIR}" -# COMPONENTS ${PARACONF_COMPONENTS} -# SOURCE_SUBDIR "paraconf" -# CMAKE_CACHE_ARGS -# "-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=TRUE" -# "-DUSE_yaml:STRING=SYSTEM" -# "-DBUILD_TESTING:BOOL=OFF" -# DEPENDS "yaml" -# VERSION 1.0.0 -# ) -# endif() \ No newline at end of file diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 29dda8c6f..325864d8f 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -121,6 +121,9 @@ Then you can build your project with this option specified to disable PDI: ```bash cmake . -DBUILD_WITHOUT_PDI=ON ``` +You may also need an option `-DBUILD_WITH_PARACONF` if your code uses more than +`PDI_init`, and you want to be able to use an already available Paraconf dependency. + This is the preferred method of using no-pdi, as the following may result in a conflict when using a dependency toward Paraconf outside of PDI. You can refer to `pdi/tests/CMakeLists.txt` for an example. @@ -135,7 +138,9 @@ then use the following: ```bash cmake . -DCMAKE_MODULE_PATH="////pdi/no-pdi/cmake" ``` -You may also need +You may also need an option `-DBUILD_WITH_PARACONF` if your code uses more than +`PDI_init`, and you want to be able to use an already available Paraconf dependency. + This is not the preferred method of using no-pdi, as it may result in a conflict when using a dependency toward Paraconf outside of PDI. diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 04929d66a..d34df795d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -34,29 +34,16 @@ option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) -# find_package(PDI REQUIRED COMPONENTS C) - -message(WARNING "BUILD_WITHOUT_PDI before: ${BUILD_WITHOUT_PDI}") -message(WARNING "DIST_PROFILE: ${DIST_PROFILE}") -message(WARNING "BUILD_UNSTABLE: ${BUILD_UNSTABLE}") -message(WARNING "ici test: ${CMAKE_CURRENT_LIST_DIR}") option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") -# message(WARNING "l'include: ${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") -# message(WARNING "l'include: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") if(BUILD_WITHOUT_PDI) - # include("${CMAKE_CURRENT_LIST_DIR}/no-pdi/cmake/PDIConfig.cmake") - message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") - message(WARNING "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") - # include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake") - # include("${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/include") - # include("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include/pdi.h") + message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR") include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") add_library(PDI_C INTERFACE) target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") add_library(PDI::PDI_C ALIAS PDI_C) else() - message(WARNING "Using find_package by default") + message(WARNING "Using find_package for PDI by default") find_package(PDI REQUIRED COMPONENTS C) endif() @@ -87,13 +74,6 @@ add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOUR endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") -# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -# # if(EXAMPLES_NO_PDI) -# # message(WARNING "Using include through CMAKE_CURRENT_LIST_DIR") -# # include(${CMAKE_CURRENT_LIST_DIR}/../../no-pdi/cmake/PDIConfig.cmake) -# # endif() -# # include_directories(${CMAKE_CURRENT_LIST_DIR}) - option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) if(BUILD_WITH_PARACONF) message(WARNING "Building with Paraconf") diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 3789ae092..e9197e8c1 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -116,7 +116,6 @@ void errhandler() int tests(int argc, char* argv[]) { -// #ifdef PC_parse_string static const char* CONFIG_YAML = "logging: trace \n" "data: \n" @@ -132,13 +131,6 @@ int tests(int argc, char* argv[]) fprintf(stderr, "*** Error: no-pdi initialisation\n"); exit(EXIT_FAILURE); } -// #else -// PC_tree_t mock_PC_tree = {}; -// if (PDI_OK != PDI_init(mock_PC_tree)) { -// fprintf(stderr, "*** Error: no-pdi initialisation\n"); -// exit(EXIT_FAILURE); -// } -// #endif const char* errmsg = PDI_errmsg(); if (strcmp(errmsg, "") != 0) { From 4910b2e650b82263ccc9675bc191006bfd548384 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 15:27:05 +0200 Subject: [PATCH 162/372] Account for Paraconf availability; cleaning 2 --- no-pdi/include/pdi.h | 5 +++-- pdi/docs/Using_PDI.md | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 4fbed2626..a362d3d24 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -154,11 +154,12 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) /** Initializes PDI */ -#ifndef PARACONF_H__ // Add ifndef to not prevent "no-pdi with paraconf" +#ifndef PARACONF_H__ // Add ifndef to not prevent "no-pdi with paraconf" typedef struct PC_tree_s { } PC_tree_t; -PC_tree_t PC_parse_string(const char* document) { +PC_tree_t PC_parse_string(const char* document) +{ return PC_tree_t mock_PC_tree = {}; } #endif diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 325864d8f..5160a510d 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -122,7 +122,8 @@ Then you can build your project with this option specified to disable PDI: cmake . -DBUILD_WITHOUT_PDI=ON ``` You may also need an option `-DBUILD_WITH_PARACONF` if your code uses more than -`PDI_init`, and you want to be able to use an already available Paraconf dependency. +`PDI_init`, and you want to be able to use an +already available Paraconf dependency (see `pdi/example/CMakeLists.txt`). This is the preferred method of using no-pdi, as the following may result in a conflict when using a dependency toward Paraconf outside of PDI. @@ -139,7 +140,8 @@ then use the following: cmake . -DCMAKE_MODULE_PATH="////pdi/no-pdi/cmake" ``` You may also need an option `-DBUILD_WITH_PARACONF` if your code uses more than -`PDI_init`, and you want to be able to use an already available Paraconf dependency. +`PDI_init`, and you want to be able to use an +already available Paraconf dependency (see `pdi/example/CMakeLists.txt`). This is not the preferred method of using no-pdi, as it may result in a conflict when using a dependency toward Paraconf outside of PDI. From 47de539c382245c87ef85381e72b3d69850f4836 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 15:28:14 +0200 Subject: [PATCH 163/372] Account for Paraconf availability; cleaning 3 --- no-pdi/include/pdi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index a362d3d24..3712f37ce 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -158,7 +158,7 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) typedef struct PC_tree_s { } PC_tree_t; -PC_tree_t PC_parse_string(const char* document) +PC_tree_t PC_parse_string(const char* document) { return PC_tree_t mock_PC_tree = {}; } From 02af6cadd62325b04b63e82208a7f3dff99edf04 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 15:38:10 +0200 Subject: [PATCH 164/372] Account for Paraconf availability; cleaning 4 --- bin/build_and_run_all_tests | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 64a5c5189..501b2f0c5 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -140,6 +140,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C + make clean echo "############ 2" From 22547b0ffba48df72233ab4a3ba0e3445f3b7e8b Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 15:45:01 +0200 Subject: [PATCH 165/372] Account for Paraconf availability; remove content of first api cmake, for second api cmake --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 501b2f0c5..90a579772 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -140,7 +140,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C - make clean + rm -rf CMakeCache.txt CMakeFiles/ echo "############ 2" From 2d78dd44d958b6f0813f2f3b3fb9762d7b73d667 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 15:58:06 +0200 Subject: [PATCH 166/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 61 --- no-pdi/include/pdi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 3712f37ce..73676fc9a 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -155,6 +155,7 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) /** Initializes PDI */ #ifndef PARACONF_H__ // Add ifndef to not prevent "no-pdi with paraconf" +#warning "PARACONF_H__ is missing, defining mock PC_tree and PC_parse_string" typedef struct PC_tree_s { } PC_tree_t; From 8316e3b39792a89722c1de89d7262307b1e8f664 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 16:11:07 +0200 Subject: [PATCH 167/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 62 --- bin/build_and_run_all_tests | 50 ++++++++++++++++++------------------- no-pdi/include/pdi.h | 4 +-- tests/CMakeLists.txt | 2 +- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 90a579772..5403ae95e 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -120,38 +120,38 @@ fi -# Configure, build & test for pdi, with Paraconf +# # Configure, build & test for pdi, with Paraconf -cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +# cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -echo "############ 1" +# echo "############ 1" -# Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf +# # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf -if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command - RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" - echo "PARACONF_DIR: " - PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") +# if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command +# RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" +# echo "PARACONF_DIR: " +# PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") - cd "${TEST_DIR_API}" - RELATIVE_MODULE_PATH="no-pdi" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" - make ${MAKEFLAGS} - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C - rm -rf CMakeCache.txt CMakeFiles/ +# cd "${TEST_DIR_API}" +# RELATIVE_MODULE_PATH="no-pdi" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C +# rm -rf CMakeCache.txt CMakeFiles/ - echo "############ 2" +# echo "############ 2" - cd "${TEST_DIR_NO_PDI}" - NO_PDI_TESTS="test_07_main_C test_07_main_CXX" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" - make ${MAKEFLAGS} - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -else - echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." -fi +# cd "${TEST_DIR_NO_PDI}" +# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +# else +# echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." +# fi echo "############ 3" diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 73676fc9a..e3e4a8da9 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -154,12 +154,12 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) /** Initializes PDI */ -#ifndef PARACONF_H__ // Add ifndef to not prevent "no-pdi with paraconf" +#ifndef PARACONF_H__ // Add ifndef to not prevent "no-pdi with paraconf" (and allow "no-pdi without paraconf") #warning "PARACONF_H__ is missing, defining mock PC_tree and PC_parse_string" typedef struct PC_tree_s { } PC_tree_t; -PC_tree_t PC_parse_string(const char* document) +static inline PC_tree_t PC_parse_string(const char* document) { return PC_tree_t mock_PC_tree = {}; } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d34df795d..af8506bf7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -37,7 +37,7 @@ include(CTest) option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") if(BUILD_WITHOUT_PDI) - message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR") + message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") add_library(PDI_C INTERFACE) target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") From 7378025bd617f56379d64eea2082a7667d4be14b Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 16:14:34 +0200 Subject: [PATCH 168/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 63 --- no-pdi/include/pdi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index e3e4a8da9..3fa6d20b8 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -161,7 +161,8 @@ typedef struct PC_tree_s { static inline PC_tree_t PC_parse_string(const char* document) { - return PC_tree_t mock_PC_tree = {}; + PC_tree_t mock_PC_tree = {}; + return mock_PC_tree; } #endif From 300fb4598730bfb526fcfcaa16a81776e4f349f8 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 16:19:35 +0200 Subject: [PATCH 169/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 64 --- no-pdi/include/pdi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 3fa6d20b8..cb4968e75 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -154,7 +154,7 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) /** Initializes PDI */ -#ifndef PARACONF_H__ // Add ifndef to not prevent "no-pdi with paraconf" (and allow "no-pdi without paraconf") +// #ifndef PARACONF_H__ // Add ifndef to not prevent "no-pdi with paraconf" (and allow "no-pdi without paraconf") #warning "PARACONF_H__ is missing, defining mock PC_tree and PC_parse_string" typedef struct PC_tree_s { } PC_tree_t; @@ -164,7 +164,7 @@ static inline PC_tree_t PC_parse_string(const char* document) PC_tree_t mock_PC_tree = {}; return mock_PC_tree; } -#endif +// #endif static inline PDI_status_t PDI_init(PC_tree_t conf) { From 8127fd1c15f3c85bdc92ecde2c9bd67e13ce9613 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 16:23:07 +0200 Subject: [PATCH 170/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 65 --- tests/test_07_no-pdi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index e9197e8c1..15e960a05 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -32,9 +32,9 @@ #include #include #endif -#ifndef PC_parse_string -#include -#endif +// #ifndef PC_parse_string +// #include +// #endif void share() //share { From c2a4f4884de757b8b27cfe9036dbad7ff6c39616 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 16:26:00 +0200 Subject: [PATCH 171/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 66 --- no-pdi/include/pdi.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index cb4968e75..4619ecff8 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -55,11 +55,11 @@ #ifndef PDI_H_ #define PDI_H_ -#if defined __has_include -#if __has_include() -#include -#endif -#endif +// #if defined __has_include +// #if __has_include() +// #include +// #endif +// #endif #include From c70b0d7c3cdd5c9cfc10339f88633eaa801d30b1 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 16:28:06 +0200 Subject: [PATCH 172/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 67 --- bin/build_and_run_all_tests | 50 ++++++++++++++++++------------------- no-pdi/include/pdi.h | 2 ++ 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 5403ae95e..90a579772 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -120,38 +120,38 @@ fi -# # Configure, build & test for pdi, with Paraconf +# Configure, build & test for pdi, with Paraconf -# cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make ${MAKEFLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -# echo "############ 1" +echo "############ 1" -# # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf +# Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf -# if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command -# RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" -# echo "PARACONF_DIR: " -# PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") +if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command + RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" + echo "PARACONF_DIR: " + PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") -# cd "${TEST_DIR_API}" -# RELATIVE_MODULE_PATH="no-pdi" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C -# rm -rf CMakeCache.txt CMakeFiles/ + cd "${TEST_DIR_API}" + RELATIVE_MODULE_PATH="no-pdi" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + make ${MAKEFLAGS} + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C + rm -rf CMakeCache.txt CMakeFiles/ -# echo "############ 2" + echo "############ 2" -# cd "${TEST_DIR_NO_PDI}" -# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -# else -# echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." -# fi + cd "${TEST_DIR_NO_PDI}" + NO_PDI_TESTS="test_07_main_C test_07_main_CXX" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" + make ${MAKEFLAGS} + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +else + echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." +fi echo "############ 3" diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 4619ecff8..2e5909d63 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -156,6 +156,7 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) */ // #ifndef PARACONF_H__ // Add ifndef to not prevent "no-pdi with paraconf" (and allow "no-pdi without paraconf") #warning "PARACONF_H__ is missing, defining mock PC_tree and PC_parse_string" + typedef struct PC_tree_s { } PC_tree_t; @@ -164,6 +165,7 @@ static inline PC_tree_t PC_parse_string(const char* document) PC_tree_t mock_PC_tree = {}; return mock_PC_tree; } + // #endif static inline PDI_status_t PDI_init(PC_tree_t conf) From 509aa9f1e2f08b05cd6109cacf72fa27000a4dec Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 16:35:42 +0200 Subject: [PATCH 173/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 68 --- no-pdi/include/pdi.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 2e5909d63..4af1a84bc 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -155,6 +155,8 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) /** Initializes PDI */ // #ifndef PARACONF_H__ // Add ifndef to not prevent "no-pdi with paraconf" (and allow "no-pdi without paraconf") +#if defined __has_include +#if !__has_include() #warning "PARACONF_H__ is missing, defining mock PC_tree and PC_parse_string" typedef struct PC_tree_s { @@ -166,6 +168,8 @@ static inline PC_tree_t PC_parse_string(const char* document) return mock_PC_tree; } +#endif +#endif // #endif static inline PDI_status_t PDI_init(PC_tree_t conf) From 0dcd4ab2dfa1eae89e9e3a51d5bc4cd3e8903048 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 16:42:18 +0200 Subject: [PATCH 174/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 69 --- no-pdi/include/pdi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 4af1a84bc..2d47a81b4 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -156,6 +156,7 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) */ // #ifndef PARACONF_H__ // Add ifndef to not prevent "no-pdi with paraconf" (and allow "no-pdi without paraconf") #if defined __has_include +#warning "Knows '__has_include'" #if !__has_include() #warning "PARACONF_H__ is missing, defining mock PC_tree and PC_parse_string" From 56f246181a8298c2b07a2aefeb1232c3e26fbe4a Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 22 Jul 2025 16:49:23 +0200 Subject: [PATCH 175/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 70 --- no-pdi/include/pdi.h | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 2d47a81b4..e0561f572 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -154,24 +154,40 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) /** Initializes PDI */ -// #ifndef PARACONF_H__ // Add ifndef to not prevent "no-pdi with paraconf" (and allow "no-pdi without paraconf") -#if defined __has_include -#warning "Knows '__has_include'" -#if !__has_include() -#warning "PARACONF_H__ is missing, defining mock PC_tree and PC_parse_string" +// // #ifndef PARACONF_H__ // Add ifndef to not prevent "no-pdi with paraconf" (and allow "no-pdi without paraconf") +// #if defined __has_include +// #warning "Knows '__has_include'" +// #if !__has_include() +// #warning "PARACONF_H__ is missing, defining mock PC_tree and PC_parse_string" -typedef struct PC_tree_s { -} PC_tree_t; +// typedef struct PC_tree_s { +// } PC_tree_t; -static inline PC_tree_t PC_parse_string(const char* document) -{ - PC_tree_t mock_PC_tree = {}; - return mock_PC_tree; -} +// static inline PC_tree_t PC_parse_string(const char* document) +// { +// PC_tree_t mock_PC_tree = {}; +// return mock_PC_tree; +// } -#endif -#endif // #endif +// #endif +// // #endif + +#if defined(__has_include) + #if __has_include() + #warning "INCLUDE" + #include + #else + #warning "MOCK" + typedef struct PC_tree_s { } PC_tree_t; + static inline PC_tree_t PC_parse_string(const char* document) { + PC_tree_t mock = {}; + return mock; + } + #endif +#else +#warning "ELSE" +#endif static inline PDI_status_t PDI_init(PC_tree_t conf) { From dc209a6c35234af87765ab14b05fe7ff4b6b0355 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 09:55:23 +0200 Subject: [PATCH 176/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 71 --- bin/build_and_run_all_tests | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 90a579772..6ee1795d8 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -161,4 +161,6 @@ cd "${TEST_DIR_API}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} +ls . +ldd test_07_main_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From 9f4125a4af0f486748473205bf54b81b10c7b394 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 10:18:56 +0200 Subject: [PATCH 177/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 72 --- bin/build_and_run_all_tests | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 6ee1795d8..1b082d4ec 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -159,8 +159,19 @@ echo "############ 3" cd "${TEST_DIR_API}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" + +message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") +message(STATUS "CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}") +message(STATUS "LIBRARY_PATH: ${LIBRARY_PATH}") +find_path(paraconf_INCLUDE_DIR paraconf.h NO_DEFAULT_PATH) +find_library(paraconf_LIBRARY paraconf NO_DEFAULT_PATH) +if(paraconf_INCLUDE_DIR AND paraconf_LIBRARY) + message(STATUS "paraconf include directory: ${paraconf_INCLUDE_DIR}") + message(STATUS "paraconf library: ${paraconf_LIBRARY}") +endif() + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} -ls . -ldd test_07_main_C +# ls . +# ldd test_07_main_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From e9ea136535c45bcd134f06cfd728ff818378c7f6 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 10:24:38 +0200 Subject: [PATCH 178/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 73 --- bin/build_and_run_all_tests | 60 ++++++++++++++++--------------------- tests/CMakeLists.txt | 10 +++++++ 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 1b082d4ec..30c0e74ab 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -120,38 +120,38 @@ fi -# Configure, build & test for pdi, with Paraconf +# # Configure, build & test for pdi, with Paraconf -cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +# cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -echo "############ 1" +# echo "############ 1" -# Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf +# # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf -if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command - RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" - echo "PARACONF_DIR: " - PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") +# if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command +# RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" +# echo "PARACONF_DIR: " +# PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") - cd "${TEST_DIR_API}" - RELATIVE_MODULE_PATH="no-pdi" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" - make ${MAKEFLAGS} - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C - rm -rf CMakeCache.txt CMakeFiles/ +# cd "${TEST_DIR_API}" +# RELATIVE_MODULE_PATH="no-pdi" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C +# rm -rf CMakeCache.txt CMakeFiles/ - echo "############ 2" +# echo "############ 2" - cd "${TEST_DIR_NO_PDI}" - NO_PDI_TESTS="test_07_main_C test_07_main_CXX" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" - make ${MAKEFLAGS} - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -else - echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." -fi +# cd "${TEST_DIR_NO_PDI}" +# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +# else +# echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." +# fi echo "############ 3" @@ -160,16 +160,6 @@ echo "############ 3" cd "${TEST_DIR_API}" NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") -message(STATUS "CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}") -message(STATUS "LIBRARY_PATH: ${LIBRARY_PATH}") -find_path(paraconf_INCLUDE_DIR paraconf.h NO_DEFAULT_PATH) -find_library(paraconf_LIBRARY paraconf NO_DEFAULT_PATH) -if(paraconf_INCLUDE_DIR AND paraconf_LIBRARY) - message(STATUS "paraconf include directory: ${paraconf_INCLUDE_DIR}") - message(STATUS "paraconf library: ${paraconf_LIBRARY}") -endif() - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} # ls . diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index af8506bf7..0054f9f70 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -37,6 +37,16 @@ include(CTest) option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") if(BUILD_WITHOUT_PDI) + message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") + message(STATUS "CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}") + message(STATUS "LIBRARY_PATH: ${LIBRARY_PATH}") + find_path(paraconf_INCLUDE_DIR paraconf.h NO_DEFAULT_PATH) + find_library(paraconf_LIBRARY paraconf NO_DEFAULT_PATH) + if(paraconf_INCLUDE_DIR AND paraconf_LIBRARY) + message(STATUS "paraconf include directory: ${paraconf_INCLUDE_DIR}") + message(STATUS "paraconf library: ${paraconf_LIBRARY}") + endif() + message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") add_library(PDI_C INTERFACE) From 5c968df77c16580350d1382381df986c7cd6917f Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 10:28:43 +0200 Subject: [PATCH 179/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 74 --- bin/build_and_run_all_tests | 4 ++-- no-pdi/include/pdi.h | 10 +++++----- tests/CMakeLists.txt | 20 ++++++++++---------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 30c0e74ab..03f755a87 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -162,6 +162,6 @@ NO_PDI_TESTS="test_07_main_C test_07_main_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} -# ls . -# ldd test_07_main_C +ls . +ldd test_07_main_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index e0561f572..3299bd8ed 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -174,17 +174,17 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) // // #endif #if defined(__has_include) - #if __has_include() - #warning "INCLUDE" - #include - #else +// #if __has_include() +// #warning "INCLUDE" +// #include +// #else #warning "MOCK" typedef struct PC_tree_s { } PC_tree_t; static inline PC_tree_t PC_parse_string(const char* document) { PC_tree_t mock = {}; return mock; } - #endif +// #endif #else #warning "ELSE" #endif diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0054f9f70..41083d201 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -37,16 +37,16 @@ include(CTest) option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") if(BUILD_WITHOUT_PDI) - message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") - message(STATUS "CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}") - message(STATUS "LIBRARY_PATH: ${LIBRARY_PATH}") - find_path(paraconf_INCLUDE_DIR paraconf.h NO_DEFAULT_PATH) - find_library(paraconf_LIBRARY paraconf NO_DEFAULT_PATH) - if(paraconf_INCLUDE_DIR AND paraconf_LIBRARY) - message(STATUS "paraconf include directory: ${paraconf_INCLUDE_DIR}") - message(STATUS "paraconf library: ${paraconf_LIBRARY}") - endif() - + # message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") + # message(STATUS "CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}") + # message(STATUS "LIBRARY_PATH: ${LIBRARY_PATH}") + # find_path(paraconf_INCLUDE_DIR paraconf.h NO_DEFAULT_PATH) + # find_library(paraconf_LIBRARY paraconf NO_DEFAULT_PATH) + # if(paraconf_INCLUDE_DIR AND paraconf_LIBRARY) + # message(STATUS "paraconf include directory: ${paraconf_INCLUDE_DIR}") + # message(STATUS "paraconf library: ${paraconf_LIBRARY}") + # endif() + message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") add_library(PDI_C INTERFACE) From 11c9ea2bf46bd9b27611000284eb4863d748e949 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 10:51:28 +0200 Subject: [PATCH 180/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 75 --- bin/build_and_run_all_tests | 50 +++++++++++++-------------- no-pdi/include/pdi.h | 10 +++--- tests/CMakeLists.txt | 67 ++++++++++++++++++++++++------------- 3 files changed, 74 insertions(+), 53 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 03f755a87..77cd21486 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -120,38 +120,38 @@ fi -# # Configure, build & test for pdi, with Paraconf +# Configure, build & test for pdi, with Paraconf -# cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make ${MAKEFLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -# echo "############ 1" +echo "############ 1" -# # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf +# Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf -# if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command -# RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" -# echo "PARACONF_DIR: " -# PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") +if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command + RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" + echo "PARACONF_DIR: " + PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") -# cd "${TEST_DIR_API}" -# RELATIVE_MODULE_PATH="no-pdi" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C -# rm -rf CMakeCache.txt CMakeFiles/ + cd "${TEST_DIR_API}" + RELATIVE_MODULE_PATH="no-pdi" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + make ${MAKEFLAGS} + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C + rm -rf CMakeCache.txt CMakeFiles/ -# echo "############ 2" + echo "############ 2" -# cd "${TEST_DIR_NO_PDI}" -# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -# else -# echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." -# fi + cd "${TEST_DIR_NO_PDI}" + NO_PDI_TESTS="test_07_main_C test_07_main_CXX" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" + make ${MAKEFLAGS} + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +else + echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." +fi echo "############ 3" diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 3299bd8ed..e0561f572 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -174,17 +174,17 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) // // #endif #if defined(__has_include) -// #if __has_include() -// #warning "INCLUDE" -// #include -// #else + #if __has_include() + #warning "INCLUDE" + #include + #else #warning "MOCK" typedef struct PC_tree_s { } PC_tree_t; static inline PC_tree_t PC_parse_string(const char* document) { PC_tree_t mock = {}; return mock; } -// #endif + #endif #else #warning "ELSE" #endif diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 41083d201..9865e109c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -35,28 +35,49 @@ option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) -message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") +option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) + +add_library(PDI_C INTERFACE) if(BUILD_WITHOUT_PDI) - # message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") - # message(STATUS "CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}") - # message(STATUS "LIBRARY_PATH: ${LIBRARY_PATH}") - # find_path(paraconf_INCLUDE_DIR paraconf.h NO_DEFAULT_PATH) - # find_library(paraconf_LIBRARY paraconf NO_DEFAULT_PATH) - # if(paraconf_INCLUDE_DIR AND paraconf_LIBRARY) - # message(STATUS "paraconf include directory: ${paraconf_INCLUDE_DIR}") - # message(STATUS "paraconf library: ${paraconf_LIBRARY}") - # endif() - - message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") - include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") - add_library(PDI_C INTERFACE) - target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") - add_library(PDI::PDI_C ALIAS PDI_C) + message(WARNING "Using mock PDI") + target_include_directories(PDI_C INTERFACE + "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include" + ) else() - message(WARNING "Using find_package for PDI by default") - find_package(PDI REQUIRED COMPONENTS C) + message(WARNING "Finding real PDI") + find_package(PDI REQUIRED COMPONENTS C) + target_link_libraries(PDI_C INTERFACE PDI::PDI_C) +endif() +add_library(PDI::PDI_C ALIAS PDI_C) + +# Blocker for paraconf.h +set(PARACONF_BLOCK_DIR "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/empty-include") +if(NOT BUILD_WITH_PARACONF) + message(WARNING "Blocking paraconf.h by prepending empty-include") + include_directories(BEFORE SYSTEM "${PARACONF_BLOCK_DIR}") +endif() + +# Now handle Paraconf +if(BUILD_WITH_PARACONF) + message(WARNING "Building with Paraconf") + find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) + # Optionally link/paraconf targets here endif() + +# option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) +# message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") +# if(BUILD_WITHOUT_PDI) +# message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") +# include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") +# add_library(PDI_C INTERFACE) +# target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") +# add_library(PDI::PDI_C ALIAS PDI_C) +# else() +# message(WARNING "Using find_package for PDI by default") +# find_package(PDI REQUIRED COMPONENTS C) +# endif() + if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") add_executable(test_01_C test_01.c) @@ -84,11 +105,11 @@ add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOUR endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") -option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) -if(BUILD_WITH_PARACONF) - message(WARNING "Building with Paraconf") - find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -endif() +# option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) +# if(BUILD_WITH_PARACONF) +# message(WARNING "Building with Paraconf") +# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +# endif() add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") From a3efa964ead824f460b5e4b6c50e688570ed9b30 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 10:59:04 +0200 Subject: [PATCH 181/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 76 --- tests/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9865e109c..37d2024d9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -37,18 +37,19 @@ include(CTest) option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) -add_library(PDI_C INTERFACE) if(BUILD_WITHOUT_PDI) message(WARNING "Using mock PDI") + include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") + add_library(PDI_C INTERFACE) target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include" ) + add_library(PDI::PDI_C ALIAS PDI_C) else() message(WARNING "Finding real PDI") find_package(PDI REQUIRED COMPONENTS C) - target_link_libraries(PDI_C INTERFACE PDI::PDI_C) +# target_link_libraries(PDI_C INTERFACE PDI::PDI_C) endif() -add_library(PDI::PDI_C ALIAS PDI_C) # Blocker for paraconf.h set(PARACONF_BLOCK_DIR "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/empty-include") From b9581a412ec67100bf8b79d905b4c9c66ecda261 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 11:08:31 +0200 Subject: [PATCH 182/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 77 --- tests/CMakeLists.txt | 57 +++++++++++--------------------------------- 1 file changed, 14 insertions(+), 43 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 37d2024d9..839dfbe78 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -37,48 +37,19 @@ include(CTest) option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) +option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) +message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") if(BUILD_WITHOUT_PDI) - message(WARNING "Using mock PDI") - include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") - add_library(PDI_C INTERFACE) - target_include_directories(PDI_C INTERFACE - "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include" - ) - add_library(PDI::PDI_C ALIAS PDI_C) + message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") + include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") + add_library(PDI_C INTERFACE) + target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") + add_library(PDI::PDI_C ALIAS PDI_C) else() - message(WARNING "Finding real PDI") - find_package(PDI REQUIRED COMPONENTS C) -# target_link_libraries(PDI_C INTERFACE PDI::PDI_C) -endif() - -# Blocker for paraconf.h -set(PARACONF_BLOCK_DIR "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/empty-include") -if(NOT BUILD_WITH_PARACONF) - message(WARNING "Blocking paraconf.h by prepending empty-include") - include_directories(BEFORE SYSTEM "${PARACONF_BLOCK_DIR}") -endif() - -# Now handle Paraconf -if(BUILD_WITH_PARACONF) - message(WARNING "Building with Paraconf") - find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - # Optionally link/paraconf targets here + message(WARNING "Using find_package for PDI by default") + find_package(PDI REQUIRED COMPONENTS C) endif() - -# option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) -# message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") -# if(BUILD_WITHOUT_PDI) -# message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") -# include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") -# add_library(PDI_C INTERFACE) -# target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") -# add_library(PDI::PDI_C ALIAS PDI_C) -# else() -# message(WARNING "Using find_package for PDI by default") -# find_package(PDI REQUIRED COMPONENTS C) -# endif() - if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") add_executable(test_01_C test_01.c) @@ -106,11 +77,11 @@ add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOUR endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") -# option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) -# if(BUILD_WITH_PARACONF) -# message(WARNING "Building with Paraconf") -# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -# endif() +option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) +if(BUILD_WITH_PARACONF) + message(WARNING "Building with Paraconf") + find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +endif() add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") From 6a7589b2f800e0808d2ba8221b988698b9b68ea8 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 11:49:29 +0200 Subject: [PATCH 183/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 78 --- no-paraconf/include/paraconf.h | 55 ++++++++++++++++++++++++++++++++++ no-pdi/include/pdi.h | 38 +++++++++++++---------- tests/CMakeLists.txt | 34 +++++++++++---------- 3 files changed, 96 insertions(+), 31 deletions(-) create mode 100644 no-paraconf/include/paraconf.h diff --git a/no-paraconf/include/paraconf.h b/no-paraconf/include/paraconf.h new file mode 100644 index 000000000..e36c5ad8b --- /dev/null +++ b/no-paraconf/include/paraconf.h @@ -0,0 +1,55 @@ +/******************************************************************************* +* Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * 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. +* * Neither the name of CEA nor the names of its contributors may be used to +* endorse or promote products derived from this software without specific +* prior written permission. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +* THE SOFTWARE. +******************************************************************************/ + +/** \file paraconf.h for deactivation + */ + +#ifndef PARACONF_H_ +#define PARACONF_H__H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** \addtogroup error + * \{ + */ + + typedef struct PC_tree_s { } PC_tree_t; + struct _IO_FILE; + typedef struct _IO_FILE FILE; + static inline PC_tree_t PC_parse_string(const char* document) { + PC_tree_t mock = {}; + return mock; + } + static inline PC_tree_t PC_parse_file(FILE *file) { + PC_tree_t mock = {}; + return mock; + } + +#ifdef __cplusplus +} // extern C +#endif + +#endif // PARACONF_H_ \ No newline at end of file diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index e0561f572..9fd96ce04 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -57,7 +57,7 @@ // #if defined __has_include // #if __has_include() -// #include +#include // #endif // #endif @@ -173,21 +173,27 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) // #endif // // #endif -#if defined(__has_include) - #if __has_include() - #warning "INCLUDE" - #include - #else - #warning "MOCK" - typedef struct PC_tree_s { } PC_tree_t; - static inline PC_tree_t PC_parse_string(const char* document) { - PC_tree_t mock = {}; - return mock; - } - #endif -#else -#warning "ELSE" -#endif +// #if defined(__has_include) +// #if __has_include() +// #warning "INCLUDE" +// #include +// #else +// #warning "MOCK" +// typedef struct PC_tree_s { } PC_tree_t; +// struct _IO_FILE; +// typedef struct _IO_FILE FILE; +// static inline PC_tree_t PC_parse_string(const char* document) { +// PC_tree_t mock = {}; +// return mock; +// } +// static inline PC_tree_t PC_parse_file(FILE *file) { +// PC_tree_t mock = {}; +// return mock; +// } +// #endif +// #else +// #warning "ELSE" +// #endif static inline PDI_status_t PDI_init(PC_tree_t conf) { diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 839dfbe78..ec218e498 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -41,6 +41,8 @@ option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") if(BUILD_WITHOUT_PDI) message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") + if(NOT BUILD_WITH_PARACONF) + target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") add_library(PDI_C INTERFACE) target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") @@ -77,21 +79,22 @@ add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOUR endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") -option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) -if(BUILD_WITH_PARACONF) - message(WARNING "Building with Paraconf") - find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -endif() +# option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) +# if(BUILD_WITH_PARACONF) +# message(WARNING "Building with Paraconf") +# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +# endif() add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_07_main_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) -if(BUILD_WITH_PARACONF) - target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) -else() - target_link_libraries(test_07_main_C PDI::PDI_C) -endif() +# if(BUILD_WITH_PARACONF) +# target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) +# else() +# target_link_libraries(test_07_main_C PDI::PDI_C) +# endif() +target_link_libraries(test_07_main_C PDI::PDI_C) add_test(NAME test_07_main_C COMMAND "$") add_executable(test_07_main_CXX test_07_main.cpp) @@ -101,9 +104,10 @@ target_compile_options(test_07_main_CXX PRIVATE set_target_properties(test_07_main_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_07_main_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_07_main_CXX PROPERTIES LINKER_LANGUAGE CXX) -if(BUILD_WITH_PARACONF) - target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) -else() - target_link_libraries(test_07_main_CXX PDI::PDI_C) -endif() +# if(BUILD_WITH_PARACONF) +# target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) +# else() +# target_link_libraries(test_07_main_CXX PDI::PDI_C) +# endif() +target_link_libraries(test_07_main_CXX PDI::PDI_C) add_test(NAME test_07_main_CXX COMMAND "$") From 66668bf702b4734d41c571b336c0cce9d5f1b7ff Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 13:40:48 +0200 Subject: [PATCH 184/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 79 --- bin/build_and_run_all_tests | 50 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 77cd21486..03f755a87 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -120,38 +120,38 @@ fi -# Configure, build & test for pdi, with Paraconf +# # Configure, build & test for pdi, with Paraconf -cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +# cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -echo "############ 1" +# echo "############ 1" -# Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf +# # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf -if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command - RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" - echo "PARACONF_DIR: " - PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") +# if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command +# RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" +# echo "PARACONF_DIR: " +# PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") - cd "${TEST_DIR_API}" - RELATIVE_MODULE_PATH="no-pdi" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" - make ${MAKEFLAGS} - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C - rm -rf CMakeCache.txt CMakeFiles/ +# cd "${TEST_DIR_API}" +# RELATIVE_MODULE_PATH="no-pdi" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C +# rm -rf CMakeCache.txt CMakeFiles/ - echo "############ 2" +# echo "############ 2" - cd "${TEST_DIR_NO_PDI}" - NO_PDI_TESTS="test_07_main_C test_07_main_CXX" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" - make ${MAKEFLAGS} - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -else - echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." -fi +# cd "${TEST_DIR_NO_PDI}" +# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +# make ${MAKEFLAGS} +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +# else +# echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." +# fi echo "############ 3" From 31132705c4ecae248c2a2cf09e6418699ed1c32f Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 13:42:41 +0200 Subject: [PATCH 185/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 80 --- tests/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ec218e498..95348c78f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -43,6 +43,7 @@ if(BUILD_WITHOUT_PDI) message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") if(NOT BUILD_WITH_PARACONF) target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") + endif() include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") add_library(PDI_C INTERFACE) target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") From 15b4c1672efb75c377a0eec9c7af96c2e8aa3f10 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 13:49:46 +0200 Subject: [PATCH 186/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 81 --- tests/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 95348c78f..77b7dff44 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -36,16 +36,14 @@ include(CTest) option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) - -option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") if(BUILD_WITHOUT_PDI) + add_library(PDI_C INTERFACE) message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") if(NOT BUILD_WITH_PARACONF) target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") endif() include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") - add_library(PDI_C INTERFACE) target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") add_library(PDI::PDI_C ALIAS PDI_C) else() From d2d9c36d4b6b1a6b48c8bf67487061a83e7708ea Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 13:53:20 +0200 Subject: [PATCH 187/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 82 --- bin/build_and_run_all_tests | 50 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 03f755a87..77cd21486 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -120,38 +120,38 @@ fi -# # Configure, build & test for pdi, with Paraconf +# Configure, build & test for pdi, with Paraconf -# cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make ${MAKEFLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -# echo "############ 1" +echo "############ 1" -# # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf +# Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf -# if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command -# RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" -# echo "PARACONF_DIR: " -# PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") +if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command + RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" + echo "PARACONF_DIR: " + PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") -# cd "${TEST_DIR_API}" -# RELATIVE_MODULE_PATH="no-pdi" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C -# rm -rf CMakeCache.txt CMakeFiles/ + cd "${TEST_DIR_API}" + RELATIVE_MODULE_PATH="no-pdi" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + make ${MAKEFLAGS} + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C + rm -rf CMakeCache.txt CMakeFiles/ -# echo "############ 2" + echo "############ 2" -# cd "${TEST_DIR_NO_PDI}" -# NO_PDI_TESTS="test_07_main_C test_07_main_CXX" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -# else -# echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." -# fi + cd "${TEST_DIR_NO_PDI}" + NO_PDI_TESTS="test_07_main_C test_07_main_CXX" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" + make ${MAKEFLAGS} + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +else + echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." +fi echo "############ 3" From b6b5ff5c18ce8ba4bd4a14fa7f6cfdbbe44d7d79 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 14:04:29 +0200 Subject: [PATCH 188/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 83 --- no-paraconf/include/paraconf.h | 24 ++++++++++++------------ tests/CMakeLists.txt | 4 ++++ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/no-paraconf/include/paraconf.h b/no-paraconf/include/paraconf.h index e36c5ad8b..eccef7b03 100644 --- a/no-paraconf/include/paraconf.h +++ b/no-paraconf/include/paraconf.h @@ -36,20 +36,20 @@ extern "C" { * \{ */ - typedef struct PC_tree_s { } PC_tree_t; - struct _IO_FILE; - typedef struct _IO_FILE FILE; - static inline PC_tree_t PC_parse_string(const char* document) { - PC_tree_t mock = {}; - return mock; - } - static inline PC_tree_t PC_parse_file(FILE *file) { - PC_tree_t mock = {}; - return mock; - } +typedef struct PC_tree_s { } PC_tree_t; +struct _IO_FILE; +typedef struct _IO_FILE FILE; +static inline PC_tree_t PC_parse_string(const char* document) { + PC_tree_t mock = {}; + return mock; +} +static inline PC_tree_t PC_parse_file(FILE *file) { + PC_tree_t mock = {}; + return mock; +} #ifdef __cplusplus } // extern C #endif -#endif // PARACONF_H_ \ No newline at end of file +#endif // PARACONF_H_ diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 77b7dff44..2e3d1d600 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -37,11 +37,15 @@ include(CTest) option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") +message(WARNING "BUILD_WITH_PARACONF: ${BUILD_WITH_PARACONF}") if(BUILD_WITHOUT_PDI) add_library(PDI_C INTERFACE) message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") if(NOT BUILD_WITH_PARACONF) target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") + else() + message(WARNING "Building with Paraconf") + find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) endif() include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") From 38b7ae6b9e9b5e71ef481a4804c7c7f93055d99d Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 14:04:50 +0200 Subject: [PATCH 189/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 84 --- tests/CMakeLists.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2e3d1d600..6ed401086 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -92,12 +92,12 @@ add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_07_main_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) -# if(BUILD_WITH_PARACONF) -# target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) -# else() -# target_link_libraries(test_07_main_C PDI::PDI_C) -# endif() -target_link_libraries(test_07_main_C PDI::PDI_C) +if(BUILD_WITH_PARACONF) + target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) +else() + target_link_libraries(test_07_main_C PDI::PDI_C) +endif() +# target_link_libraries(test_07_main_C PDI::PDI_C) add_test(NAME test_07_main_C COMMAND "$") add_executable(test_07_main_CXX test_07_main.cpp) @@ -107,10 +107,10 @@ target_compile_options(test_07_main_CXX PRIVATE set_target_properties(test_07_main_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_07_main_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_07_main_CXX PROPERTIES LINKER_LANGUAGE CXX) -# if(BUILD_WITH_PARACONF) -# target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) -# else() -# target_link_libraries(test_07_main_CXX PDI::PDI_C) -# endif() -target_link_libraries(test_07_main_CXX PDI::PDI_C) +if(BUILD_WITH_PARACONF) + target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) +else() + target_link_libraries(test_07_main_CXX PDI::PDI_C) +endif() +# target_link_libraries(test_07_main_CXX PDI::PDI_C) add_test(NAME test_07_main_CXX COMMAND "$") From 31050c4a9249beead1a8a6123cb9af4dde0f01d9 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 14:52:28 +0200 Subject: [PATCH 190/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 85 --- tests/CMakeLists.txt | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6ed401086..9bc83b803 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -43,6 +43,10 @@ if(BUILD_WITHOUT_PDI) message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") if(NOT BUILD_WITH_PARACONF) target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") + add_library(paraconf INTERFACE) + add_library(paraconf::paraconf ALIAS paraconf) + target_include_directories(paraconf INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") + target_link_libraries(PDI_C INTERFACE paraconf::paraconf) else() message(WARNING "Building with Paraconf") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) @@ -53,6 +57,15 @@ if(BUILD_WITHOUT_PDI) else() message(WARNING "Using find_package for PDI by default") find_package(PDI REQUIRED COMPONENTS C) + + message(WARNING "Using if(NOT BUILD_WITH_PARACONF)") + if(NOT BUILD_WITH_PARACONF) + target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") + else() + message(WARNING "Building with Paraconf") + find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) + target_link_libraries(PDI::PDI_C INTERFACE paraconf::paraconf) + endif() endif() if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") @@ -92,12 +105,12 @@ add_executable(test_07_main_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_07_main_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) -if(BUILD_WITH_PARACONF) - target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) -else() - target_link_libraries(test_07_main_C PDI::PDI_C) -endif() -# target_link_libraries(test_07_main_C PDI::PDI_C) +# if(BUILD_WITH_PARACONF) +# target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) +# else() +# target_link_libraries(test_07_main_C PDI::PDI_C) +# endif() +target_link_libraries(test_07_main_C PDI::PDI_C) add_test(NAME test_07_main_C COMMAND "$") add_executable(test_07_main_CXX test_07_main.cpp) @@ -107,10 +120,10 @@ target_compile_options(test_07_main_CXX PRIVATE set_target_properties(test_07_main_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_07_main_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_07_main_CXX PROPERTIES LINKER_LANGUAGE CXX) -if(BUILD_WITH_PARACONF) - target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) -else() - target_link_libraries(test_07_main_CXX PDI::PDI_C) -endif() -# target_link_libraries(test_07_main_CXX PDI::PDI_C) +# if(BUILD_WITH_PARACONF) +# target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) +# else() +# target_link_libraries(test_07_main_CXX PDI::PDI_C) +# endif() +target_link_libraries(test_07_main_CXX PDI::PDI_C) add_test(NAME test_07_main_CXX COMMAND "$") From ea20ff5c1b54ff36a7da355dec689baa9a9044ff Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 15:00:17 +0200 Subject: [PATCH 191/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 86 --- no-paraconf/include/paraconf.h | 10 +++++++--- tests/CMakeLists.txt | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/no-paraconf/include/paraconf.h b/no-paraconf/include/paraconf.h index eccef7b03..e25eab888 100644 --- a/no-paraconf/include/paraconf.h +++ b/no-paraconf/include/paraconf.h @@ -36,14 +36,18 @@ extern "C" { * \{ */ -typedef struct PC_tree_s { } PC_tree_t; +typedef struct PC_tree_s { + } PC_tree_t; struct _IO_FILE; typedef struct _IO_FILE FILE; -static inline PC_tree_t PC_parse_string(const char* document) { + +static inline PC_tree_t PC_parse_string(const char* document) +{ PC_tree_t mock = {}; return mock; } -static inline PC_tree_t PC_parse_file(FILE *file) { +static inline PC_tree_t PC_parse_file(FILE *file) +{ PC_tree_t mock = {}; return mock; } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9bc83b803..beae7c4b2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -64,7 +64,7 @@ else() else() message(WARNING "Building with Paraconf") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - target_link_libraries(PDI::PDI_C INTERFACE paraconf::paraconf) + target_link_libraries(PDI_C INTERFACE paraconf::paraconf) endif() endif() From 6d6821116d6ab9c9e91f29ac23388c7d2d8d2f1e Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 15:15:12 +0200 Subject: [PATCH 192/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 87 --- bin/build_and_run_all_tests | 2 ++ no-paraconf/include/paraconf.h | 3 ++- tests/CMakeLists.txt | 7 ++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 77cd21486..514e2aea5 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -148,6 +148,8 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => NO_PDI_TESTS="test_07_main_C test_07_main_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} + ls . + ldd test_07_main_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} else echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." diff --git a/no-paraconf/include/paraconf.h b/no-paraconf/include/paraconf.h index e25eab888..53d0ddfbd 100644 --- a/no-paraconf/include/paraconf.h +++ b/no-paraconf/include/paraconf.h @@ -37,7 +37,7 @@ extern "C" { */ typedef struct PC_tree_s { - } PC_tree_t; +} PC_tree_t; struct _IO_FILE; typedef struct _IO_FILE FILE; @@ -46,6 +46,7 @@ static inline PC_tree_t PC_parse_string(const char* document) PC_tree_t mock = {}; return mock; } + static inline PC_tree_t PC_parse_file(FILE *file) { PC_tree_t mock = {}; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index beae7c4b2..ea426fa48 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -42,13 +42,14 @@ if(BUILD_WITHOUT_PDI) add_library(PDI_C INTERFACE) message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") if(NOT BUILD_WITH_PARACONF) + message(WARNING "Using mock Paraconf") target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") add_library(paraconf INTERFACE) add_library(paraconf::paraconf ALIAS paraconf) target_include_directories(paraconf INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") target_link_libraries(PDI_C INTERFACE paraconf::paraconf) else() - message(WARNING "Building with Paraconf") + message(WARNING "Using true Paraconf") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) endif() include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") @@ -58,11 +59,11 @@ else() message(WARNING "Using find_package for PDI by default") find_package(PDI REQUIRED COMPONENTS C) - message(WARNING "Using if(NOT BUILD_WITH_PARACONF)") if(NOT BUILD_WITH_PARACONF) + message(WARNING "Using if(NOT BUILD_WITH_PARACONF), using NO-PARACONF") target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") else() - message(WARNING "Building with Paraconf") + message(WARNING "Building with (true ?) Paraconf") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) target_link_libraries(PDI_C INTERFACE paraconf::paraconf) endif() From da9c288ccfe1379b320ebd2ebbfdd849a63981b2 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 15:25:59 +0200 Subject: [PATCH 193/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 88 --- bin/build_and_run_all_tests | 10 ++++++---- no-paraconf/include/paraconf.h | 2 +- tests/CMakeLists.txt | 30 +++++++++++++++--------------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 514e2aea5..ef7ba3563 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -139,17 +139,19 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => RELATIVE_MODULE_PATH="no-pdi" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} + ls . + ldd PDI_example_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C rm -rf CMakeCache.txt CMakeFiles/ echo "############ 2" cd "${TEST_DIR_NO_PDI}" - NO_PDI_TESTS="test_07_main_C test_07_main_CXX" + NO_PDI_TESTS="test_07_C test_07_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} ls . - ldd test_07_main_C + ldd test_07_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} else echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." @@ -160,10 +162,10 @@ echo "############ 3" # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf cd "${TEST_DIR_API}" -NO_PDI_TESTS="test_07_main_C test_07_main_CXX" +NO_PDI_TESTS="test_07_C test_07_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} ls . -ldd test_07_main_C +ldd test_07_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/no-paraconf/include/paraconf.h b/no-paraconf/include/paraconf.h index 53d0ddfbd..dd39c6a71 100644 --- a/no-paraconf/include/paraconf.h +++ b/no-paraconf/include/paraconf.h @@ -47,7 +47,7 @@ static inline PC_tree_t PC_parse_string(const char* document) return mock; } -static inline PC_tree_t PC_parse_file(FILE *file) +static inline PC_tree_t PC_parse_file(FILE* file) { PC_tree_t mock = {}; return mock; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ea426fa48..d92552b5a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -102,29 +102,29 @@ endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) # endif() -add_executable(test_07_main_C test_07_main.c) +add_executable(test_07_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") -target_compile_options(test_07_main_C PRIVATE +target_compile_options(test_07_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) # if(BUILD_WITH_PARACONF) -# target_link_libraries(test_07_main_C paraconf::paraconf PDI::PDI_C) +# target_link_libraries(test_07_C paraconf::paraconf PDI::PDI_C) # else() -# target_link_libraries(test_07_main_C PDI::PDI_C) +# target_link_libraries(test_07_C PDI::PDI_C) # endif() -target_link_libraries(test_07_main_C PDI::PDI_C) -add_test(NAME test_07_main_C COMMAND "$") +target_link_libraries(test_07_C PDI::PDI_C) +add_test(NAME test_07_C COMMAND "$") -add_executable(test_07_main_CXX test_07_main.cpp) +add_executable(test_07_CXX test_07_main.cpp) set(BUILD_FLAGS_FOR_CXX "-Wall") -target_compile_options(test_07_main_CXX PRIVATE +target_compile_options(test_07_CXX PRIVATE $<$:${BUILD_FLAGS_FOR_CXX}>) -set_target_properties(test_07_main_CXX PROPERTIES CXX_STANDARD 11) -set_target_properties(test_07_main_CXX PROPERTIES LANGUAGE CXX) -set_target_properties(test_07_main_CXX PROPERTIES LINKER_LANGUAGE CXX) +set_target_properties(test_07_CXX PROPERTIES CXX_STANDARD 11) +set_target_properties(test_07_CXX PROPERTIES LANGUAGE CXX) +set_target_properties(test_07_CXX PROPERTIES LINKER_LANGUAGE CXX) # if(BUILD_WITH_PARACONF) -# target_link_libraries(test_07_main_CXX paraconf::paraconf PDI::PDI_C) +# target_link_libraries(test_07_CXX paraconf::paraconf PDI::PDI_C) # else() -# target_link_libraries(test_07_main_CXX PDI::PDI_C) +# target_link_libraries(test_07_CXX PDI::PDI_C) # endif() -target_link_libraries(test_07_main_CXX PDI::PDI_C) -add_test(NAME test_07_main_CXX COMMAND "$") +target_link_libraries(test_07_CXX PDI::PDI_C) +add_test(NAME test_07_CXX COMMAND "$") From 61588f6423bef3e7d6d0be99d74109d4c0aa7c90 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 15:46:37 +0200 Subject: [PATCH 194/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 89 --- bin/build_and_run_all_tests | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index ef7ba3563..13d1bb7d6 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -130,6 +130,8 @@ echo "############ 1" # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf +ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' +echo "if paraconf" if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" echo "PARACONF_DIR: " @@ -139,7 +141,6 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => RELATIVE_MODULE_PATH="no-pdi" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} - ls . ldd PDI_example_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C rm -rf CMakeCache.txt CMakeFiles/ @@ -150,7 +151,6 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => NO_PDI_TESTS="test_07_C test_07_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} - ls . ldd test_07_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} else @@ -166,6 +166,5 @@ NO_PDI_TESTS="test_07_C test_07_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} -ls . ldd test_07_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From e1adc8f8c56c33fb51ee964eddb7cf7684385240 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 15:47:30 +0200 Subject: [PATCH 195/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 90 --- bin/build_and_run_all_tests | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 13d1bb7d6..bce114080 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -124,6 +124,7 @@ fi cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} +ls . ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} echo "############ 1" From 1540e4240719e431b90ef2dc2ba7dd9af4c35fc5 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 16:01:28 +0200 Subject: [PATCH 196/372] Account for Paraconf availability; missing no-paraconf mock for PDI_init 91 --- bin/build_and_run_all_tests | 7 ++++--- pdi/docs/Using_PDI.md | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index bce114080..4267c5cc7 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -131,9 +131,10 @@ echo "############ 1" # Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf -ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' +ls "PDI_TESTS/src/PDI_TESTS_pkg-build/" +ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 =>' echo "if paraconf" -if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command +if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" echo "PARACONF_DIR: " PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") @@ -144,7 +145,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_05_C" | grep 'libparaconf.so.1 => make ${MAKEFLAGS} ldd PDI_example_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C - rm -rf CMakeCache.txt CMakeFiles/ + rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile echo "############ 2" diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 5160a510d..f4a36fff0 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -137,7 +137,7 @@ to compile with an added argument pointing to this no-pdi folder using a full pa Use a CMakeLists.txt similar to example/CMakeLists.txt, then use the following: ```bash -cmake . -DCMAKE_MODULE_PATH="////pdi/no-pdi/cmake" +cmake . -DCMAKE_PREFIX_PATH="////pdi/no-pdi/cmake" ``` You may also need an option `-DBUILD_WITH_PARACONF` if your code uses more than `PDI_init`, and you want to be able to use an From 0a6f5038716781ac4a8df4a8d7b3c0c6723bfc65 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 24 Jul 2025 16:49:25 +0200 Subject: [PATCH 197/372] Account for Paraconf availability; cleaning 5 --- CMakeLists.txt | 2 -- bin/build_and_run_all_tests | 17 ++++++++--------- example/CMakeLists.txt | 10 ++++------ no-pdi/CMakeLists.txt | 2 -- pdi/CMakeLists.txt | 2 -- pdi/docs/Using_PDI.md | 25 +++++-------------------- tests/CMakeLists.txt | 2 +- 7 files changed, 18 insertions(+), 42 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a8af55d14..ef2c1cbee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,8 +34,6 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI_DIST LANGUAGES C CXX) -message(WARNING "ici pdi: ${CMAKE_CURRENT_LIST_DIR}") - ### Build options ## Global options diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 4267c5cc7..dec7557fb 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -127,13 +127,10 @@ make ${MAKEFLAGS} ls . ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -echo "############ 1" +echo "############ tests pdi/paraconf done" -# Configure, build & test for no-pdi's specific tests with CMAKE_MODULE_PATH, with Paraconf +# Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf -ls "PDI_TESTS/src/PDI_TESTS_pkg-build/" -ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 =>' -echo "if paraconf" if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" echo "PARACONF_DIR: " @@ -147,7 +144,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 => ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile - echo "############ 2" + echo "############ example no-pdi/paraconf done" cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_C test_07_CXX" @@ -156,12 +153,12 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 => ldd test_07_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} else - echo "Paraconf is not available, skipping no-pdi's specific tests with CMAKE_MODULE_PATH." + echo "Paraconf is not available, skipping no-pdi's specific tests with paraconf (through CMAKE_MODULE_PATH)." fi -echo "############ 3" +echo "############ test-api no-pdi/paraconf done" -# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI, without Paraconf +# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf cd "${TEST_DIR_API}" NO_PDI_TESTS="test_07_C test_07_CXX" @@ -170,3 +167,5 @@ cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF make ${MAKEFLAGS} ldd test_07_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} + +echo "############ test-api no-pdi/no-paraconf done" diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 5428a59e3..6f4102935 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -31,8 +31,6 @@ cmake_minimum_required(VERSION 3.16...3.29) project(pdi_examples LANGUAGES C) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") -message(WARNING "ici example: ${CMAKE_CURRENT_LIST_DIR}") - set(MPI_COMPONENTS C) set(PDI_COMPONENTS C) @@ -77,18 +75,18 @@ end module endif() endif() -option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) +option(BUILD_WITH_PARACONF "Build with Paraconf using find_package" OFF) if(BUILD_WITH_PARACONF) - message(WARNING "Building with Paraconf") + message(WARNING "Building with Paraconf using find_package") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) endif() add_executable(PDI_example_C example.c) if(BUILD_WITH_PARACONF) - message(WARNING "PDI_example_C with paraconf") + message(WARNING "PDI_example_C with Paraconf") target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) else() - message(WARNING "PDI_example_C without paraconf") + message(WARNING "PDI_example_C without Paraconf") target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) endif() add_test(NAME PDI_example_C COMMAND "${MPIEXEC}" "${MPIEXEC_NUMPROC_FLAG}" 3 ${MPIEXEC_PREFLAGS} "$" ${MPIEXEC_POSTFLAGS} "${CMAKE_CURRENT_SOURCE_DIR}/pluginless.yml") diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index 254a3c0b5..42b11fbc9 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -30,6 +30,4 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES C CXX) -message(WARNING "ici no-pdi: ${CMAKE_CURRENT_LIST_DIR}") - include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake") diff --git a/pdi/CMakeLists.txt b/pdi/CMakeLists.txt index add52a34f..ce1064b30 100644 --- a/pdi/CMakeLists.txt +++ b/pdi/CMakeLists.txt @@ -31,8 +31,6 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES CXX C) list(APPEND CMAKE_MODULE_PATH "${PDI_SOURCE_DIR}/cmake") -message(WARNING "ici pdi/pdi: ${CMAKE_CURRENT_LIST_DIR}") - # Version file(READ VERSION PDI_VERSION) diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index f4a36fff0..4ff0f3590 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -104,26 +104,12 @@ You can copy the `no-pdi` folder from PDI in your application repository, and add an option (`BUILD_WITHOUT_PDI` in the example below) to your `CMakeLists.txt` to use this mock folder instead of the real PDI. -In your `CMakeLists.txt`, replace the `find_package(PDI)` with code like the -following one: -```CMake -option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) -if(BUILD_WITHOUT_PDI) - include_directories("////pdi/no-pdi/include") - add_library(PDI_C INTERFACE) - target_include_directories(PDI_C INTERFACE "////pdi/no-pdi/include") - add_library(PDI::PDI_C ALIAS PDI_C) -else() - find_package(PDI REQUIRED) -endif() -``` +In your `CMakeLists.txt`, replace the `find_package(PDI)` with code similar to +the paragraph defining the option `BUILD_WITHOUT_PDI` of `pdi/tests/CMakeLists.txt`. Then you can build your project with this option specified to disable PDI: ```bash cmake . -DBUILD_WITHOUT_PDI=ON ``` -You may also need an option `-DBUILD_WITH_PARACONF` if your code uses more than -`PDI_init`, and you want to be able to use an -already available Paraconf dependency (see `pdi/example/CMakeLists.txt`). This is the preferred method of using no-pdi, as the following may result in a conflict when using a dependency toward Paraconf outside of PDI. @@ -134,13 +120,12 @@ You can refer to `pdi/tests/CMakeLists.txt` for an example. Alternatively, you can use a specific no-pdi folder among your system, to compile with an added argument pointing to this no-pdi folder using a full path. -Use a CMakeLists.txt similar to example/CMakeLists.txt, -then use the following: +Use the following to specify your `no-pdi` location : ```bash cmake . -DCMAKE_PREFIX_PATH="////pdi/no-pdi/cmake" ``` -You may also need an option `-DBUILD_WITH_PARACONF` if your code uses more than -`PDI_init`, and you want to be able to use an +You may also want an option `-DBUILD_WITH_PARACONF` if your code does not uses +more than `PDI_init`, and you want to be able to use an already available Paraconf dependency (see `pdi/example/CMakeLists.txt`). This is not the preferred method of using no-pdi, as it may result in diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d92552b5a..72d4fa885 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -34,7 +34,7 @@ option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) -option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one" OFF) +option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one through " OFF) option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") message(WARNING "BUILD_WITH_PARACONF: ${BUILD_WITH_PARACONF}") From e49d902e98099edab0f9bbc8b0c07f225c30e52a Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 28 Jul 2025 10:11:23 +0200 Subject: [PATCH 198/372] Account for Paraconf availability; refactoring --- bin/build_and_run_all_tests | 4 ++-- example/CMakeLists.txt | 15 +++++-------- pdi/docs/Using_PDI.md | 2 +- tests/CMakeLists.txt | 44 ++++++++++++++----------------------- 4 files changed, 25 insertions(+), 40 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index dec7557fb..6a79e1f10 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -138,7 +138,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 => cd "${TEST_DIR_API}" RELATIVE_MODULE_PATH="no-pdi" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF_FOR_NO_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ldd PDI_example_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C @@ -148,7 +148,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 => cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_C test_07_CXX" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF_FOR_NO_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} ldd test_07_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 6f4102935..db772e524 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -75,18 +75,15 @@ end module endif() endif() -option(BUILD_WITH_PARACONF "Build with Paraconf using find_package" OFF) -if(BUILD_WITH_PARACONF) - message(WARNING "Building with Paraconf using find_package") - find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -endif() - add_executable(PDI_example_C example.c) -if(BUILD_WITH_PARACONF) - message(WARNING "PDI_example_C with Paraconf") +option(BUILD_WITH_PARACONF_FOR_NO_PDI "Build with Paraconf using find_package" OFF) +if(BUILD_WITH_PARACONF_FOR_NO_PDI) + message(WARNING "Building with Paraconf using find_package, for no-PDI") + find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) + message(WARNING "PDI_example_C with Paraconf using target_link_libraries") target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) else() - message(WARNING "PDI_example_C without Paraconf") + message(WARNING "PDI_example_C without Paraconf using target_link_libraries") target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) endif() add_test(NAME PDI_example_C COMMAND "${MPIEXEC}" "${MPIEXEC_NUMPROC_FLAG}" 3 ${MPIEXEC_PREFLAGS} "$" ${MPIEXEC_POSTFLAGS} "${CMAKE_CURRENT_SOURCE_DIR}/pluginless.yml") diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 4ff0f3590..9c0e447ea 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -124,7 +124,7 @@ Use the following to specify your `no-pdi` location : ```bash cmake . -DCMAKE_PREFIX_PATH="////pdi/no-pdi/cmake" ``` -You may also want an option `-DBUILD_WITH_PARACONF` if your code does not uses +You may also want an option `-DBUILD_WITH_PARACONF_FOR_NO_PDI` if your code does not uses more than `PDI_init`, and you want to be able to use an already available Paraconf dependency (see `pdi/example/CMakeLists.txt`). diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 72d4fa885..05312f59b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -35,13 +35,13 @@ option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one through " OFF) -option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) +option(BUILD_WITH_PARACONF_FOR_NO_PDI "Build with the Paraconf embedded in local no-PDI" OFF) message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") -message(WARNING "BUILD_WITH_PARACONF: ${BUILD_WITH_PARACONF}") +message(WARNING "BUILD_WITH_PARACONF_FOR_NO_PDI: ${BUILD_WITH_PARACONF_FOR_NO_PDI}") if(BUILD_WITHOUT_PDI) add_library(PDI_C INTERFACE) message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") - if(NOT BUILD_WITH_PARACONF) + if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI) message(WARNING "Using mock Paraconf") target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") add_library(paraconf INTERFACE) @@ -53,20 +53,24 @@ if(BUILD_WITHOUT_PDI) find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) endif() include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") - target_include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") + include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") add_library(PDI::PDI_C ALIAS PDI_C) else() message(WARNING "Using find_package for PDI by default") find_package(PDI REQUIRED COMPONENTS C) - if(NOT BUILD_WITH_PARACONF) - message(WARNING "Using if(NOT BUILD_WITH_PARACONF), using NO-PARACONF") - target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") - else() - message(WARNING "Building with (true ?) Paraconf") - find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - target_link_libraries(PDI_C INTERFACE paraconf::paraconf) - endif() + # if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI) + # message(WARNING "Using if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI), using NO-PARACONF") + # target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") + # else() + # message(WARNING "Building with true Paraconf") + # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) + # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) + # endif() + message(WARNING "Building with true Paraconf") + find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) + # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) + target_link_libraries(PDI_C PDI::PDI_C) endif() if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") @@ -96,21 +100,10 @@ add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOUR endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") -# option(BUILD_WITH_PARACONF "Build with Paraconf" OFF) -# if(BUILD_WITH_PARACONF) -# message(WARNING "Building with Paraconf") -# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -# endif() - add_executable(test_07_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_07_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) -# if(BUILD_WITH_PARACONF) -# target_link_libraries(test_07_C paraconf::paraconf PDI::PDI_C) -# else() -# target_link_libraries(test_07_C PDI::PDI_C) -# endif() target_link_libraries(test_07_C PDI::PDI_C) add_test(NAME test_07_C COMMAND "$") @@ -121,10 +114,5 @@ target_compile_options(test_07_CXX PRIVATE set_target_properties(test_07_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_07_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_07_CXX PROPERTIES LINKER_LANGUAGE CXX) -# if(BUILD_WITH_PARACONF) -# target_link_libraries(test_07_CXX paraconf::paraconf PDI::PDI_C) -# else() -# target_link_libraries(test_07_CXX PDI::PDI_C) -# endif() target_link_libraries(test_07_CXX PDI::PDI_C) add_test(NAME test_07_CXX COMMAND "$") From 2fd9df10c441304c76e76361f474e95794a13e41 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 28 Jul 2025 10:31:05 +0200 Subject: [PATCH 199/372] Account for Paraconf availability; refactoring 2 --- tests/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 05312f59b..d9b6cb587 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -70,7 +70,8 @@ else() message(WARNING "Building with true Paraconf") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) - target_link_libraries(PDI_C PDI::PDI_C) + # target_link_libraries(PDI_C PDI::PDI_C) + target_link_libraries(PDI_C INTERFACE) endif() if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") From 52eb0c61f40013d5139d471d6a10638b25c48e70 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 28 Jul 2025 10:38:20 +0200 Subject: [PATCH 200/372] Account for Paraconf availability; refactoring 3 --- tests/CMakeLists.txt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d9b6cb587..1d027f6f8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -59,19 +59,19 @@ else() message(WARNING "Using find_package for PDI by default") find_package(PDI REQUIRED COMPONENTS C) - # if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI) - # message(WARNING "Using if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI), using NO-PARACONF") - # target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") - # else() - # message(WARNING "Building with true Paraconf") - # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) - # endif() - message(WARNING "Building with true Paraconf") - find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) - # target_link_libraries(PDI_C PDI::PDI_C) - target_link_libraries(PDI_C INTERFACE) + # # if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI) + # # message(WARNING "Using if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI), using NO-PARACONF") + # # target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") + # # else() + # # message(WARNING "Building with true Paraconf") + # # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) + # # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) + # # endif() + # message(WARNING "Building with true Paraconf") + # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) + # # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) + # # target_link_libraries(PDI_C PDI::PDI_C) + # target_link_libraries(PDI_C INTERFACE) endif() if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") From 85a35f3231189020bec7a97c71423c69b5549536 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 28 Jul 2025 11:01:37 +0200 Subject: [PATCH 201/372] Account for Paraconf availability; refactoring 4 --- tests/CMakeLists.txt | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1d027f6f8..3aaf6d620 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -42,31 +42,36 @@ if(BUILD_WITHOUT_PDI) add_library(PDI_C INTERFACE) message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI) - message(WARNING "Using mock Paraconf") + message(WARNING "Using NO-PARACONF, for NO-PDI through include_directories") target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") add_library(paraconf INTERFACE) add_library(paraconf::paraconf ALIAS paraconf) target_include_directories(paraconf INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") target_link_libraries(PDI_C INTERFACE paraconf::paraconf) else() - message(WARNING "Using true Paraconf") + message(WARNING "Using PARACONF, for NO-PDI through include_directories") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) endif() include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") add_library(PDI::PDI_C ALIAS PDI_C) else() - message(WARNING "Using find_package for PDI by default") + message(WARNING "Using find_package for PDI (whether PDI or NO-PDI)") find_package(PDI REQUIRED COMPONENTS C) - # # if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI) - # # message(WARNING "Using if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI), using NO-PARACONF") - # # target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") - # # else() - # # message(WARNING "Building with true Paraconf") - # # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - # # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) - # # endif() + # if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI) + # message(WARNING "Using NO-PARACONF, meant for NO-PDI (not PDI) through include_directories") + # target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") + # else() + # message(WARNING "Using PARACONF, for PDI or NO-PDI through find_package") + # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) + # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) + # endif() + + message(WARNING "Using PARACONF, for PDI or NO-PDI through find_package") + find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) + target_link_libraries(PDI_C INTERFACE paraconf::paraconf) + # message(WARNING "Building with true Paraconf") # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) # # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) From 1413e6b94a1604b000e312209c6f7cd26f46bb93 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 28 Jul 2025 11:13:56 +0200 Subject: [PATCH 202/372] Account for Paraconf availability; refactoring 5 --- tests/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3aaf6d620..9166bdd14 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -48,14 +48,14 @@ if(BUILD_WITHOUT_PDI) add_library(paraconf::paraconf ALIAS paraconf) target_include_directories(paraconf INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") target_link_libraries(PDI_C INTERFACE paraconf::paraconf) - else() + else() # This case is never reached in the tests, as this method of using NO-PDI is made to be used when PARACONF is missing. message(WARNING "Using PARACONF, for NO-PDI through include_directories") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) endif() include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") add_library(PDI::PDI_C ALIAS PDI_C) -else() +else() # This case covers boths true PDI and NO-PDI (find_package), when using true PARACONF, as NO-PDI through find_package always uses a true PARACONF. message(WARNING "Using find_package for PDI (whether PDI or NO-PDI)") find_package(PDI REQUIRED COMPONENTS C) @@ -70,7 +70,7 @@ else() message(WARNING "Using PARACONF, for PDI or NO-PDI through find_package") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - target_link_libraries(PDI_C INTERFACE paraconf::paraconf) + # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) # message(WARNING "Building with true Paraconf") # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) From 1afb5b6062adc1a175dfc9b759c082aec9575910 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 28 Jul 2025 11:30:17 +0200 Subject: [PATCH 203/372] Account for Paraconf availability; refactoring 6 --- bin/build_and_run_all_tests | 1 + example/CMakeLists.txt | 4 ++-- tests/CMakeLists.txt | 22 +++------------------- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 6a79e1f10..23ae7b638 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -34,6 +34,7 @@ set -xe # Make our work dirs + SRCDIR="${PWD}" TEST_DIR="${TEST_DIR:-${PWD}}" diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index db772e524..7b8fa361d 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -77,12 +77,12 @@ endif() add_executable(PDI_example_C example.c) option(BUILD_WITH_PARACONF_FOR_NO_PDI "Build with Paraconf using find_package" OFF) -if(BUILD_WITH_PARACONF_FOR_NO_PDI) +if(BUILD_WITH_PARACONF_FOR_NO_PDI) # This case is reached to enable PARACONF when using NO-PDI. message(WARNING "Building with Paraconf using find_package, for no-PDI") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) message(WARNING "PDI_example_C with Paraconf using target_link_libraries") target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) -else() +else() # This case is reached to enable PARACONF when using PDI. message(WARNING "PDI_example_C without Paraconf using target_link_libraries") target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) endif() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9166bdd14..43c89f026 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -48,35 +48,19 @@ if(BUILD_WITHOUT_PDI) add_library(paraconf::paraconf ALIAS paraconf) target_include_directories(paraconf INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") target_link_libraries(PDI_C INTERFACE paraconf::paraconf) - else() # This case is never reached in the tests, as this method of using NO-PDI is made to be used when PARACONF is missing. + else() # This case is never reached in the tests, as this method of using NO-PDI is made to be used when PARACONF is missing. message(WARNING "Using PARACONF, for NO-PDI through include_directories") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) endif() include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") add_library(PDI::PDI_C ALIAS PDI_C) -else() # This case covers boths true PDI and NO-PDI (find_package), when using true PARACONF, as NO-PDI through find_package always uses a true PARACONF. +else() # This case covers boths true PDI and NO-PDI (find_package), when using true PARACONF, as NO-PDI through find_package always uses a true PARACONF. message(WARNING "Using find_package for PDI (whether PDI or NO-PDI)") find_package(PDI REQUIRED COMPONENTS C) - - # if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI) - # message(WARNING "Using NO-PARACONF, meant for NO-PDI (not PDI) through include_directories") - # target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") - # else() - # message(WARNING "Using PARACONF, for PDI or NO-PDI through find_package") - # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) - # endif() - message(WARNING "Using PARACONF, for PDI or NO-PDI through find_package") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) - - # message(WARNING "Building with true Paraconf") - # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - # # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) - # # target_link_libraries(PDI_C PDI::PDI_C) - # target_link_libraries(PDI_C INTERFACE) + target_link_libraries(PDI_C INTERFACE paraconf::paraconf) endif() if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") From a7d1b4806f0c4822e6894fb51f25a515b061aefd Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 28 Jul 2025 13:38:38 +0200 Subject: [PATCH 204/372] Account for Paraconf availability; cleaning 6 --- pdi/docs/Using_PDI.md | 20 ++++++++++++-------- tests/CMakeLists.txt | 6 +++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 9c0e447ea..c2b31ac73 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -100,7 +100,7 @@ plugins in 4 steps (it will use the first plugin found): ### Using the no-pdi included in the currently used pdi repository -You can copy the `no-pdi` folder from PDI in your application repository, and +You can copy the no-pdi folder from PDI in your application repository, and add an option (`BUILD_WITHOUT_PDI` in the example below) to your `CMakeLists.txt` to use this mock folder instead of the real PDI. @@ -110,9 +110,11 @@ Then you can build your project with this option specified to disable PDI: ```bash cmake . -DBUILD_WITHOUT_PDI=ON ``` +This method does not rely on an external dependency to Paraconf, and can only +be used if only the initialisation of PDI calls a Paraconf function. -This is the preferred method of using no-pdi, as the following may result in -a conflict when using a dependency toward Paraconf outside of PDI. +This is the preferred method of using no-pdi, as the next method may results +in a conflict when using a dependency toward Paraconf outside of PDI. You can refer to `pdi/tests/CMakeLists.txt` for an example. ### Using a specific no-pdi through a full path @@ -120,15 +122,17 @@ You can refer to `pdi/tests/CMakeLists.txt` for an example. Alternatively, you can use a specific no-pdi folder among your system, to compile with an added argument pointing to this no-pdi folder using a full path. -Use the following to specify your `no-pdi` location : +Use the following to specify your no-pdi location : ```bash cmake . -DCMAKE_PREFIX_PATH="////pdi/no-pdi/cmake" ``` -You may also want an option `-DBUILD_WITH_PARACONF_FOR_NO_PDI` if your code does not uses -more than `PDI_init`, and you want to be able to use an +You may also want an option `-DBUILD_WITH_PARACONF_FOR_NO_PDI` if your code +uses more than `PDI_init`, and you want to be able to use an already available Paraconf dependency (see `pdi/example/CMakeLists.txt`). +If you do not had this option, similarly to the other no-pdi method, +Paraconf must not be called outside of the initialisation of %PDI -This is not the preferred method of using no-pdi, as it may result in -a conflict when using a dependency toward Paraconf outside of PDI. +This is not the preferred method of using no-pdi, as it may results in +a conflict when using a dependency toward a Paraconf outside of %PDI. %PDI can be re-enabled by reverting those modifications. diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 43c89f026..f04402a9e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -41,21 +41,21 @@ message(WARNING "BUILD_WITH_PARACONF_FOR_NO_PDI: ${BUILD_WITH_PARACONF_FOR_NO_PD if(BUILD_WITHOUT_PDI) add_library(PDI_C INTERFACE) message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") - if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI) + if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI) # This case represents the use of NO-PDI together with its embedded NO-PARACONF. message(WARNING "Using NO-PARACONF, for NO-PDI through include_directories") target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") add_library(paraconf INTERFACE) add_library(paraconf::paraconf ALIAS paraconf) target_include_directories(paraconf INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") target_link_libraries(PDI_C INTERFACE paraconf::paraconf) - else() # This case is never reached in the tests, as this method of using NO-PDI is made to be used when PARACONF is missing. + else() # This case is never reached in the tests, as this method of using NO-PDI is intended to be used when PARACONF is missing. message(WARNING "Using PARACONF, for NO-PDI through include_directories") find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) endif() include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") add_library(PDI::PDI_C ALIAS PDI_C) -else() # This case covers boths true PDI and NO-PDI (find_package), when using true PARACONF, as NO-PDI through find_package always uses a true PARACONF. +else() # This case covers boths PDI and NO-PDI (through find_package), when using PARACONF. message(WARNING "Using find_package for PDI (whether PDI or NO-PDI)") find_package(PDI REQUIRED COMPONENTS C) message(WARNING "Using PARACONF, for PDI or NO-PDI through find_package") From 7ddd06e8d367dfc10f5c4c87afe8ef0a217c424b Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 28 Jul 2025 16:16:54 +0200 Subject: [PATCH 205/372] Without Paraconf consideration --- bin/build_and_run_all_tests | 4 +-- example/CMakeLists.txt | 23 ++++++++------- no-pdi/include/pdi.h | 4 ++- pdi/docs/Using_PDI.md | 4 +-- tests/CMakeLists.txt | 56 ++++++++++++++++++++----------------- tests/test_07_no-pdi.h | 2 ++ 6 files changed, 53 insertions(+), 40 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 23ae7b638..c76579285 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -139,7 +139,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 => cd "${TEST_DIR_API}" RELATIVE_MODULE_PATH="no-pdi" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF_FOR_NO_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ldd PDI_example_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C @@ -149,7 +149,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 => cd "${TEST_DIR_NO_PDI}" NO_PDI_TESTS="test_07_C test_07_CXX" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF_FOR_NO_PDI=ON -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} ldd test_07_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 7b8fa361d..f0b5ef723 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -49,6 +49,7 @@ endif() include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) +find_package(paraconf REQUIRED COMPONENTS ${PDI_COMPONENTS}) #ajout find_library(LIB_M m DOC "The math library") # Default standard in the project is C11 @@ -76,16 +77,18 @@ end module endif() add_executable(PDI_example_C example.c) -option(BUILD_WITH_PARACONF_FOR_NO_PDI "Build with Paraconf using find_package" OFF) -if(BUILD_WITH_PARACONF_FOR_NO_PDI) # This case is reached to enable PARACONF when using NO-PDI. - message(WARNING "Building with Paraconf using find_package, for no-PDI") - find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - message(WARNING "PDI_example_C with Paraconf using target_link_libraries") - target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) -else() # This case is reached to enable PARACONF when using PDI. - message(WARNING "PDI_example_C without Paraconf using target_link_libraries") - target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) -endif() +# option(BUILD_WITH_PARACONF_FOR_NO_PDI "Build with Paraconf using find_package" OFF) +# if(BUILD_WITH_PARACONF_FOR_NO_PDI) # This case is reached to enable PARACONF when using NO-PDI. +# message(WARNING "Building with Paraconf using find_package, for no-PDI") +# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +# message(WARNING "PDI_example_C with Paraconf using target_link_libraries") +# target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) +# else() # This case is reached to enable PARACONF when using PDI. +# message(WARNING "PDI_example_C without Paraconf using target_link_libraries") +# target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) +# endif() +## remonte find_package(paraconf et ajoute target_link_libraries +target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) #ajout add_test(NAME PDI_example_C COMMAND "${MPIEXEC}" "${MPIEXEC_NUMPROC_FLAG}" 3 ${MPIEXEC_PREFLAGS} "$" ${MPIEXEC_POSTFLAGS} "${CMAKE_CURRENT_SOURCE_DIR}/pluginless.yml") set_property(TEST PDI_example_C PROPERTY TIMEOUT 15) set_property(TEST PDI_example_C PROPERTY PROCESSORS 3) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 9fd96ce04..e71389116 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -57,7 +57,7 @@ // #if defined __has_include // #if __has_include() -#include +// #include // #endif // #endif @@ -195,10 +195,12 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) // #warning "ELSE" // #endif +#ifndef PARACONF_H__ static inline PDI_status_t PDI_init(PC_tree_t conf) { return PDI_OK; } +#endif // PARACONF_H__ /** Finalizes PDI * \return an error status diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index c2b31ac73..5158050a1 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -129,8 +129,8 @@ cmake . -DCMAKE_PREFIX_PATH="////pdi/no-pdi/cmake" You may also want an option `-DBUILD_WITH_PARACONF_FOR_NO_PDI` if your code uses more than `PDI_init`, and you want to be able to use an already available Paraconf dependency (see `pdi/example/CMakeLists.txt`). -If you do not had this option, similarly to the other no-pdi method, -Paraconf must not be called outside of the initialisation of %PDI +If you do not add this option, similarly to the other no-pdi method, +Paraconf must not be called outside of the initialisation of %PDI. This is not the preferred method of using no-pdi, as it may results in a conflict when using a dependency toward a Paraconf outside of %PDI. diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f04402a9e..05425fa95 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -34,33 +34,39 @@ option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) -option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one through " OFF) -option(BUILD_WITH_PARACONF_FOR_NO_PDI "Build with the Paraconf embedded in local no-PDI" OFF) -message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") -message(WARNING "BUILD_WITH_PARACONF_FOR_NO_PDI: ${BUILD_WITH_PARACONF_FOR_NO_PDI}") +# option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one through " OFF) +# option(BUILD_WITH_PARACONF_FOR_NO_PDI "Build with the Paraconf embedded in local no-PDI" OFF) +# message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") +# message(WARNING "BUILD_WITH_PARACONF_FOR_NO_PDI: ${BUILD_WITH_PARACONF_FOR_NO_PDI}") +# if(BUILD_WITHOUT_PDI) +# add_library(PDI_C INTERFACE) +# message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") +# if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI) # This case represents the use of NO-PDI together with its embedded NO-PARACONF. +# message(WARNING "Using NO-PARACONF, for NO-PDI through include_directories") +# target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") +# add_library(paraconf INTERFACE) +# add_library(paraconf::paraconf ALIAS paraconf) +# target_include_directories(paraconf INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") +# target_link_libraries(PDI_C INTERFACE paraconf::paraconf) +# else() # This case is never reached in the tests, as this method of using NO-PDI is intended to be used when PARACONF is missing. +# message(WARNING "Using PARACONF, for NO-PDI through include_directories") +# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +# endif() +# include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") +# include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") +# add_library(PDI::PDI_C ALIAS PDI_C) +# else() # This case covers boths PDI and NO-PDI (through find_package), when using PARACONF. +# message(WARNING "Using find_package for PDI (whether PDI or NO-PDI)") +# find_package(PDI REQUIRED COMPONENTS C) +# message(WARNING "Using PARACONF, for PDI or NO-PDI through find_package") +# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +# target_link_libraries(PDI_C INTERFACE paraconf::paraconf) +# endif() + if(BUILD_WITHOUT_PDI) - add_library(PDI_C INTERFACE) - message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") - if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI) # This case represents the use of NO-PDI together with its embedded NO-PARACONF. - message(WARNING "Using NO-PARACONF, for NO-PDI through include_directories") - target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") - add_library(paraconf INTERFACE) - add_library(paraconf::paraconf ALIAS paraconf) - target_include_directories(paraconf INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") - target_link_libraries(PDI_C INTERFACE paraconf::paraconf) - else() # This case is never reached in the tests, as this method of using NO-PDI is intended to be used when PARACONF is missing. - message(WARNING "Using PARACONF, for NO-PDI through include_directories") - find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - endif() - include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") - include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") - add_library(PDI::PDI_C ALIAS PDI_C) -else() # This case covers boths PDI and NO-PDI (through find_package), when using PARACONF. - message(WARNING "Using find_package for PDI (whether PDI or NO-PDI)") + add_subdirectory({CMAKE_CURRENT_LIST_DIR}/../no-pdi no-pdi) +else() find_package(PDI REQUIRED COMPONENTS C) - message(WARNING "Using PARACONF, for PDI or NO-PDI through find_package") - find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - target_link_libraries(PDI_C INTERFACE paraconf::paraconf) endif() if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 15e960a05..df693a8c3 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -116,6 +116,7 @@ void errhandler() int tests(int argc, char* argv[]) { +#ifndef PARACONF_H__ static const char* CONFIG_YAML = "logging: trace \n" "data: \n" @@ -131,6 +132,7 @@ int tests(int argc, char* argv[]) fprintf(stderr, "*** Error: no-pdi initialisation\n"); exit(EXIT_FAILURE); } +#endif // PARACONF_H__ const char* errmsg = PDI_errmsg(); if (strcmp(errmsg, "") != 0) { From f0d8e66fd0000c23c0c488e9ca835a971418a273 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 28 Jul 2025 16:29:27 +0200 Subject: [PATCH 206/372] Without Paraconf consideration 2 --- example/CMakeLists.txt | 1 + tests/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index f0b5ef723..f13a9fd70 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -76,6 +76,7 @@ end module endif() endif() +message(WARNING "PDI_example_C") add_executable(PDI_example_C example.c) # option(BUILD_WITH_PARACONF_FOR_NO_PDI "Build with Paraconf using find_package" OFF) # if(BUILD_WITH_PARACONF_FOR_NO_PDI) # This case is reached to enable PARACONF when using NO-PDI. diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 05425fa95..b758b0d2e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -63,6 +63,7 @@ include(CTest) # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) # endif() +message(WARNING "test-api") if(BUILD_WITHOUT_PDI) add_subdirectory({CMAKE_CURRENT_LIST_DIR}/../no-pdi no-pdi) else() From fe80b8f76680922a320960a8b6743bf6b0645315 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 28 Jul 2025 16:36:30 +0200 Subject: [PATCH 207/372] Without Paraconf consideration 3 --- tests/CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b758b0d2e..1204dddf6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -64,11 +64,12 @@ include(CTest) # endif() message(WARNING "test-api") -if(BUILD_WITHOUT_PDI) - add_subdirectory({CMAKE_CURRENT_LIST_DIR}/../no-pdi no-pdi) -else() - find_package(PDI REQUIRED COMPONENTS C) -endif() +# if(BUILD_WITHOUT_PDI) +# add_subdirectory({CMAKE_CURRENT_LIST_DIR}/../no-pdi no-pdi) +# else() +# find_package(PDI REQUIRED COMPONENTS C) +# endif() +find_package(PDI REQUIRED COMPONENTS C) if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") From 10077f8fcf83a60764f2ae41f00a1e4776057df1 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 28 Jul 2025 16:42:14 +0200 Subject: [PATCH 208/372] Without Paraconf consideration 4 --- tests/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1204dddf6..f982283fa 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -70,6 +70,7 @@ message(WARNING "test-api") # find_package(PDI REQUIRED COMPONENTS C) # endif() find_package(PDI REQUIRED COMPONENTS C) +find_package(paraconf REQUIRED COMPONENTS C) if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") From c8c5131228190049a47f4c1dacd4c8de3c9595c7 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 28 Jul 2025 16:44:32 +0200 Subject: [PATCH 209/372] Without Paraconf consideration 5 --- no-pdi/include/pdi.h | 2 +- tests/test_07_no-pdi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index e71389116..34771f23e 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -195,7 +195,7 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) // #warning "ELSE" // #endif -#ifndef PARACONF_H__ +#ifdef PARACONF_H__ static inline PDI_status_t PDI_init(PC_tree_t conf) { return PDI_OK; diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index df693a8c3..75132c95b 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -116,7 +116,7 @@ void errhandler() int tests(int argc, char* argv[]) { -#ifndef PARACONF_H__ +#ifdef PARACONF_H__ static const char* CONFIG_YAML = "logging: trace \n" "data: \n" From 7cff6d1b5e4aabbad62f32e58978d21d0bc331d9 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 08:23:42 +0200 Subject: [PATCH 210/372] Without Paraconf consideration 6 --- example/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index f13a9fd70..77a8c3da2 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -48,8 +48,8 @@ endif() # Includes include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) -find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) find_package(paraconf REQUIRED COMPONENTS ${PDI_COMPONENTS}) #ajout +find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) find_library(LIB_M m DOC "The math library") # Default standard in the project is C11 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f982283fa..79df8a3ef 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -64,13 +64,15 @@ include(CTest) # endif() message(WARNING "test-api") -# if(BUILD_WITHOUT_PDI) -# add_subdirectory({CMAKE_CURRENT_LIST_DIR}/../no-pdi no-pdi) -# else() -# find_package(PDI REQUIRED COMPONENTS C) -# endif() -find_package(PDI REQUIRED COMPONENTS C) -find_package(paraconf REQUIRED COMPONENTS C) +option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one through " OFF) +if(BUILD_WITHOUT_PDI) + add_subdirectory({CMAKE_CURRENT_LIST_DIR}/../no-pdi no-pdi) +else() + find_package(paraconf REQUIRED COMPONENTS C) + find_package(PDI REQUIRED COMPONENTS C) +endif() +# find_package(PDI REQUIRED COMPONENTS C) +# find_package(paraconf REQUIRED COMPONENTS C) if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") From e46330d3ad146f359c1afaed17279fb5092b1548 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 08:29:45 +0200 Subject: [PATCH 211/372] Without Paraconf consideration 7 --- example/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 77a8c3da2..dff993813 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -48,7 +48,7 @@ endif() # Includes include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) -find_package(paraconf REQUIRED COMPONENTS ${PDI_COMPONENTS}) #ajout +# find_package(paraconf REQUIRED COMPONENTS ${PDI_COMPONENTS}) #ajout find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) find_library(LIB_M m DOC "The math library") From 4e5d297fb79f39f6429b56dc692cd91e5b2571d3 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 08:39:27 +0200 Subject: [PATCH 212/372] Without Paraconf consideration 8 --- tests/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 79df8a3ef..4f08bd90f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -66,7 +66,9 @@ include(CTest) message(WARNING "test-api") option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one through " OFF) if(BUILD_WITHOUT_PDI) - add_subdirectory({CMAKE_CURRENT_LIST_DIR}/../no-pdi no-pdi) + message(WARNING "CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}") + message(WARNING "Using -include- of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/-include-") + add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/../no-pdi" no-pdi) else() find_package(paraconf REQUIRED COMPONENTS C) find_package(PDI REQUIRED COMPONENTS C) From a95da9e6388c82c0dc638d94630900dbd64bed77 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 09:17:19 +0200 Subject: [PATCH 213/372] Without Paraconf consideration 9 --- tests/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4f08bd90f..744fa574b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -63,11 +63,11 @@ include(CTest) # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) # endif() +message(WARNING "CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}") +message(WARNING "Using -include- of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/-include-") message(WARNING "test-api") option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one through " OFF) if(BUILD_WITHOUT_PDI) - message(WARNING "CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}") - message(WARNING "Using -include- of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/-include-") add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/../no-pdi" no-pdi) else() find_package(paraconf REQUIRED COMPONENTS C) From 979ce5b5ca2d26c3aabf6fa70b18e33d1c55eace Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 09:24:32 +0200 Subject: [PATCH 214/372] Without Paraconf consideration 10 --- example/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index dff993813..8d43e7aec 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -89,7 +89,8 @@ add_executable(PDI_example_C example.c) # target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) # endif() ## remonte find_package(paraconf et ajoute target_link_libraries -target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) #ajout +# target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) #ajout +target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) #ajout add_test(NAME PDI_example_C COMMAND "${MPIEXEC}" "${MPIEXEC_NUMPROC_FLAG}" 3 ${MPIEXEC_PREFLAGS} "$" ${MPIEXEC_POSTFLAGS} "${CMAKE_CURRENT_SOURCE_DIR}/pluginless.yml") set_property(TEST PDI_example_C PROPERTY TIMEOUT 15) set_property(TEST PDI_example_C PROPERTY PROCESSORS 3) From eea85392f06763daf6789a9765dc5411d4a12f82 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 09:32:49 +0200 Subject: [PATCH 215/372] Without Paraconf consideration 11 --- example/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 8d43e7aec..45b987285 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -48,8 +48,8 @@ endif() # Includes include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) -# find_package(paraconf REQUIRED COMPONENTS ${PDI_COMPONENTS}) #ajout find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) +find_package(paraconf REQUIRED COMPONENTS ${PDI_COMPONENTS}) #ajout find_library(LIB_M m DOC "The math library") # Default standard in the project is C11 @@ -89,8 +89,8 @@ add_executable(PDI_example_C example.c) # target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) # endif() ## remonte find_package(paraconf et ajoute target_link_libraries -# target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) #ajout -target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) #ajout +target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) #ajout +# target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) #ajout add_test(NAME PDI_example_C COMMAND "${MPIEXEC}" "${MPIEXEC_NUMPROC_FLAG}" 3 ${MPIEXEC_PREFLAGS} "$" ${MPIEXEC_POSTFLAGS} "${CMAKE_CURRENT_SOURCE_DIR}/pluginless.yml") set_property(TEST PDI_example_C PROPERTY TIMEOUT 15) set_property(TEST PDI_example_C PROPERTY PROCESSORS 3) From 0945812c2748f16b28873bd8ec8cad292ceba573 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 09:40:19 +0200 Subject: [PATCH 216/372] Without Paraconf consideration 12 --- example/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 45b987285..ce6d0d000 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -49,7 +49,7 @@ endif() include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) -find_package(paraconf REQUIRED COMPONENTS ${PDI_COMPONENTS}) #ajout +find_package(paraconf REQUIRED COMPONENTS C) #ajout find_library(LIB_M m DOC "The math library") # Default standard in the project is C11 From 2587c06f56543fa0710c1ed37a80ad0411d9fa4d Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 09:55:42 +0200 Subject: [PATCH 217/372] Without Paraconf consideration 13; ok --- bin/build_and_run_all_tests | 16 ++++++++-------- example/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 27 +++++++++++++++------------ 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index c76579285..de9c0c3c8 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -159,14 +159,14 @@ fi echo "############ test-api no-pdi/paraconf done" -# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf +# # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf -cd "${TEST_DIR_API}" -NO_PDI_TESTS="test_07_C test_07_CXX" +# cd "${TEST_DIR_API}" +# NO_PDI_TESTS="test_07_C test_07_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -make ${MAKEFLAGS} -ldd test_07_C -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +# make ${MAKEFLAGS} +# ldd test_07_C +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -echo "############ test-api no-pdi/no-paraconf done" +# echo "############ test-api no-pdi/no-paraconf done" diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index ce6d0d000..d6d3231de 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -48,8 +48,8 @@ endif() # Includes include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) -find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) find_package(paraconf REQUIRED COMPONENTS C) #ajout +find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) find_library(LIB_M m DOC "The math library") # Default standard in the project is C11 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 744fa574b..bee404983 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -63,18 +63,21 @@ include(CTest) # target_link_libraries(PDI_C INTERFACE paraconf::paraconf) # endif() -message(WARNING "CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}") -message(WARNING "Using -include- of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/-include-") -message(WARNING "test-api") -option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one through " OFF) -if(BUILD_WITHOUT_PDI) - add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/../no-pdi" no-pdi) -else() - find_package(paraconf REQUIRED COMPONENTS C) - find_package(PDI REQUIRED COMPONENTS C) -endif() -# find_package(PDI REQUIRED COMPONENTS C) -# find_package(paraconf REQUIRED COMPONENTS C) +# message(WARNING "CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}") +# message(WARNING "Using -include- of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/-include-") +# message(WARNING "test-api") +# option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one through " OFF) +# if(BUILD_WITHOUT_PDI) +# add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/../no-pdi" no-pdi) +# else() +# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +# find_package(PDI REQUIRED COMPONENTS C) +# endif() +# # find_package(PDI REQUIRED COMPONENTS C) +# # find_package(paraconf REQUIRED COMPONENTS C) + +find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +find_package(PDI REQUIRED COMPONENTS C) if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") From 395be5d4689bc047e74069ad00a2b4138f17a344 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 09:57:19 +0200 Subject: [PATCH 218/372] Without Paraconf consideration 14; ok, cleaner --- example/CMakeLists.txt | 17 +++-------------- tests/CMakeLists.txt | 42 ------------------------------------------ 2 files changed, 3 insertions(+), 56 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index d6d3231de..2754af5f5 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -32,6 +32,7 @@ project(pdi_examples LANGUAGES C) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") set(MPI_COMPONENTS C) +set(paraconf_COMPONENTS C) set(PDI_COMPONENTS C) if("${BUILD_FORTRAN}") @@ -48,7 +49,7 @@ endif() # Includes include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) -find_package(paraconf REQUIRED COMPONENTS C) #ajout +find_package(paraconf REQUIRED COMPONENTS ${paraconf_COMPONENTS}) find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) find_library(LIB_M m DOC "The math library") @@ -78,19 +79,7 @@ endif() message(WARNING "PDI_example_C") add_executable(PDI_example_C example.c) -# option(BUILD_WITH_PARACONF_FOR_NO_PDI "Build with Paraconf using find_package" OFF) -# if(BUILD_WITH_PARACONF_FOR_NO_PDI) # This case is reached to enable PARACONF when using NO-PDI. -# message(WARNING "Building with Paraconf using find_package, for no-PDI") -# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -# message(WARNING "PDI_example_C with Paraconf using target_link_libraries") -# target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) -# else() # This case is reached to enable PARACONF when using PDI. -# message(WARNING "PDI_example_C without Paraconf using target_link_libraries") -# target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) -# endif() -## remonte find_package(paraconf et ajoute target_link_libraries -target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) #ajout -# target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) #ajout +target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) add_test(NAME PDI_example_C COMMAND "${MPIEXEC}" "${MPIEXEC_NUMPROC_FLAG}" 3 ${MPIEXEC_PREFLAGS} "$" ${MPIEXEC_POSTFLAGS} "${CMAKE_CURRENT_SOURCE_DIR}/pluginless.yml") set_property(TEST PDI_example_C PROPERTY TIMEOUT 15) set_property(TEST PDI_example_C PROPERTY PROCESSORS 3) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index bee404983..24e1839ff 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -34,48 +34,6 @@ option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) -# option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one through " OFF) -# option(BUILD_WITH_PARACONF_FOR_NO_PDI "Build with the Paraconf embedded in local no-PDI" OFF) -# message(WARNING "BUILD_WITHOUT_PDI: ${BUILD_WITHOUT_PDI}") -# message(WARNING "BUILD_WITH_PARACONF_FOR_NO_PDI: ${BUILD_WITH_PARACONF_FOR_NO_PDI}") -# if(BUILD_WITHOUT_PDI) -# add_library(PDI_C INTERFACE) -# message(WARNING "Using include of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") -# if(NOT BUILD_WITH_PARACONF_FOR_NO_PDI) # This case represents the use of NO-PDI together with its embedded NO-PARACONF. -# message(WARNING "Using NO-PARACONF, for NO-PDI through include_directories") -# target_include_directories(PDI_C INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") -# add_library(paraconf INTERFACE) -# add_library(paraconf::paraconf ALIAS paraconf) -# target_include_directories(paraconf INTERFACE BEFORE "${CMAKE_CURRENT_LIST_DIR}/../no-paraconf/include") -# target_link_libraries(PDI_C INTERFACE paraconf::paraconf) -# else() # This case is never reached in the tests, as this method of using NO-PDI is intended to be used when PARACONF is missing. -# message(WARNING "Using PARACONF, for NO-PDI through include_directories") -# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -# endif() -# include_directories("${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") -# include_directories(PDI_C INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../no-pdi/include") -# add_library(PDI::PDI_C ALIAS PDI_C) -# else() # This case covers boths PDI and NO-PDI (through find_package), when using PARACONF. -# message(WARNING "Using find_package for PDI (whether PDI or NO-PDI)") -# find_package(PDI REQUIRED COMPONENTS C) -# message(WARNING "Using PARACONF, for PDI or NO-PDI through find_package") -# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -# target_link_libraries(PDI_C INTERFACE paraconf::paraconf) -# endif() - -# message(WARNING "CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}") -# message(WARNING "Using -include- of NO-PDI through CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}/../no-pdi/-include-") -# message(WARNING "test-api") -# option(BUILD_WITHOUT_PDI "Use a mock PDI instead of the real one through " OFF) -# if(BUILD_WITHOUT_PDI) -# add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/../no-pdi" no-pdi) -# else() -# find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) -# find_package(PDI REQUIRED COMPONENTS C) -# endif() -# # find_package(PDI REQUIRED COMPONENTS C) -# # find_package(paraconf REQUIRED COMPONENTS C) - find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) find_package(PDI REQUIRED COMPONENTS C) From b8df51e0cb9debb7d4a7b7696b037e017dc1addb Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 10:04:59 +0200 Subject: [PATCH 219/372] Without Paraconf consideration 15 --- bin/build_and_run_all_tests | 12 ------------ tests/CMakeLists.txt | 4 ++-- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index de9c0c3c8..9903d5020 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -158,15 +158,3 @@ else fi echo "############ test-api no-pdi/paraconf done" - -# # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf - -# cd "${TEST_DIR_API}" -# NO_PDI_TESTS="test_07_C test_07_CXX" - -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_WITHOUT_PDI=ON -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -# make ${MAKEFLAGS} -# ldd test_07_C -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} - -# echo "############ test-api no-pdi/no-paraconf done" diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 24e1839ff..599fe31db 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -68,7 +68,7 @@ add_executable(test_07_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_07_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) -target_link_libraries(test_07_C PDI::PDI_C) +target_link_libraries(test_07_C paraconf::paraconf PDI::PDI_C) add_test(NAME test_07_C COMMAND "$") add_executable(test_07_CXX test_07_main.cpp) @@ -78,5 +78,5 @@ target_compile_options(test_07_CXX PRIVATE set_target_properties(test_07_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_07_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_07_CXX PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(test_07_CXX PDI::PDI_C) +target_link_libraries(test_07_CXX paraconf::paraconf PDI::PDI_C) add_test(NAME test_07_CXX COMMAND "$") From 895b196776b585fb5402b1b0cfc97ccafd8aa9d5 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 10:24:58 +0200 Subject: [PATCH 220/372] Without Paraconf consideration 16 --- bin/build_and_run_all_tests | 4 ++-- tests/test_07_no-pdi.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 9903d5020..b4c060a5b 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -137,7 +137,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 => echo "PARACONF_DIR: " PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") - cd "${TEST_DIR_API}" + cd "${TEST_DIR_NO_PDI}" RELATIVE_MODULE_PATH="no-pdi" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} @@ -147,7 +147,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 => echo "############ example no-pdi/paraconf done" - cd "${TEST_DIR_NO_PDI}" + cd "${TEST_DIR_API}" NO_PDI_TESTS="test_07_C test_07_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 75132c95b..98e4aba77 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -33,7 +33,7 @@ #include #endif // #ifndef PC_parse_string -// #include +// #include ?? // #endif void share() //share From 7c923a12fbe706692e45c331dc615335b2f33338 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 10:54:55 +0200 Subject: [PATCH 221/372] Without Paraconf consideration 17 --- tests/test_07_no-pdi.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 98e4aba77..7c5e8ed46 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -35,6 +35,9 @@ // #ifndef PC_parse_string // #include ?? // #endif +#ifndef PARACONF_H__ +#include +#endif void share() //share { From 3a166d0fb545864d3a504372f4a4a020a94851f9 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 11:04:23 +0200 Subject: [PATCH 222/372] Without Paraconf consideration 18 --- bin/build_and_run_all_tests | 14 +++++++++++++- tests/CMakeLists.txt | 18 +++++++++++++++--- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index b4c060a5b..87f3f523e 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -143,7 +143,6 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 => make ${MAKEFLAGS} ldd PDI_example_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C - rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile echo "############ example no-pdi/paraconf done" @@ -153,8 +152,21 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 => make ${MAKEFLAGS} ldd test_07_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} + rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile else echo "Paraconf is not available, skipping no-pdi's specific tests with paraconf (through CMAKE_MODULE_PATH)." fi echo "############ test-api no-pdi/paraconf done" + +# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf + +cd "${TEST_DIR_API}" +NO_PDI_TESTS="test_07_C test_07_CXX" + +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +make ${MAKEFLAGS} +ldd test_07_C +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} + +echo "############ test-api no-pdi/no-paraconf done" diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 599fe31db..f60076af5 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -34,7 +34,10 @@ option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) -find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +option(BUILD_WITH_PARACONF "BUILD_WITH_PARACONF" ON) +if(BUILD_WITH_PARACONF) + find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) +endif() find_package(PDI REQUIRED COMPONENTS C) if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") @@ -68,7 +71,11 @@ add_executable(test_07_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_07_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) -target_link_libraries(test_07_C paraconf::paraconf PDI::PDI_C) +if(BUILD_WITH_PARACONF) + target_link_libraries(test_07_C paraconf::paraconf PDI::PDI_C) +else() + target_link_libraries(test_07_C PDI::PDI_C) +endif() add_test(NAME test_07_C COMMAND "$") add_executable(test_07_CXX test_07_main.cpp) @@ -78,5 +85,10 @@ target_compile_options(test_07_CXX PRIVATE set_target_properties(test_07_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_07_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_07_CXX PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(test_07_CXX paraconf::paraconf PDI::PDI_C) +# target_link_libraries(test_07_CXX paraconf::paraconf PDI::PDI_C) +if(BUILD_WITH_PARACONF) + target_link_libraries(test_07_CXX paraconf::paraconf PDI::PDI_C) +else() + target_link_libraries(test_07_CXX PDI::PDI_C) +endif() add_test(NAME test_07_CXX COMMAND "$") From 81a12948ccde3e246d3a82a04dae00fcb53274e7 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 11:08:36 +0200 Subject: [PATCH 223/372] Without Paraconf consideration 19 --- tests/CMakeLists.txt | 2 ++ tests/test_07_no-pdi.h | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f60076af5..1ab65ee2b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -73,6 +73,7 @@ target_compile_options(test_07_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) if(BUILD_WITH_PARACONF) target_link_libraries(test_07_C paraconf::paraconf PDI::PDI_C) + target_compile_definitions(test_07_C PRIVATE PARACONF_AVAILABLE) else() target_link_libraries(test_07_C PDI::PDI_C) endif() @@ -88,6 +89,7 @@ set_target_properties(test_07_CXX PROPERTIES LINKER_LANGUAGE CXX) # target_link_libraries(test_07_CXX paraconf::paraconf PDI::PDI_C) if(BUILD_WITH_PARACONF) target_link_libraries(test_07_CXX paraconf::paraconf PDI::PDI_C) + target_compile_definitions(test_07_CXX PRIVATE PARACONF_AVAILABLE) else() target_link_libraries(test_07_CXX PDI::PDI_C) endif() diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 7c5e8ed46..94902150a 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -35,7 +35,7 @@ // #ifndef PC_parse_string // #include ?? // #endif -#ifndef PARACONF_H__ +#ifndef PARACONF_AVAILABLE #include #endif @@ -119,7 +119,7 @@ void errhandler() int tests(int argc, char* argv[]) { -#ifdef PARACONF_H__ +#ifdef PARACONF_AVAILABLE static const char* CONFIG_YAML = "logging: trace \n" "data: \n" @@ -135,7 +135,7 @@ int tests(int argc, char* argv[]) fprintf(stderr, "*** Error: no-pdi initialisation\n"); exit(EXIT_FAILURE); } -#endif // PARACONF_H__ +#endif // PARACONF_AVAILABLE const char* errmsg = PDI_errmsg(); if (strcmp(errmsg, "") != 0) { From 5177b0367549fc0f75f0d3d6707a91ff3a033c1e Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 11:18:00 +0200 Subject: [PATCH 224/372] Without Paraconf consideration 20 --- no-pdi/include/pdi.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 34771f23e..d74564fc5 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -60,6 +60,9 @@ // #include // #endif // #endif +#ifndef PARACONF_AVAILABLE +#include +#endif #include @@ -195,12 +198,12 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) // #warning "ELSE" // #endif -#ifdef PARACONF_H__ +#ifdef PARACONF_AVAILABLE static inline PDI_status_t PDI_init(PC_tree_t conf) { return PDI_OK; } -#endif // PARACONF_H__ +#endif // PARACONF_AVAILABLE /** Finalizes PDI * \return an error status From d5410536f2b205a222be659b8395361b57aa5e4b Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 11:35:06 +0200 Subject: [PATCH 225/372] Without Paraconf consideration 21 --- no-pdi/include/pdi.h | 2 +- tests/test_07_no-pdi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index d74564fc5..f867dbac0 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -60,7 +60,7 @@ // #include // #endif // #endif -#ifndef PARACONF_AVAILABLE +#ifdef PARACONF_AVAILABLE #include #endif diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 94902150a..0c697edcb 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -35,7 +35,7 @@ // #ifndef PC_parse_string // #include ?? // #endif -#ifndef PARACONF_AVAILABLE +#ifdef PARACONF_AVAILABLE #include #endif From 3e0f2a8c61b920af7609186cc2f59cb19982023a Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 14:04:28 +0200 Subject: [PATCH 226/372] Without Paraconf consideration 22 --- tests/CMakeLists.txt | 13 ++++++++++--- tests/test_07_no-pdi.h | 6 +++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1ab65ee2b..5fcefb531 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -36,7 +36,14 @@ include(CTest) option(BUILD_WITH_PARACONF "BUILD_WITH_PARACONF" ON) if(BUILD_WITH_PARACONF) - find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) + # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) + find_package(paraconf 1.0.0 COMPONENTS C) + if(paraconf_FOUND) + message(WARNING "Paraconf found") + add_definitions(-DPARACONF_FOUND) + else() + message(WARNING "Paraconf not found") + endif() endif() find_package(PDI REQUIRED COMPONENTS C) @@ -71,7 +78,7 @@ add_executable(test_07_C test_07_main.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_07_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) -if(BUILD_WITH_PARACONF) +if(paraconf_FOUND) target_link_libraries(test_07_C paraconf::paraconf PDI::PDI_C) target_compile_definitions(test_07_C PRIVATE PARACONF_AVAILABLE) else() @@ -87,7 +94,7 @@ set_target_properties(test_07_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_07_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_07_CXX PROPERTIES LINKER_LANGUAGE CXX) # target_link_libraries(test_07_CXX paraconf::paraconf PDI::PDI_C) -if(BUILD_WITH_PARACONF) +if(paraconf_FOUND) target_link_libraries(test_07_CXX paraconf::paraconf PDI::PDI_C) target_compile_definitions(test_07_CXX PRIVATE PARACONF_AVAILABLE) else() diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index 0c697edcb..ccd336043 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -35,7 +35,7 @@ // #ifndef PC_parse_string // #include ?? // #endif -#ifdef PARACONF_AVAILABLE +#ifdef PARACONF_FOUND #include #endif @@ -119,7 +119,7 @@ void errhandler() int tests(int argc, char* argv[]) { -#ifdef PARACONF_AVAILABLE +#ifdef PARACONF_FOUND static const char* CONFIG_YAML = "logging: trace \n" "data: \n" @@ -135,7 +135,7 @@ int tests(int argc, char* argv[]) fprintf(stderr, "*** Error: no-pdi initialisation\n"); exit(EXIT_FAILURE); } -#endif // PARACONF_AVAILABLE +#endif // PARACONF_FOUND const char* errmsg = PDI_errmsg(); if (strcmp(errmsg, "") != 0) { From 0fbe23ca96047fd519d9d9295cd4fed86bdecb90 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 14:16:55 +0200 Subject: [PATCH 227/372] Without Paraconf consideration 23 --- bin/build_and_run_all_tests | 1 + example/CMakeLists.txt | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 87f3f523e..d0c90fb48 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -162,6 +162,7 @@ echo "############ test-api no-pdi/paraconf done" # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf cd "${TEST_DIR_API}" +RELATIVE_MODULE_PATH="no-pdi" NO_PDI_TESTS="test_07_C test_07_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 2754af5f5..a99e29f3d 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -50,6 +50,12 @@ endif() include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) find_package(paraconf REQUIRED COMPONENTS ${paraconf_COMPONENTS}) +if(paraconf_FOUND) + message(WARNING "Paraconf found") + add_definitions(-DPARACONF_FOUND) +else() + message(WARNING "Paraconf not found") +endif() find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) find_library(LIB_M m DOC "The math library") From 0903ba816cf9bf10733c73115c6b53de9976e8f7 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 14:31:10 +0200 Subject: [PATCH 228/372] Without Paraconf consideration 24 --- no-pdi/include/pdi.h | 8 +++++--- tests/test_07_no-pdi.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index f867dbac0..4aa83f3d1 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -60,7 +60,8 @@ // #include // #endif // #endif -#ifdef PARACONF_AVAILABLE +#ifdef PARACONF_FOUND +#warning "PARACONF_FOUND, include" #include #endif @@ -198,12 +199,13 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) // #warning "ELSE" // #endif -#ifdef PARACONF_AVAILABLE +#ifdef PARACONF_FOUND +#warning "PARACONF_FOUND, init" static inline PDI_status_t PDI_init(PC_tree_t conf) { return PDI_OK; } -#endif // PARACONF_AVAILABLE +#endif // PARACONF_FOUND /** Finalizes PDI * \return an error status diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h index ccd336043..238164a4c 100644 --- a/tests/test_07_no-pdi.h +++ b/tests/test_07_no-pdi.h @@ -33,7 +33,7 @@ #include #endif // #ifndef PC_parse_string -// #include ?? +// #include // #endif #ifdef PARACONF_FOUND #include From 4a8fbbdebaaaab177d33faa7cf96e6e75635d821 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 14:40:08 +0200 Subject: [PATCH 229/372] Without Paraconf consideration 25 --- no-pdi/include/pdi.h | 1 + tests/CMakeLists.txt | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 4aa83f3d1..aca2fbc9c 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -62,6 +62,7 @@ // #endif #ifdef PARACONF_FOUND #warning "PARACONF_FOUND, include" + #include #endif diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5fcefb531..d601227b3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -80,7 +80,6 @@ target_compile_options(test_07_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) if(paraconf_FOUND) target_link_libraries(test_07_C paraconf::paraconf PDI::PDI_C) - target_compile_definitions(test_07_C PRIVATE PARACONF_AVAILABLE) else() target_link_libraries(test_07_C PDI::PDI_C) endif() @@ -93,10 +92,8 @@ target_compile_options(test_07_CXX PRIVATE set_target_properties(test_07_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_07_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_07_CXX PROPERTIES LINKER_LANGUAGE CXX) -# target_link_libraries(test_07_CXX paraconf::paraconf PDI::PDI_C) if(paraconf_FOUND) target_link_libraries(test_07_CXX paraconf::paraconf PDI::PDI_C) - target_compile_definitions(test_07_CXX PRIVATE PARACONF_AVAILABLE) else() target_link_libraries(test_07_CXX PDI::PDI_C) endif() From 4671f182572a1b13fbfbca5efd7199c85d00d1a3 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 14:50:02 +0200 Subject: [PATCH 230/372] Without Paraconf consideration 26 --- bin/build_and_run_all_tests | 12 ++++++------ no-pdi/include/pdi.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index d0c90fb48..570f40ecf 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -133,20 +133,20 @@ echo "############ tests pdi/paraconf done" # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command - RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" - echo "PARACONF_DIR: " + RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" + echo "PARACONF_DIR: " PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") cd "${TEST_DIR_NO_PDI}" - RELATIVE_MODULE_PATH="no-pdi" + RELATIVE_MODULE_PATH="no-pdi" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ldd PDI_example_C - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C echo "############ example no-pdi/paraconf done" - cd "${TEST_DIR_API}" + cd "${TEST_DIR_API}" NO_PDI_TESTS="test_07_C test_07_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} @@ -154,7 +154,7 @@ if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 => ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile else - echo "Paraconf is not available, skipping no-pdi's specific tests with paraconf (through CMAKE_MODULE_PATH)." + echo "Paraconf is not available, skipping no-pdi's specific tests with paraconf (through CMAKE_MODULE_PATH)." fi echo "############ test-api no-pdi/paraconf done" diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index aca2fbc9c..53201c5f7 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -61,8 +61,7 @@ // #endif // #endif #ifdef PARACONF_FOUND -#warning "PARACONF_FOUND, include" - +#warning "PARACONF_FOUND, paraconf included" #include #endif @@ -201,7 +200,8 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) // #endif #ifdef PARACONF_FOUND -#warning "PARACONF_FOUND, init" +#warning "PARACONF_FOUND, PDI_init set" + static inline PDI_status_t PDI_init(PC_tree_t conf) { return PDI_OK; From 5099f0830fb4dc740203a81077f47a4550f061af Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 15:07:55 +0200 Subject: [PATCH 231/372] Without Paraconf consideration 27 --- example/CMakeLists.txt | 12 ++++++------ example/example.c | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index a99e29f3d..8c7a03db0 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -50,12 +50,12 @@ endif() include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) find_package(paraconf REQUIRED COMPONENTS ${paraconf_COMPONENTS}) -if(paraconf_FOUND) - message(WARNING "Paraconf found") - add_definitions(-DPARACONF_FOUND) -else() - message(WARNING "Paraconf not found") -endif() +# if(paraconf_FOUND) +# message(WARNING "Paraconf found") +# add_definitions(-DPARACONF_FOUND) +# else() +# message(WARNING "Paraconf not found") +# endif() find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) find_library(LIB_M m DOC "The math library") diff --git a/example/example.c b/example/example.c index 7beedfa48..6f69ba493 100644 --- a/example/example.c +++ b/example/example.c @@ -159,10 +159,12 @@ int main(int argc, char* argv[]) exit(1); } +#ifdef PARACONF_H__ PC_tree_t conf = PC_parse_path(argv[1]); + PDI_init(PC_get(conf, ".pdi")); +#endif MPI_Comm main_comm = MPI_COMM_WORLD; - PDI_init(PC_get(conf, ".pdi")); PDI_expose("mpi_comm", &main_comm, PDI_INOUT); From d1d10d9086f674b6dff2ef96c56f22f9a2595454 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 15:29:10 +0200 Subject: [PATCH 232/372] Without Paraconf consideration 28 --- no-pdi/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index 42b11fbc9..c068f5669 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -31,3 +31,10 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES C CXX) include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake") + +if(paraconf_FOUND) + message(WARNING "Paraconf found") + add_compile_definitions(PARACONF_FOUND) +else() + message(WARNING "Paraconf not found") +endif() From 2ddea382b8661ec1a31766cfc7be3c032cab2309 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 15:36:39 +0200 Subject: [PATCH 233/372] Without Paraconf consideration 29 --- no-pdi/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index c068f5669..62974ecfc 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -32,6 +32,7 @@ project(PDI LANGUAGES C CXX) include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake") +find_package(paraconf 1.0.0 COMPONENTS C) if(paraconf_FOUND) message(WARNING "Paraconf found") add_compile_definitions(PARACONF_FOUND) From 50ef0d34adbd60a90e100b2cf78c1dfcc2f5b8e7 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 29 Jul 2025 15:54:18 +0200 Subject: [PATCH 234/372] Without Paraconf consideration 30 --- no-pdi/CMakeLists.txt | 8 -------- no-pdi/cmake/PDIConfig.cmake | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index 62974ecfc..42b11fbc9 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -31,11 +31,3 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES C CXX) include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake") - -find_package(paraconf 1.0.0 COMPONENTS C) -if(paraconf_FOUND) - message(WARNING "Paraconf found") - add_compile_definitions(PARACONF_FOUND) -else() - message(WARNING "Paraconf not found") -endif() diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index b566ef7d3..ac930f040 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -34,3 +34,11 @@ add_library(PDI::PDI_C ALIAS PDI_C) set_target_properties(PDI_C PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" ) + +find_package(paraconf 1.0.0 COMPONENTS C) +if(paraconf_FOUND) + message(WARNING "Paraconf found") + add_compile_definitions(PARACONF_FOUND) +else() + message(WARNING "Paraconf not found") +endif() From a344e13555429bbf2fcbe23a7d6722bf787089f5 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 30 Jul 2025 09:57:23 +0200 Subject: [PATCH 235/372] Without Paraconf consideration 31 --- no-pdi/cmake/PDIConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index ac930f040..52a6588b2 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -35,7 +35,7 @@ set_target_properties(PDI_C PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" ) -find_package(paraconf 1.0.0 COMPONENTS C) +# find_package(paraconf 1.0.0 COMPONENTS C) if(paraconf_FOUND) message(WARNING "Paraconf found") add_compile_definitions(PARACONF_FOUND) From 7cd09d09b32396baea23e95f215eeb734cce90ad Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 30 Jul 2025 16:38:20 +0200 Subject: [PATCH 236/372] Reorder ctests commands for incremental installation of Paraconf then PDI --- bin/build_and_run_all_tests | 89 +++++++++++++++++++----------------- example/CMakeLists.txt | 8 +--- example/example.c | 2 - no-pdi/cmake/PDIConfig.cmake | 2 +- tests/CMakeLists.txt | 61 ++++++++++++------------ tests/test_07_main.c | 2 +- tests/test_07_main.cpp | 2 +- 7 files changed, 83 insertions(+), 83 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 570f40ecf..1e9b0ded2 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -1,6 +1,6 @@ #!/bin/bash #============================================================================= -# Copyright (C) 2022-2024 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# Copyright (C) 2022-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) # Copyright (C) 2020 Institute of Bioorganic Chemistry Polish Academy of Science (PSNC) # # All rights reserved. @@ -37,8 +37,8 @@ set -xe SRCDIR="${PWD}" -TEST_DIR="${TEST_DIR:-${PWD}}" -cd "${TEST_DIR}" +TEST_DIR_WITH_PDI="${TEST_DIR_WITH_PDI:-${PWD}}" +cd "${TEST_DIR_WITH_PDI}" cd "$(mktemp -d pdibuild.XXXXX)" TEST_DIR_ROOT="${PWD}" @@ -49,7 +49,7 @@ TEST_DIR_NO_PDI="${PWD}" cd "${TEST_DIR_ROOT}" mkdir with_pdi cd with_pdi -TEST_DIR="${PWD}" +TEST_DIR_WITH_PDI="${PWD}" cd "${TEST_DIR_ROOT}" mkdir api_pdi @@ -60,8 +60,6 @@ cd "${SRCDIR}" cd "$(dirname "$0")/.." SRCDIR="${PWD}" -cd "${TEST_DIR}" - # Gather options @@ -120,54 +118,63 @@ then fi +# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf -# Configure, build & test for pdi, with Paraconf +cd "${TEST_DIR_API}" +RELATIVE_MODULE_PATH="no-pdi" +NO_PDI_TESTS="test_07_C test_07_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} +ldd test_07_C +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} + +echo "############ test-api no-pdi/no-paraconf done" + +# Get Paraconf independently from pdi +# cd "${SRCDIR}/vendor/paraconf*/" +cd "${SRCDIR}" ls . -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +cd vendor/paraconf*/ +mkdir build +cd build +cmake -DUSE_SYSTEM_YAML=OFF .. +make +make install -echo "############ tests pdi/paraconf done" +echo "############ got paraconf" # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf -if ldd "PDI_TESTS/src/PDI_TESTS_pkg-build/test_04_C" | grep 'libparaconf.so.1 =>' | grep -v 'not found'; then # Check if Paraconf can be found among the dependencies of the first ctest command - RELATIVE_PARACONF_PATH="staging/share/paraconf/cmake" - echo "PARACONF_DIR: " - PARACONF_DIR=$(dirname "${TEST_DIR}/${RELATIVE_PARACONF_PATH}") - - cd "${TEST_DIR_NO_PDI}" - RELATIVE_MODULE_PATH="no-pdi" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" - make ${MAKEFLAGS} - ldd PDI_example_C - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C - - echo "############ example no-pdi/paraconf done" - - cd "${TEST_DIR_API}" - NO_PDI_TESTS="test_07_C test_07_CXX" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" - make ${MAKEFLAGS} - ldd test_07_C - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} - rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile -else - echo "Paraconf is not available, skipping no-pdi's specific tests with paraconf (through CMAKE_MODULE_PATH)." -fi - -echo "############ test-api no-pdi/paraconf done" +cd "${TEST_DIR_NO_PDI}" +RELATIVE_MODULE_PATH="no-pdi" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +make ${MAKEFLAGS} +ldd PDI_example_C +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C -# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf +echo "############ example no-pdi/paraconf done" cd "${TEST_DIR_API}" -RELATIVE_MODULE_PATH="no-pdi" NO_PDI_TESTS="test_07_C test_07_CXX" - -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} ldd test_07_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile + +echo "############ test-api no-pdi/paraconf done" + +# Configure, build & test for pdi, with Paraconf + +cd "${TEST_DIR_WITH_PDI}" +cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make ${MAKEFLAGS} +ls . +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} + +echo "############ tests pdi/paraconf done" + + + -echo "############ test-api no-pdi/no-paraconf done" diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 8c7a03db0..ce9c31c8e 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (C) 2015-2024 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# Copyright (C) 2015-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) # Copyright (C) 2020 Institute of Bioorganic Chemistry Polish Academy of Science (PSNC) # All rights reserved. # @@ -50,12 +50,6 @@ endif() include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) find_package(paraconf REQUIRED COMPONENTS ${paraconf_COMPONENTS}) -# if(paraconf_FOUND) -# message(WARNING "Paraconf found") -# add_definitions(-DPARACONF_FOUND) -# else() -# message(WARNING "Paraconf not found") -# endif() find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) find_library(LIB_M m DOC "The math library") diff --git a/example/example.c b/example/example.c index 6f69ba493..9603928ab 100644 --- a/example/example.c +++ b/example/example.c @@ -159,10 +159,8 @@ int main(int argc, char* argv[]) exit(1); } -#ifdef PARACONF_H__ PC_tree_t conf = PC_parse_path(argv[1]); PDI_init(PC_get(conf, ".pdi")); -#endif MPI_Comm main_comm = MPI_COMM_WORLD; diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index 52a6588b2..ac930f040 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -35,7 +35,7 @@ set_target_properties(PDI_C PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" ) -# find_package(paraconf 1.0.0 COMPONENTS C) +find_package(paraconf 1.0.0 COMPONENTS C) if(paraconf_FOUND) message(WARNING "Paraconf found") add_compile_definitions(PARACONF_FOUND) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d601227b3..62e4066cc 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -34,17 +34,16 @@ option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) -option(BUILD_WITH_PARACONF "BUILD_WITH_PARACONF" ON) -if(BUILD_WITH_PARACONF) - # find_package(paraconf 1.0.0 REQUIRED COMPONENTS C) - find_package(paraconf 1.0.0 COMPONENTS C) - if(paraconf_FOUND) - message(WARNING "Paraconf found") - add_definitions(-DPARACONF_FOUND) - else() - message(WARNING "Paraconf not found") - endif() -endif() +# option(BUILD_WITH_PARACONF "BUILD_WITH_PARACONF" ON) +# if(BUILD_WITH_PARACONF) +# find_package(paraconf 1.0.0 COMPONENTS C) +# if(paraconf_FOUND) +# message(WARNING "Paraconf found") +# add_definitions(-DPARACONF_FOUND) +# else() +# message(WARNING "Paraconf not found") +# endif() +# endif() find_package(PDI REQUIRED COMPONENTS C) if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") @@ -74,27 +73,29 @@ add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOUR endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") -add_executable(test_07_C test_07_main.c) +add_executable(test_api_C test_api_main.c) set(BUILD_FLAGS_FOR_C "-Wall") -target_compile_options(test_07_C PRIVATE +target_compile_options(test_api_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) -if(paraconf_FOUND) - target_link_libraries(test_07_C paraconf::paraconf PDI::PDI_C) -else() - target_link_libraries(test_07_C PDI::PDI_C) -endif() -add_test(NAME test_07_C COMMAND "$") +# if(paraconf_FOUND) +# target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) +# else() +# target_link_libraries(test_api_C PDI::PDI_C) +# endif() +target_link_libraries(test_api_C PDI::PDI_C) +add_test(NAME test_api_C COMMAND "$") -add_executable(test_07_CXX test_07_main.cpp) +add_executable(test_api_CXX test_api_main.cpp) set(BUILD_FLAGS_FOR_CXX "-Wall") -target_compile_options(test_07_CXX PRIVATE +target_compile_options(test_api_CXX PRIVATE $<$:${BUILD_FLAGS_FOR_CXX}>) -set_target_properties(test_07_CXX PROPERTIES CXX_STANDARD 11) -set_target_properties(test_07_CXX PROPERTIES LANGUAGE CXX) -set_target_properties(test_07_CXX PROPERTIES LINKER_LANGUAGE CXX) -if(paraconf_FOUND) - target_link_libraries(test_07_CXX paraconf::paraconf PDI::PDI_C) -else() - target_link_libraries(test_07_CXX PDI::PDI_C) -endif() -add_test(NAME test_07_CXX COMMAND "$") +set_target_properties(test_api_CXX PROPERTIES CXX_STANDARD 11) +set_target_properties(test_api_CXX PROPERTIES LANGUAGE CXX) +set_target_properties(test_api_CXX PROPERTIES LINKER_LANGUAGE CXX) +# if(paraconf_FOUND) +# target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) +# else() +# target_link_libraries(test_api_CXX PDI::PDI_C) +# endif() +target_link_libraries(test_api_CXX PDI::PDI_C) +add_test(NAME test_api_CXX COMMAND "$") diff --git a/tests/test_07_main.c b/tests/test_07_main.c index 93fc87d01..cc526d38a 100644 --- a/tests/test_07_main.c +++ b/tests/test_07_main.c @@ -22,7 +22,7 @@ * THE SOFTWARE. ******************************************************************************/ -#include "test_07_no-pdi.h" +#include "test_api_no-pdi.h" int main(int argc, char* argv[]) { diff --git a/tests/test_07_main.cpp b/tests/test_07_main.cpp index 1e7863991..3c4e27509 100644 --- a/tests/test_07_main.cpp +++ b/tests/test_07_main.cpp @@ -22,7 +22,7 @@ * THE SOFTWARE. ******************************************************************************/ -#include "test_07_no-pdi.h" +#include "test_api_no-pdi.h" #include From a4dd2161fcc9c976019763fc2ea9cb691673336a Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 30 Jul 2025 16:44:11 +0200 Subject: [PATCH 237/372] Reorder ctests commands for incremental installation of Paraconf then PDI 2 --- tests/CMakeLists.txt | 4 +- tests/test_07_main.c | 31 -------- tests/test_07_main.cpp | 33 --------- tests/test_07_no-pdi.h | 162 ----------------------------------------- 4 files changed, 2 insertions(+), 228 deletions(-) delete mode 100644 tests/test_07_main.c delete mode 100644 tests/test_07_main.cpp delete mode 100644 tests/test_07_no-pdi.h diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 62e4066cc..0c0b0ad6c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -73,7 +73,7 @@ add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOUR endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") -add_executable(test_api_C test_api_main.c) +add_executable(test_api_C test_api.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_api_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) @@ -85,7 +85,7 @@ target_compile_options(test_api_C PRIVATE target_link_libraries(test_api_C PDI::PDI_C) add_test(NAME test_api_C COMMAND "$") -add_executable(test_api_CXX test_api_main.cpp) +add_executable(test_api_CXX test_api.cpp) set(BUILD_FLAGS_FOR_CXX "-Wall") target_compile_options(test_api_CXX PRIVATE $<$:${BUILD_FLAGS_FOR_CXX}>) diff --git a/tests/test_07_main.c b/tests/test_07_main.c deleted file mode 100644 index cc526d38a..000000000 --- a/tests/test_07_main.c +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * 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. - * * Neither the name of CEA nor the names of its contributors may be used to - * endorse or promote products derived from this software without specific - * prior written permission. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - ******************************************************************************/ - -#include "test_api_no-pdi.h" - -int main(int argc, char* argv[]) -{ - tests(argc, argv); - printf("Disabled PDI ok for C.\n"); -} diff --git a/tests/test_07_main.cpp b/tests/test_07_main.cpp deleted file mode 100644 index 3c4e27509..000000000 --- a/tests/test_07_main.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * 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. - * * Neither the name of CEA nor the names of its contributors may be used to - * endorse or promote products derived from this software without specific - * prior written permission. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - ******************************************************************************/ - -#include "test_api_no-pdi.h" - -#include - -int main(int argc, char* argv[]) -{ - tests(argc, argv); - std::cout << "Disabled PDI ok for C++." << std::endl; -} diff --git a/tests/test_07_no-pdi.h b/tests/test_07_no-pdi.h deleted file mode 100644 index 238164a4c..000000000 --- a/tests/test_07_no-pdi.h +++ /dev/null @@ -1,162 +0,0 @@ -/******************************************************************************* - * Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * 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. - * * Neither the name of CEA nor the names of its contributors may be used to - * endorse or promote products derived from this software without specific - * prior written permission. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - ******************************************************************************/ - -#include -#ifdef __cplusplus -#include -#include -#include -#else -#include -#include -#include -#endif -// #ifndef PC_parse_string -// #include -// #endif -#ifdef PARACONF_FOUND -#include -#endif - -void share() //share -{ - int to_share[2] = {1, 1}; - if (PDI_OK != PDI_share("to_share", to_share, PDI_OUT)) { - fprintf(stderr, "*** Error: no-pdi share\n"); - exit(EXIT_FAILURE); - } -} - -void access() //share/access -{ - int to_access[2] = {1, 1}; - PDI_share("to_access", to_access, PDI_OUT); - if (PDI_OK != PDI_access("to_access", (void**)&to_access, PDI_IN)) { - fprintf(stderr, "*** Error: no-pdi access\n"); - exit(EXIT_FAILURE); - } -} - -void release() //share/release -{ - int to_release[2] = {1, 1}; - PDI_share("to_release", to_release, PDI_OUT); - PDI_access("to_release", (void**)&to_release, PDI_IN); - if (PDI_OK != PDI_release("to_release")) { - fprintf(stderr, "*** Error: no-pdi release\n"); - exit(EXIT_FAILURE); - } -} - -void reclaim() //share/reclaim -{ - int to_reclaim[2] = {1, 1}; - PDI_share("to_reclaim", to_reclaim, PDI_OUT); - if (PDI_OK != PDI_reclaim("to_reclaim")) { - fprintf(stderr, "*** Error: no-pdi reclaim\n"); - exit(EXIT_FAILURE); - } -} - -void event() -{ - if (PDI_OK != PDI_event("event_one")) { - fprintf(stderr, "*** Error: no-pdi event\n"); - exit(EXIT_FAILURE); - } -} - -void expose() -{ - int to_expose[2] = {1, 1}; - if (PDI_OK != PDI_expose("to_expose", to_expose, PDI_OUT)) { - fprintf(stderr, "*** Error: no-pdi expose\n"); - exit(EXIT_FAILURE); - } -} - -void multi_expose() -{ - int to_multi_expose[2] = {1, 1}; - int to_multi_expose_two[2] = {2, 2}; - if (PDI_OK - != PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL)) - { - fprintf(stderr, "*** Error: no-pdi multi_expose\n"); - exit(EXIT_FAILURE); - } -} - -void errhandler() -{ - PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); - if (NULL != current_handler.context) { - fprintf(stderr, "*** Error: no-pdi errhandler\n"); - exit(EXIT_FAILURE); - } -} - -int tests(int argc, char* argv[]) -{ -#ifdef PARACONF_FOUND - static const char* CONFIG_YAML - = "logging: trace \n" - "data: \n" - " to_share: {type: array, subtype: int, size: 2} \n" - " to_access: {type: array, subtype: int, size: 2} \n" - " to_release: {type: array, subtype: int, size: 2} \n" - " to_reclaim: {type: array, subtype: int, size: 2} \n" - " to_expose: {type: array, subtype: int, size: 2} \n" - " to_multi_expose: {type: array, subtype: int, size: 2} \n" - " to_multi_expose_two: {type: array, subtype: int, size: 2} \n"; - - if (PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML))) { - fprintf(stderr, "*** Error: no-pdi initialisation\n"); - exit(EXIT_FAILURE); - } -#endif // PARACONF_FOUND - - const char* errmsg = PDI_errmsg(); - if (strcmp(errmsg, "") != 0) { - fprintf(stderr, "*** Error: no-pdi errmsg\n"); - exit(EXIT_FAILURE); - } - - errhandler(); - - share(); - access(); - release(); - reclaim(); - event(); - expose(); - multi_expose(); - - if (PDI_OK != PDI_finalize()) { - fprintf(stderr, "*** Error: no-pdi finalisation\n"); - exit(EXIT_FAILURE); - } - - return EXIT_SUCCESS; -} From d1fa96c28ba930a29e48a1adea0a64907e70e090 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 30 Jul 2025 16:44:44 +0200 Subject: [PATCH 238/372] Reorder ctests commands for incremental installation of Paraconf then PDI 3 --- tests/test_api.c | 31 +++++++++ tests/test_api.cpp | 33 +++++++++ tests/test_api.h | 162 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 226 insertions(+) create mode 100644 tests/test_api.c create mode 100644 tests/test_api.cpp create mode 100644 tests/test_api.h diff --git a/tests/test_api.c b/tests/test_api.c new file mode 100644 index 000000000..c6119fe87 --- /dev/null +++ b/tests/test_api.c @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of CEA nor the names of its contributors may be used to + * endorse or promote products derived from this software without specific + * prior written permission. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + ******************************************************************************/ + +#include "test_api.h" + +int main(int argc, char* argv[]) +{ + tests(argc, argv); + printf("Disabled PDI ok for C.\n"); +} diff --git a/tests/test_api.cpp b/tests/test_api.cpp new file mode 100644 index 000000000..4b0bdb5c5 --- /dev/null +++ b/tests/test_api.cpp @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of CEA nor the names of its contributors may be used to + * endorse or promote products derived from this software without specific + * prior written permission. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + ******************************************************************************/ + +#include "test_api.h" + +#include + +int main(int argc, char* argv[]) +{ + tests(argc, argv); + std::cout << "Disabled PDI ok for C++." << std::endl; +} diff --git a/tests/test_api.h b/tests/test_api.h new file mode 100644 index 000000000..238164a4c --- /dev/null +++ b/tests/test_api.h @@ -0,0 +1,162 @@ +/******************************************************************************* + * Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of CEA nor the names of its contributors may be used to + * endorse or promote products derived from this software without specific + * prior written permission. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + ******************************************************************************/ + +#include +#ifdef __cplusplus +#include +#include +#include +#else +#include +#include +#include +#endif +// #ifndef PC_parse_string +// #include +// #endif +#ifdef PARACONF_FOUND +#include +#endif + +void share() //share +{ + int to_share[2] = {1, 1}; + if (PDI_OK != PDI_share("to_share", to_share, PDI_OUT)) { + fprintf(stderr, "*** Error: no-pdi share\n"); + exit(EXIT_FAILURE); + } +} + +void access() //share/access +{ + int to_access[2] = {1, 1}; + PDI_share("to_access", to_access, PDI_OUT); + if (PDI_OK != PDI_access("to_access", (void**)&to_access, PDI_IN)) { + fprintf(stderr, "*** Error: no-pdi access\n"); + exit(EXIT_FAILURE); + } +} + +void release() //share/release +{ + int to_release[2] = {1, 1}; + PDI_share("to_release", to_release, PDI_OUT); + PDI_access("to_release", (void**)&to_release, PDI_IN); + if (PDI_OK != PDI_release("to_release")) { + fprintf(stderr, "*** Error: no-pdi release\n"); + exit(EXIT_FAILURE); + } +} + +void reclaim() //share/reclaim +{ + int to_reclaim[2] = {1, 1}; + PDI_share("to_reclaim", to_reclaim, PDI_OUT); + if (PDI_OK != PDI_reclaim("to_reclaim")) { + fprintf(stderr, "*** Error: no-pdi reclaim\n"); + exit(EXIT_FAILURE); + } +} + +void event() +{ + if (PDI_OK != PDI_event("event_one")) { + fprintf(stderr, "*** Error: no-pdi event\n"); + exit(EXIT_FAILURE); + } +} + +void expose() +{ + int to_expose[2] = {1, 1}; + if (PDI_OK != PDI_expose("to_expose", to_expose, PDI_OUT)) { + fprintf(stderr, "*** Error: no-pdi expose\n"); + exit(EXIT_FAILURE); + } +} + +void multi_expose() +{ + int to_multi_expose[2] = {1, 1}; + int to_multi_expose_two[2] = {2, 2}; + if (PDI_OK + != PDI_multi_expose("event_two", "to_multi_expose", &to_multi_expose, PDI_OUT, "to_multi_expose_two", to_multi_expose_two, PDI_OUT, NULL)) + { + fprintf(stderr, "*** Error: no-pdi multi_expose\n"); + exit(EXIT_FAILURE); + } +} + +void errhandler() +{ + PDI_errhandler_t current_handler = PDI_errhandler(PDI_NULL_HANDLER); + if (NULL != current_handler.context) { + fprintf(stderr, "*** Error: no-pdi errhandler\n"); + exit(EXIT_FAILURE); + } +} + +int tests(int argc, char* argv[]) +{ +#ifdef PARACONF_FOUND + static const char* CONFIG_YAML + = "logging: trace \n" + "data: \n" + " to_share: {type: array, subtype: int, size: 2} \n" + " to_access: {type: array, subtype: int, size: 2} \n" + " to_release: {type: array, subtype: int, size: 2} \n" + " to_reclaim: {type: array, subtype: int, size: 2} \n" + " to_expose: {type: array, subtype: int, size: 2} \n" + " to_multi_expose: {type: array, subtype: int, size: 2} \n" + " to_multi_expose_two: {type: array, subtype: int, size: 2} \n"; + + if (PDI_OK != PDI_init(PC_parse_string(CONFIG_YAML))) { + fprintf(stderr, "*** Error: no-pdi initialisation\n"); + exit(EXIT_FAILURE); + } +#endif // PARACONF_FOUND + + const char* errmsg = PDI_errmsg(); + if (strcmp(errmsg, "") != 0) { + fprintf(stderr, "*** Error: no-pdi errmsg\n"); + exit(EXIT_FAILURE); + } + + errhandler(); + + share(); + access(); + release(); + reclaim(); + event(); + expose(); + multi_expose(); + + if (PDI_OK != PDI_finalize()) { + fprintf(stderr, "*** Error: no-pdi finalisation\n"); + exit(EXIT_FAILURE); + } + + return EXIT_SUCCESS; +} From 28e5e9ff7d0bcb8413ab6b084d993db35cb2bfeb Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 08:30:34 +0200 Subject: [PATCH 239/372] Reorder ctests commands for incremental installation of Paraconf then PDI 4 --- bin/build_and_run_all_tests | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 1e9b0ded2..441aee56f 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -122,11 +122,11 @@ fi cd "${TEST_DIR_API}" RELATIVE_MODULE_PATH="no-pdi" -NO_PDI_TESTS="test_07_C test_07_CXX" +NO_PDI_TESTS="test_api_C test_api_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} -ldd test_07_C +ldd test_api_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} echo "############ test-api no-pdi/no-paraconf done" @@ -156,10 +156,10 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C echo "############ example no-pdi/paraconf done" cd "${TEST_DIR_API}" -NO_PDI_TESTS="test_07_C test_07_CXX" +NO_PDI_TESTS="test_api_C test_api_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} -ldd test_07_C +ldd test_api_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile From dfa2c4a0d7fb702c7f1ebc27677ad1c0f4f3827b Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 08:38:35 +0200 Subject: [PATCH 240/372] Reorder ctests commands for incremental installation of Paraconf then PDI 5 --- tests/CMakeLists.txt | 6 ++++-- tests/test_api.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0c0b0ad6c..b4af81820 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -82,7 +82,8 @@ target_compile_options(test_api_C PRIVATE # else() # target_link_libraries(test_api_C PDI::PDI_C) # endif() -target_link_libraries(test_api_C PDI::PDI_C) +# target_link_libraries(test_api_C PDI::PDI_C) +target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) add_test(NAME test_api_C COMMAND "$") add_executable(test_api_CXX test_api.cpp) @@ -97,5 +98,6 @@ set_target_properties(test_api_CXX PROPERTIES LINKER_LANGUAGE CXX) # else() # target_link_libraries(test_api_CXX PDI::PDI_C) # endif() -target_link_libraries(test_api_CXX PDI::PDI_C) +# target_link_libraries(test_api_CXX PDI::PDI_C) +target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) add_test(NAME test_api_CXX COMMAND "$") diff --git a/tests/test_api.h b/tests/test_api.h index 238164a4c..175da10d8 100644 --- a/tests/test_api.h +++ b/tests/test_api.h @@ -36,6 +36,7 @@ // #include // #endif #ifdef PARACONF_FOUND +#warning "PARACONF_FOUND, paraconf included in test_api.h" #include #endif From 53ca0e2f0152a6f9875163baf0c8c2720fb02274 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 09:54:17 +0200 Subject: [PATCH 241/372] Reorder ctests commands for incremental installation of Paraconf then PDI 6 --- bin/build_and_run_all_tests | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 441aee56f..7b93378a6 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -56,6 +56,11 @@ mkdir api_pdi cd api_pdi TEST_DIR_API="${PWD}" +cd "${TEST_DIR_ROOT}" +mkdir build_paraconf +cd build_paraconf +BUILD_DIR_PARACONF="${PWD}" + cd "${SRCDIR}" cd "$(dirname "$0")/.." SRCDIR="${PWD}" @@ -132,13 +137,18 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} echo "############ test-api no-pdi/no-paraconf done" # Get Paraconf independently from pdi -# cd "${SRCDIR}/vendor/paraconf*/" -cd "${SRCDIR}" -ls . -cd vendor/paraconf*/ -mkdir build -cd build -cmake -DUSE_SYSTEM_YAML=OFF .. +# # cd "${SRCDIR}/vendor/paraconf*/" +# cd "${SRCDIR}" +# ls . +# cd vendor/paraconf*/ +# mkdir build +# cd build +# cmake -DUSE_SYSTEM_YAML=OFF .. +# make +# make install + +cd "${BUILD_DIR_PARACONF}" +cmake -DUSE_SYSTEM_YAML=OFF "${SRCDIR}/vendor/paraconf*/" make make install From b4a0ffa56d3807250166261a65e73f560588008d Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 09:59:15 +0200 Subject: [PATCH 242/372] Reorder ctests commands for incremental installation of Paraconf then PDI 7 --- tests/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b4af81820..5c03203d2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -82,8 +82,8 @@ target_compile_options(test_api_C PRIVATE # else() # target_link_libraries(test_api_C PDI::PDI_C) # endif() -# target_link_libraries(test_api_C PDI::PDI_C) -target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) +target_link_libraries(test_api_C PDI::PDI_C) +# target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) add_test(NAME test_api_C COMMAND "$") add_executable(test_api_CXX test_api.cpp) @@ -98,6 +98,6 @@ set_target_properties(test_api_CXX PROPERTIES LINKER_LANGUAGE CXX) # else() # target_link_libraries(test_api_CXX PDI::PDI_C) # endif() -# target_link_libraries(test_api_CXX PDI::PDI_C) -target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) +target_link_libraries(test_api_CXX PDI::PDI_C) +# target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) add_test(NAME test_api_CXX COMMAND "$") From 66568508cdfc47ccdb8a698e23e07231575a5cfa Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 10:04:56 +0200 Subject: [PATCH 243/372] Reorder ctests commands for incremental installation of Paraconf then PDI 10 --- bin/build_and_run_all_tests | 4 +++- tests/CMakeLists.txt | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 7b93378a6..09960d8f3 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -148,7 +148,9 @@ echo "############ test-api no-pdi/no-paraconf done" # make install cd "${BUILD_DIR_PARACONF}" -cmake -DUSE_SYSTEM_YAML=OFF "${SRCDIR}/vendor/paraconf*/" +ls ${SRCDIR}/vendor +ls ${SRCDIR}/vendor/paraconf* +cmake -DUSE_SYSTEM_YAML=OFF ${SRCDIR}/vendor/paraconf*/ make make install diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5c03203d2..11e04ecba 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -77,12 +77,12 @@ add_executable(test_api_C test_api.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_api_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) -# if(paraconf_FOUND) -# target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) -# else() -# target_link_libraries(test_api_C PDI::PDI_C) -# endif() -target_link_libraries(test_api_C PDI::PDI_C) +if(paraconf_FOUND) + target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) +else() + target_link_libraries(test_api_C PDI::PDI_C) +endif() +# target_link_libraries(test_api_C PDI::PDI_C) # target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) add_test(NAME test_api_C COMMAND "$") @@ -93,11 +93,11 @@ target_compile_options(test_api_CXX PRIVATE set_target_properties(test_api_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_api_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_api_CXX PROPERTIES LINKER_LANGUAGE CXX) -# if(paraconf_FOUND) -# target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) -# else() -# target_link_libraries(test_api_CXX PDI::PDI_C) -# endif() -target_link_libraries(test_api_CXX PDI::PDI_C) +if(paraconf_FOUND) + target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) +else() + target_link_libraries(test_api_CXX PDI::PDI_C) +endif() +# target_link_libraries(test_api_CXX PDI::PDI_C) # target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) add_test(NAME test_api_CXX COMMAND "$") From 414e81ccbe33ab873b700ec8ca347cea37aba0c2 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 10:25:04 +0200 Subject: [PATCH 244/372] Reorder ctests commands for incremental installation of Paraconf then PDI 11 --- bin/build_and_run_all_tests | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 09960d8f3..e99a1322a 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -150,6 +150,7 @@ echo "############ test-api no-pdi/no-paraconf done" cd "${BUILD_DIR_PARACONF}" ls ${SRCDIR}/vendor ls ${SRCDIR}/vendor/paraconf* +ls ${SRCDIR}/vendor/paraconf*/vendor cmake -DUSE_SYSTEM_YAML=OFF ${SRCDIR}/vendor/paraconf*/ make make install From 0d820fb93baad55a096f81568a4a9b2c97471813 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 10:49:01 +0200 Subject: [PATCH 245/372] Reorder ctests commands for incremental installation of Paraconf then PDI 12 --- bin/build_and_run_all_tests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index e99a1322a..5ec1c9187 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -151,8 +151,8 @@ cd "${BUILD_DIR_PARACONF}" ls ${SRCDIR}/vendor ls ${SRCDIR}/vendor/paraconf* ls ${SRCDIR}/vendor/paraconf*/vendor -cmake -DUSE_SYSTEM_YAML=OFF ${SRCDIR}/vendor/paraconf*/ -make +cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" -DUSE_SYSTEM_YAML=OFF ${SRCDIR}/vendor/paraconf* +make ${MAKEFLAGS} make install echo "############ got paraconf" From c3fdb3a00606e25ffb6f31a45a7a21635598a8da Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 11:10:52 +0200 Subject: [PATCH 246/372] Fix github action (CI) access issue of tests.xml --- .github/actions/test/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 911756d7d..89c153521 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -44,7 +44,7 @@ runs: JOBID="$(echo "${{github.run_id}}"|md5sum|cut -b 1)" if [[ "01234567" == *"${JOBID}"* ]]; then export PDI_PLUGIN_PATH=/tmp/pdi_plugins; fi export MAKEFLAGS='-j 4' - export CTEST_FLAGS="--output-junit /tests.xml" + export CTEST_FLAGS="--output-junit /tmp/tests.xml" export TEST_DIR="/tmp" /src/bin/build_and_run_all_tests EOF @@ -54,7 +54,7 @@ runs: --tmpfs /tmp:exec \ ${{inputs.image}} \ bash /src/run.sh - if docker cp "$(cat docker.cid)":/tests.xml tests.xml + if docker cp "$(cat docker.cid)":/tmp/tests.xml tests.xml then echo "with_report=true" >> "$GITHUB_OUTPUT" else echo "with_report=false" >> "$GITHUB_OUTPUT" fi From dde8e788781b5d5295ad8022904f43ee129377f5 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 13:50:43 +0200 Subject: [PATCH 247/372] Reorder ctests commands for incremental installation of Paraconf then PDI 13 --- tests/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 11e04ecba..30627565d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -44,6 +44,13 @@ include(CTest) # message(WARNING "Paraconf not found") # endif() # endif() + +find_package(paraconf 1.0.0 COMPONENTS C) +if(paraconf_FOUND) + message(WARNING "Paraconf found for test-api") +else() + message(WARNING "Paraconf not found for test-api") +endif() find_package(PDI REQUIRED COMPONENTS C) if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") From 1ae59dafb6eee774124cc9aa0e9dafd375f0dcb4 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 13:56:33 +0200 Subject: [PATCH 248/372] Reorder ctests commands for incremental installation of Paraconf then PDI 14 --- bin/build_and_run_all_tests | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 5ec1c9187..bb0a1af10 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -151,7 +151,8 @@ cd "${BUILD_DIR_PARACONF}" ls ${SRCDIR}/vendor ls ${SRCDIR}/vendor/paraconf* ls ${SRCDIR}/vendor/paraconf*/vendor -cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" -DUSE_SYSTEM_YAML=OFF ${SRCDIR}/vendor/paraconf* +# cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" -DUSE_SYSTEM_YAML=OFF ${SRCDIR}/vendor/paraconf* +cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" ${SRCDIR}/vendor/paraconf* make ${MAKEFLAGS} make install From 437e4d9d4acf3a45d20f35407e0dac6357111475 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 13:58:47 +0200 Subject: [PATCH 249/372] Reorder ctests commands for incremental installation of Paraconf then PDI 15 --- bin/build_and_run_all_tests | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index bb0a1af10..e0b803e11 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -148,9 +148,10 @@ echo "############ test-api no-pdi/no-paraconf done" # make install cd "${BUILD_DIR_PARACONF}" -ls ${SRCDIR}/vendor -ls ${SRCDIR}/vendor/paraconf* -ls ${SRCDIR}/vendor/paraconf*/vendor +# ls ${SRCDIR}/vendor +# ls ${SRCDIR}/vendor/paraconf* +# ls ${SRCDIR}/vendor/paraconf*/vendor +ls ${SRCDIR}/vendor/paraconf*/vendor/libyaml-0.2.2 # cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" -DUSE_SYSTEM_YAML=OFF ${SRCDIR}/vendor/paraconf* cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" ${SRCDIR}/vendor/paraconf* make ${MAKEFLAGS} From 9d3d5314fd54b8882605f8f8ef6e7162a3530ad4 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 14:23:13 +0200 Subject: [PATCH 250/372] Reorder ctests commands for incremental installation of Paraconf then PDI 16 --- .github/workflows/tests.yml | 5 ++++- bin/build_and_run_all_tests | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fe615162f..7a08abd1c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -53,7 +53,10 @@ jobs: strategy: fail-fast: false matrix: - base: ['ubuntu/focal', 'ubuntu/rolling', 'debian/bookworm', 'debian/unstable'] + # base: ['ubuntu/focal', 'ubuntu/rolling', 'debian/bookworm', 'debian/unstable'] + # mpi: ['openmpi', 'mpich'] + # variant: ['mini', 'all'] + base: ['debian/bookworm'] mpi: ['openmpi', 'mpich'] variant: ['mini', 'all'] runs-on: ubuntu-24.04 diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index e0b803e11..ead256b2d 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -153,7 +153,8 @@ cd "${BUILD_DIR_PARACONF}" # ls ${SRCDIR}/vendor/paraconf*/vendor ls ${SRCDIR}/vendor/paraconf*/vendor/libyaml-0.2.2 # cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" -DUSE_SYSTEM_YAML=OFF ${SRCDIR}/vendor/paraconf* -cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" ${SRCDIR}/vendor/paraconf* +# cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" ${SRCDIR}/vendor/paraconf* +cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=TRUE -DUSE_yaml:STRING=SYSTEM -DBUILD_TESTING:BOOL=OFF ${SRCDIR}/vendor/paraconf* make ${MAKEFLAGS} make install From 5a7865e1ab0454a1fec3e8274a06c2ebd0966f4f Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 16:08:13 +0200 Subject: [PATCH 251/372] Reorder ctests commands for incremental installation of Paraconf then PDI 17 --- .github/workflows/tests.yml | 6 +++++- bin/build_and_run_all_tests | 3 +-- tests/CMakeLists.txt | 2 +- vendor/paraconf-1.0.0/CMakeLists.txt | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7a08abd1c..20e3464b5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,7 +36,11 @@ jobs: strategy: fail-fast: false matrix: - version: ['latest', 'oldest'] + # version: ['latest', 'oldest'] + # compiler: ['gcc', 'clang'] + # mpi: ['openmpi', 'mpich'] + # variant: ['mini', 'all'] + version: ['latest'] compiler: ['gcc', 'clang'] mpi: ['openmpi', 'mpich'] variant: ['mini', 'all'] diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index ead256b2d..e0b803e11 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -153,8 +153,7 @@ cd "${BUILD_DIR_PARACONF}" # ls ${SRCDIR}/vendor/paraconf*/vendor ls ${SRCDIR}/vendor/paraconf*/vendor/libyaml-0.2.2 # cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" -DUSE_SYSTEM_YAML=OFF ${SRCDIR}/vendor/paraconf* -# cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" ${SRCDIR}/vendor/paraconf* -cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=TRUE -DUSE_yaml:STRING=SYSTEM -DBUILD_TESTING:BOOL=OFF ${SRCDIR}/vendor/paraconf* +cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" ${SRCDIR}/vendor/paraconf* make ${MAKEFLAGS} make install diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 30627565d..597bec6a2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -45,7 +45,7 @@ include(CTest) # endif() # endif() -find_package(paraconf 1.0.0 COMPONENTS C) +# find_package(paraconf 1.0.0 COMPONENTS C) if(paraconf_FOUND) message(WARNING "Paraconf found for test-api") else() diff --git a/vendor/paraconf-1.0.0/CMakeLists.txt b/vendor/paraconf-1.0.0/CMakeLists.txt index 6f2f1b603..727a9838f 100644 --- a/vendor/paraconf-1.0.0/CMakeLists.txt +++ b/vendor/paraconf-1.0.0/CMakeLists.txt @@ -107,7 +107,8 @@ endif() ## Yaml sbuild_add_dependency(yaml "${USE_DEFAULT}" - EMBEDDED_PATH "vendor/libyaml-0.2.2.tar" + # EMBEDDED_PATH "vendor/libyaml-0.2.2.tar" + EMBEDDED_PATH vendor/libyaml* CMAKE_CACHE_ARGS "-DBUILD_TESTING:BOOL=OFF" "-DINSTALL_LIB_DIR:STRING=${CMAKE_INSTALL_LIBDIR}" From c96f63ac5848001c7956a0cc32b18db59b80c0dd Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 16:12:14 +0200 Subject: [PATCH 252/372] Reorder ctests commands for incremental installation of Paraconf then PDI 18 --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 597bec6a2..30627565d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -45,7 +45,7 @@ include(CTest) # endif() # endif() -# find_package(paraconf 1.0.0 COMPONENTS C) +find_package(paraconf 1.0.0 COMPONENTS C) if(paraconf_FOUND) message(WARNING "Paraconf found for test-api") else() From 6fe24793e5bbfa2dae58a803a441635d38e799e2 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 16:14:25 +0200 Subject: [PATCH 253/372] Reorder ctests commands for incremental installation of Paraconf then PDI 19 --- vendor/paraconf-1.0.0/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vendor/paraconf-1.0.0/CMakeLists.txt b/vendor/paraconf-1.0.0/CMakeLists.txt index 727a9838f..6f2f1b603 100644 --- a/vendor/paraconf-1.0.0/CMakeLists.txt +++ b/vendor/paraconf-1.0.0/CMakeLists.txt @@ -107,8 +107,7 @@ endif() ## Yaml sbuild_add_dependency(yaml "${USE_DEFAULT}" - # EMBEDDED_PATH "vendor/libyaml-0.2.2.tar" - EMBEDDED_PATH vendor/libyaml* + EMBEDDED_PATH "vendor/libyaml-0.2.2.tar" CMAKE_CACHE_ARGS "-DBUILD_TESTING:BOOL=OFF" "-DINSTALL_LIB_DIR:STRING=${CMAKE_INSTALL_LIBDIR}" From 5734392ce24f8f33c32cc2473a1310eb159b2cc6 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 16:17:01 +0200 Subject: [PATCH 254/372] Reorder ctests commands for incremental installation of Paraconf then PDI 20 --- vendor/paraconf-1.0.0/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vendor/paraconf-1.0.0/CMakeLists.txt b/vendor/paraconf-1.0.0/CMakeLists.txt index 6f2f1b603..e96b14cf0 100644 --- a/vendor/paraconf-1.0.0/CMakeLists.txt +++ b/vendor/paraconf-1.0.0/CMakeLists.txt @@ -107,7 +107,8 @@ endif() ## Yaml sbuild_add_dependency(yaml "${USE_DEFAULT}" - EMBEDDED_PATH "vendor/libyaml-0.2.2.tar" + # EMBEDDED_PATH "vendor/libyaml-0.2.2.tar" + EMBEDDED_PATH "vendor/libyaml-0.2.5" CMAKE_CACHE_ARGS "-DBUILD_TESTING:BOOL=OFF" "-DINSTALL_LIB_DIR:STRING=${CMAKE_INSTALL_LIBDIR}" From 046af3d8807bd437cebff03513cabc1edbb92db2 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 16:19:32 +0200 Subject: [PATCH 255/372] Reorder ctests commands for incremental installation of Paraconf then PDI 21 --- vendor/paraconf-1.0.0/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/paraconf-1.0.0/CMakeLists.txt b/vendor/paraconf-1.0.0/CMakeLists.txt index e96b14cf0..ca606ce2a 100644 --- a/vendor/paraconf-1.0.0/CMakeLists.txt +++ b/vendor/paraconf-1.0.0/CMakeLists.txt @@ -108,7 +108,7 @@ endif() sbuild_add_dependency(yaml "${USE_DEFAULT}" # EMBEDDED_PATH "vendor/libyaml-0.2.2.tar" - EMBEDDED_PATH "vendor/libyaml-0.2.5" + EMBEDDED_PATH "vendor/libyaml-0.2.2" CMAKE_CACHE_ARGS "-DBUILD_TESTING:BOOL=OFF" "-DINSTALL_LIB_DIR:STRING=${CMAKE_INSTALL_LIBDIR}" From ea1273f4923d2f7d49c33093cdbf4ed49848aa63 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 16:23:49 +0200 Subject: [PATCH 256/372] Reorder ctests commands for incremental installation of Paraconf then PDI 22 --- bin/build_and_run_all_tests | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index e0b803e11..0eeec52ea 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -153,7 +153,8 @@ cd "${BUILD_DIR_PARACONF}" # ls ${SRCDIR}/vendor/paraconf*/vendor ls ${SRCDIR}/vendor/paraconf*/vendor/libyaml-0.2.2 # cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" -DUSE_SYSTEM_YAML=OFF ${SRCDIR}/vendor/paraconf* -cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" ${SRCDIR}/vendor/paraconf* +# cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" ${SRCDIR}/vendor/paraconf* +cmake -DCMAKE_PREFIX_PATH=${SRCDIR}/vendor/paraconf*/vendor/libyaml* -DCMAKE_INSTALL_PREFIX="./install_paraconf" ${SRCDIR}/vendor/paraconf* make ${MAKEFLAGS} make install From e4dfc1f3d88225ab95e5280e53a5599e5b74a06a Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 31 Jul 2025 16:39:57 +0200 Subject: [PATCH 257/372] Reorder ctests commands for incremental installation of Paraconf then PDI 23 --- bin/build_and_run_all_tests | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 0eeec52ea..ddef659bb 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -147,14 +147,29 @@ echo "############ test-api no-pdi/no-paraconf done" # make # make install +# cd "${BUILD_DIR_PARACONF}" +# # ls ${SRCDIR}/vendor +# # ls ${SRCDIR}/vendor/paraconf* +# # ls ${SRCDIR}/vendor/paraconf*/vendor +# ls ${SRCDIR}/vendor/paraconf*/vendor/libyaml-0.2.2 +# # cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" -DUSE_SYSTEM_YAML=OFF ${SRCDIR}/vendor/paraconf* +# # cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" ${SRCDIR}/vendor/paraconf* +# cmake -DCMAKE_PREFIX_PATH=${SRCDIR}/vendor/paraconf*/vendor/libyaml* -DCMAKE_INSTALL_PREFIX="./install_paraconf" ${SRCDIR}/vendor/paraconf* +# make ${MAKEFLAGS} +# make install + cd "${BUILD_DIR_PARACONF}" -# ls ${SRCDIR}/vendor -# ls ${SRCDIR}/vendor/paraconf* -# ls ${SRCDIR}/vendor/paraconf*/vendor -ls ${SRCDIR}/vendor/paraconf*/vendor/libyaml-0.2.2 -# cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" -DUSE_SYSTEM_YAML=OFF ${SRCDIR}/vendor/paraconf* -# cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" ${SRCDIR}/vendor/paraconf* -cmake -DCMAKE_PREFIX_PATH=${SRCDIR}/vendor/paraconf*/vendor/libyaml* -DCMAKE_INSTALL_PREFIX="./install_paraconf" ${SRCDIR}/vendor/paraconf* +PARACONF_SRC=( ${SRCDIR}/vendor/paraconf* ) +LIBYAML_DIR=( ${SRCDIR}/vendor/paraconf*/vendor/libyaml* ) +ls "${LIBYAML_DIR[0]}" +if [[ ${#PARACONF_SRC[@]} -ne 1 ]] || [[ ${#LIBYAML_DIR[@]} -ne 1 ]]; then + echo "Error: paraconf* or libyaml* did not match exactly one directory" + exit 1 +fi +cmake \ + -DCMAKE_PREFIX_PATH="${LIBYAML_DIR[0]}" \ + -DCMAKE_INSTALL_PREFIX="./install_paraconf" \ + "${PARACONF_SRC[0]}" make ${MAKEFLAGS} make install From 726300bf517b658c3fb74225bdc97b69e1f3e1c2 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 09:16:43 +0200 Subject: [PATCH 258/372] Reorder ctests commands for incremental installation of Paraconf then PDI 24 --- vendor/paraconf-1.0.0/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vendor/paraconf-1.0.0/CMakeLists.txt b/vendor/paraconf-1.0.0/CMakeLists.txt index ca606ce2a..6f2f1b603 100644 --- a/vendor/paraconf-1.0.0/CMakeLists.txt +++ b/vendor/paraconf-1.0.0/CMakeLists.txt @@ -107,8 +107,7 @@ endif() ## Yaml sbuild_add_dependency(yaml "${USE_DEFAULT}" - # EMBEDDED_PATH "vendor/libyaml-0.2.2.tar" - EMBEDDED_PATH "vendor/libyaml-0.2.2" + EMBEDDED_PATH "vendor/libyaml-0.2.2.tar" CMAKE_CACHE_ARGS "-DBUILD_TESTING:BOOL=OFF" "-DINSTALL_LIB_DIR:STRING=${CMAKE_INSTALL_LIBDIR}" From 454028bee04a7021e8cc7ae84d28eb9eef28f0aa Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 11:01:04 +0200 Subject: [PATCH 259/372] Reorder ctests commands for incremental installation of Paraconf then PDI 25 --- bin/build_and_run_all_tests | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index ddef659bb..e95d0fb7c 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -158,19 +158,28 @@ echo "############ test-api no-pdi/no-paraconf done" # make ${MAKEFLAGS} # make install +# cd "${BUILD_DIR_PARACONF}" +# PARACONF_SRC=( ${SRCDIR}/vendor/paraconf* ) +# LIBYAML_DIR=( ${SRCDIR}/vendor/paraconf*/vendor/libyaml* ) +# ls "${LIBYAML_DIR[0]}" +# if [[ ${#PARACONF_SRC[@]} -ne 1 ]] || [[ ${#LIBYAML_DIR[@]} -ne 1 ]]; then +# echo "Error: paraconf* or libyaml* did not match exactly one directory" +# exit 1 +# fi +# cmake \ +# -DCMAKE_PREFIX_PATH="${LIBYAML_DIR[0]}" \ +# -DCMAKE_INSTALL_PREFIX="./install_paraconf" \ +# "${PARACONF_SRC[0]}" +# make ${MAKEFLAGS} +# make install + cd "${BUILD_DIR_PARACONF}" -PARACONF_SRC=( ${SRCDIR}/vendor/paraconf* ) -LIBYAML_DIR=( ${SRCDIR}/vendor/paraconf*/vendor/libyaml* ) -ls "${LIBYAML_DIR[0]}" -if [[ ${#PARACONF_SRC[@]} -ne 1 ]] || [[ ${#LIBYAML_DIR[@]} -ne 1 ]]; then - echo "Error: paraconf* or libyaml* did not match exactly one directory" - exit 1 -fi -cmake \ - -DCMAKE_PREFIX_PATH="${LIBYAML_DIR[0]}" \ - -DCMAKE_INSTALL_PREFIX="./install_paraconf" \ - "${PARACONF_SRC[0]}" -make ${MAKEFLAGS} +git clone git@github.com:pdidev/paraconf.git +cd paraconf +mkdir build +cd build +cmake -DUSE_SYSTEM_YAML=OFF .. +make make install echo "############ got paraconf" From 602bd2c2eaa3ad0f374ea54aad59f7cad961e1d6 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 11:03:00 +0200 Subject: [PATCH 260/372] Reorder ctests commands for incremental installation of Paraconf then PDI 26 --- bin/build_and_run_all_tests | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index e95d0fb7c..93fce5b8e 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -174,7 +174,10 @@ echo "############ test-api no-pdi/no-paraconf done" # make install cd "${BUILD_DIR_PARACONF}" -git clone git@github.com:pdidev/paraconf.git +# git clone git@github.com:pdidev/paraconf.git +wget https://github.com/pdidev/paraconf/archive/1.0.0.tar.gz +tar -xzf 1.0.0.tar.gz +mv paraconf-1.0.0 paraconf cd paraconf mkdir build cd build From 277ba833caca720345ef85627bfdb042be0d4115 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 11:17:03 +0200 Subject: [PATCH 261/372] Reorder ctests commands for incremental installation of Paraconf then PDI 27 --- bin/build_and_run_all_tests | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 93fce5b8e..2aeaba6b2 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -128,7 +128,6 @@ fi cd "${TEST_DIR_API}" RELATIVE_MODULE_PATH="no-pdi" NO_PDI_TESTS="test_api_C test_api_CXX" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} ldd test_api_C @@ -175,10 +174,13 @@ echo "############ test-api no-pdi/no-paraconf done" cd "${BUILD_DIR_PARACONF}" # git clone git@github.com:pdidev/paraconf.git -wget https://github.com/pdidev/paraconf/archive/1.0.0.tar.gz -tar -xzf 1.0.0.tar.gz -mv paraconf-1.0.0 paraconf -cd paraconf +# wget https://github.com/pdidev/paraconf/archive/1.0.0.tar.gz +# tar -xzf 1.0.0.tar.gz +# mv paraconf-1.0.0 paraconf +cp ${SRCDIR}/vendor/paraconf*/ . +cd paraconf* +# sed EMBEDDED_PATH "vendor/libyaml-0.2.2.tar" +sed -i 's|EMBEDDED_PATH "vendor/libyaml-0.2.2.tar"|EMBEDDED_PATH "vendor/libyaml*"|' "CMakeLists.txt" mkdir build cd build cmake -DUSE_SYSTEM_YAML=OFF .. From 853b68b3659601188544c429fa30605fd410db7a Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 11:21:37 +0200 Subject: [PATCH 262/372] Reorder ctests commands for incremental installation of Paraconf then PDI 28 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 2aeaba6b2..5fb0b86ef 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -177,7 +177,7 @@ cd "${BUILD_DIR_PARACONF}" # wget https://github.com/pdidev/paraconf/archive/1.0.0.tar.gz # tar -xzf 1.0.0.tar.gz # mv paraconf-1.0.0 paraconf -cp ${SRCDIR}/vendor/paraconf*/ . +cp -r ${SRCDIR}/vendor/paraconf*/ . cd paraconf* # sed EMBEDDED_PATH "vendor/libyaml-0.2.2.tar" sed -i 's|EMBEDDED_PATH "vendor/libyaml-0.2.2.tar"|EMBEDDED_PATH "vendor/libyaml*"|' "CMakeLists.txt" From 8b77f8b901cadab1e4c94d490ec105d734d7b469 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 11:27:47 +0200 Subject: [PATCH 263/372] Reorder ctests commands for incremental installation of Paraconf then PDI 29 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 5fb0b86ef..32d5afb4a 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -180,7 +180,7 @@ cd "${BUILD_DIR_PARACONF}" cp -r ${SRCDIR}/vendor/paraconf*/ . cd paraconf* # sed EMBEDDED_PATH "vendor/libyaml-0.2.2.tar" -sed -i 's|EMBEDDED_PATH "vendor/libyaml-0.2.2.tar"|EMBEDDED_PATH "vendor/libyaml*"|' "CMakeLists.txt" +sed -i 's|EMBEDDED_PATH "vendor/libyaml-0.2.2.tar"|EMBEDDED_PATH \"$(ls vendor/libyaml*)\"|' "CMakeLists.txt" mkdir build cd build cmake -DUSE_SYSTEM_YAML=OFF .. From 3cdaca4c79575626d75feb31949b068aab611bca Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 11:30:00 +0200 Subject: [PATCH 264/372] Reorder ctests commands for incremental installation of Paraconf then PDI 30 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 32d5afb4a..0a6e874c6 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -183,7 +183,7 @@ cd paraconf* sed -i 's|EMBEDDED_PATH "vendor/libyaml-0.2.2.tar"|EMBEDDED_PATH \"$(ls vendor/libyaml*)\"|' "CMakeLists.txt" mkdir build cd build -cmake -DUSE_SYSTEM_YAML=OFF .. +cmake -DUSE_SYSTEM_YAML=OFF -DCMAKE_INSTALL_PREFIX="./install_paraconf" .. make make install From 06452b910dd75a955e062bb8ecd65f19b41ea041 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 11:32:02 +0200 Subject: [PATCH 265/372] Reorder ctests commands for incremental installation of Paraconf then PDI 31 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 0a6e874c6..3221879b1 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -180,7 +180,7 @@ cd "${BUILD_DIR_PARACONF}" cp -r ${SRCDIR}/vendor/paraconf*/ . cd paraconf* # sed EMBEDDED_PATH "vendor/libyaml-0.2.2.tar" -sed -i 's|EMBEDDED_PATH "vendor/libyaml-0.2.2.tar"|EMBEDDED_PATH \"$(ls vendor/libyaml*)\"|' "CMakeLists.txt" +sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(ls vendor/libyaml*)\"|" CMakeLists.txt mkdir build cd build cmake -DUSE_SYSTEM_YAML=OFF -DCMAKE_INSTALL_PREFIX="./install_paraconf" .. From 2368539c91ac56c59cfbfdaa8736ccbf555884f2 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 11:39:21 +0200 Subject: [PATCH 266/372] Reorder ctests commands for incremental installation of Paraconf then PDI 32 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 3221879b1..193eea2dc 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -180,7 +180,7 @@ cd "${BUILD_DIR_PARACONF}" cp -r ${SRCDIR}/vendor/paraconf*/ . cd paraconf* # sed EMBEDDED_PATH "vendor/libyaml-0.2.2.tar" -sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(ls vendor/libyaml*)\"|" CMakeLists.txt +sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(ls vendor/libyaml-*)\"|" CMakeLists.txt mkdir build cd build cmake -DUSE_SYSTEM_YAML=OFF -DCMAKE_INSTALL_PREFIX="./install_paraconf" .. From 2b44ba5f8e4c99aa9da1b09e7d909af826589374 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 11:43:25 +0200 Subject: [PATCH 267/372] Reorder ctests commands for incremental installation of Paraconf then PDI 33 --- bin/build_and_run_all_tests | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 193eea2dc..ba4273366 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -179,7 +179,8 @@ cd "${BUILD_DIR_PARACONF}" # mv paraconf-1.0.0 paraconf cp -r ${SRCDIR}/vendor/paraconf*/ . cd paraconf* -# sed EMBEDDED_PATH "vendor/libyaml-0.2.2.tar" +# sed EMBEDDED_PATH "vendor/libyaml-0.2.2.tar"* +ls vendor/libyaml sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(ls vendor/libyaml-*)\"|" CMakeLists.txt mkdir build cd build From 1d1fde0100c920db1935a2d4bf0986179ee72a4a Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 11:44:47 +0200 Subject: [PATCH 268/372] Reorder ctests commands for incremental installation of Paraconf then PDI 34 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index ba4273366..5250d0828 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -180,7 +180,7 @@ cd "${BUILD_DIR_PARACONF}" cp -r ${SRCDIR}/vendor/paraconf*/ . cd paraconf* # sed EMBEDDED_PATH "vendor/libyaml-0.2.2.tar"* -ls vendor/libyaml +ls vendor/libyaml* sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(ls vendor/libyaml-*)\"|" CMakeLists.txt mkdir build cd build From a5fb4bf1b31e1111b9e0af318cad13b3d05632c9 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 13:42:17 +0200 Subject: [PATCH 269/372] Reorder ctests commands for incremental installation of Paraconf then PDI 35 --- bin/build_and_run_all_tests | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 5250d0828..2cb967bdc 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -181,7 +181,9 @@ cp -r ${SRCDIR}/vendor/paraconf*/ . cd paraconf* # sed EMBEDDED_PATH "vendor/libyaml-0.2.2.tar"* ls vendor/libyaml* -sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(ls vendor/libyaml-*)\"|" CMakeLists.txt +echo "---" +# sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(ls vendor/libyaml-*)\"|" CMakeLists.txt +sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(basename "$(ls vendor/libyaml-*.tar)" .tar)\"|" CMakeLists.txt mkdir build cd build cmake -DUSE_SYSTEM_YAML=OFF -DCMAKE_INSTALL_PREFIX="./install_paraconf" .. From 2aa9a58bd9a252af567f671e5db6cffe26b5d17e Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 13:48:01 +0200 Subject: [PATCH 270/372] Reorder ctests commands for incremental installation of Paraconf then PDI 36 --- bin/build_and_run_all_tests | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 2cb967bdc..7cab54565 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -183,7 +183,8 @@ cd paraconf* ls vendor/libyaml* echo "---" # sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(ls vendor/libyaml-*)\"|" CMakeLists.txt -sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(basename "$(ls vendor/libyaml-*.tar)" .tar)\"|" CMakeLists.txt +# sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(basename "$(ls vendor/libyaml-*.tar)" .tar)\"|" CMakeLists.txt +sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"vendor/libyaml-0.2.2\"|" CMakeLists.txt mkdir build cd build cmake -DUSE_SYSTEM_YAML=OFF -DCMAKE_INSTALL_PREFIX="./install_paraconf" .. From 32a5f3fc410d358c4b77bc936a3de5dc8dd264cb Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 14:06:22 +0200 Subject: [PATCH 271/372] Reorder ctests commands for incremental installation of Paraconf then PDI 37 --- bin/build_and_run_all_tests | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 7cab54565..b49c3e19b 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -126,9 +126,9 @@ fi # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf cd "${TEST_DIR_API}" -RELATIVE_MODULE_PATH="no-pdi" +RELATIVE_NO_PDI_PATH="no-pdi" NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} ldd test_api_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} @@ -196,8 +196,9 @@ echo "############ got paraconf" # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf cd "${TEST_DIR_NO_PDI}" -RELATIVE_MODULE_PATH="no-pdi" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +# RELATIVE_NO_PDI_PATH="no-pdi" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}:${BUILD_DIR_PARACONF}/paraconf*/build/install_paraconf" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ldd PDI_example_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C @@ -206,7 +207,7 @@ echo "############ example no-pdi/paraconf done" cd "${TEST_DIR_API}" NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_MODULE_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} ldd test_api_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From 139f5234ac88e737aa82e53f197b27a6cb01d49b Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 14:16:55 +0200 Subject: [PATCH 272/372] Reorder ctests commands for incremental installation of Paraconf then PDI 38 --- bin/build_and_run_all_tests | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index b49c3e19b..7adee7080 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -172,26 +172,26 @@ echo "############ test-api no-pdi/no-paraconf done" # make ${MAKEFLAGS} # make install -cd "${BUILD_DIR_PARACONF}" -# git clone git@github.com:pdidev/paraconf.git -# wget https://github.com/pdidev/paraconf/archive/1.0.0.tar.gz -# tar -xzf 1.0.0.tar.gz -# mv paraconf-1.0.0 paraconf -cp -r ${SRCDIR}/vendor/paraconf*/ . -cd paraconf* -# sed EMBEDDED_PATH "vendor/libyaml-0.2.2.tar"* -ls vendor/libyaml* -echo "---" -# sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(ls vendor/libyaml-*)\"|" CMakeLists.txt -# sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(basename "$(ls vendor/libyaml-*.tar)" .tar)\"|" CMakeLists.txt -sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"vendor/libyaml-0.2.2\"|" CMakeLists.txt -mkdir build -cd build -cmake -DUSE_SYSTEM_YAML=OFF -DCMAKE_INSTALL_PREFIX="./install_paraconf" .. -make -make install - -echo "############ got paraconf" +# cd "${BUILD_DIR_PARACONF}" +# # git clone git@github.com:pdidev/paraconf.git +# # wget https://github.com/pdidev/paraconf/archive/1.0.0.tar.gz +# # tar -xzf 1.0.0.tar.gz +# # mv paraconf-1.0.0 paraconf +# cp -r ${SRCDIR}/vendor/paraconf*/ . +# cd paraconf* +# # sed EMBEDDED_PATH "vendor/libyaml-0.2.2.tar"* +# ls vendor/libyaml* +# echo "---" +# # sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(ls vendor/libyaml-*)\"|" CMakeLists.txt +# # sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(basename "$(ls vendor/libyaml-*.tar)" .tar)\"|" CMakeLists.txt +# sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"vendor/libyaml-0.2.2\"|" CMakeLists.txt +# mkdir build +# cd build +# cmake -DUSE_SYSTEM_YAML=OFF -DCMAKE_INSTALL_PREFIX="./install_paraconf" .. +# make +# make install + +# echo "############ got paraconf" # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf From b40afb1345b44d3bcdc6a0610634fb2a0ee2147f Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 14:20:05 +0200 Subject: [PATCH 273/372] Reorder ctests commands for incremental installation of Paraconf then PDI 39 --- tests/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 30627565d..f3a975269 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -84,7 +84,8 @@ add_executable(test_api_C test_api.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_api_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) -if(paraconf_FOUND) +# if(paraconf_FOUND) +if(BUILD_WITH_PARACONF) target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) else() target_link_libraries(test_api_C PDI::PDI_C) @@ -100,7 +101,8 @@ target_compile_options(test_api_CXX PRIVATE set_target_properties(test_api_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_api_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_api_CXX PROPERTIES LINKER_LANGUAGE CXX) -if(paraconf_FOUND) +# if(paraconf_FOUND) +if(BUILD_WITH_PARACONF) target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) else() target_link_libraries(test_api_CXX PDI::PDI_C) From 1d18d3235b24990dc30873a75172cbf28277a385 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 14:22:06 +0200 Subject: [PATCH 274/372] Reorder ctests commands for incremental installation of Paraconf then PDI 40 --- bin/build_and_run_all_tests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 7adee7080..3eb9a91a0 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -197,8 +197,8 @@ echo "############ test-api no-pdi/no-paraconf done" cd "${TEST_DIR_NO_PDI}" # RELATIVE_NO_PDI_PATH="no-pdi" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}:${BUILD_DIR_PARACONF}/paraconf*/build/install_paraconf" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}:${BUILD_DIR_PARACONF}/paraconf*/build/install_paraconf" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ldd PDI_example_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C From 909945e527945aabdea2bf296c3a8e7ea7b36f0e Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 14:49:52 +0200 Subject: [PATCH 275/372] Reorder ctests commands for incremental installation of Paraconf then PDI 41 --- bin/build_and_run_all_tests | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 3eb9a91a0..5f7917864 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -123,17 +123,6 @@ then fi -# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf - -cd "${TEST_DIR_API}" -RELATIVE_NO_PDI_PATH="no-pdi" -NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -make ${MAKEFLAGS} -ldd test_api_C -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} - -echo "############ test-api no-pdi/no-paraconf done" # Get Paraconf independently from pdi # # cd "${SRCDIR}/vendor/paraconf*/" @@ -225,6 +214,18 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $ echo "############ tests pdi/paraconf done" +# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf + +apt-get uninstall libparaconf-dev +cd "${TEST_DIR_API}" +RELATIVE_NO_PDI_PATH="no-pdi" +NO_PDI_TESTS="test_api_C test_api_CXX" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +make ${MAKEFLAGS} +ldd test_api_C +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} + +echo "############ test-api no-pdi/no-paraconf done" From 54d6cf3516b0d5a1df74f8745485bb24a0ff86fa Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 14:54:54 +0200 Subject: [PATCH 276/372] Reorder ctests commands for incremental installation of Paraconf then PDI 42 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 5f7917864..1520babbd 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -185,7 +185,7 @@ fi # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf cd "${TEST_DIR_NO_PDI}" -# RELATIVE_NO_PDI_PATH="no-pdi" +RELATIVE_NO_PDI_PATH="no-pdi" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}:${BUILD_DIR_PARACONF}/paraconf*/build/install_paraconf" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} From c23e5864086b5632abfcc22ffcede44581e713ab Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 15:04:11 +0200 Subject: [PATCH 277/372] Reorder ctests commands for incremental installation of Paraconf then PDI 43 --- bin/build_and_run_all_tests | 19 ++++++++++--------- tests/CMakeLists.txt | 8 ++++---- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 1520babbd..0710fc2d9 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -194,15 +194,15 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C echo "############ example no-pdi/paraconf done" -cd "${TEST_DIR_API}" -NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -make ${MAKEFLAGS} -ldd test_api_C -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile +# cd "${TEST_DIR_API}" +# NO_PDI_TESTS="test_api_C test_api_CXX" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +# make ${MAKEFLAGS} +# ldd test_api_C +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +# rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile -echo "############ test-api no-pdi/paraconf done" +# echo "############ test-api no-pdi/paraconf done" # Configure, build & test for pdi, with Paraconf @@ -221,7 +221,8 @@ apt-get uninstall libparaconf-dev cd "${TEST_DIR_API}" RELATIVE_NO_PDI_PATH="no-pdi" NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} ldd test_api_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f3a975269..f79ac4509 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -84,8 +84,8 @@ add_executable(test_api_C test_api.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_api_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) -# if(paraconf_FOUND) -if(BUILD_WITH_PARACONF) +if(paraconf_FOUND) +# if(BUILD_WITH_PARACONF) target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) else() target_link_libraries(test_api_C PDI::PDI_C) @@ -101,8 +101,8 @@ target_compile_options(test_api_CXX PRIVATE set_target_properties(test_api_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_api_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_api_CXX PROPERTIES LINKER_LANGUAGE CXX) -# if(paraconf_FOUND) -if(BUILD_WITH_PARACONF) +if(paraconf_FOUND) +# if(BUILD_WITH_PARACONF) target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) else() target_link_libraries(test_api_CXX PDI::PDI_C) From b90fcd20b87fc0ba5ae5f2fd4ced9b0a0c1106f3 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 15:06:25 +0200 Subject: [PATCH 278/372] Reorder ctests commands for incremental installation of Paraconf then PDI 44 --- bin/build_and_run_all_tests | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 0710fc2d9..7b474af6d 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -186,7 +186,8 @@ fi cd "${TEST_DIR_NO_PDI}" RELATIVE_NO_PDI_PATH="no-pdi" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}:${BUILD_DIR_PARACONF}/paraconf*/build/install_paraconf" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ldd PDI_example_C From 8002a5615b1e54e6656f38a3528a330db7dad121 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 15:09:22 +0200 Subject: [PATCH 279/372] Reorder ctests commands for incremental installation of Paraconf then PDI 45 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 7b474af6d..24c94c61f 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -187,7 +187,7 @@ fi cd "${TEST_DIR_NO_PDI}" RELATIVE_NO_PDI_PATH="no-pdi" # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}:${BUILD_DIR_PARACONF}/paraconf*/build/install_paraconf" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ldd PDI_example_C From a68ddfb23989d37aaad2e6c8b4f093a38e8cc5c1 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 15:26:38 +0200 Subject: [PATCH 280/372] Reorder ctests commands for incremental installation of Paraconf then PDI 46 --- bin/build_and_run_all_tests | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 24c94c61f..0bf74a25d 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -182,12 +182,23 @@ fi # echo "############ got paraconf" +# Configure, build & test for pdi, with Paraconf + +cd "${TEST_DIR_WITH_PDI}" +cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make ${MAKEFLAGS} +ls . +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} + +echo "############ tests pdi/paraconf done" + + # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf cd "${TEST_DIR_NO_PDI}" RELATIVE_NO_PDI_PATH="no-pdi" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}:${BUILD_DIR_PARACONF}/paraconf*/build/install_paraconf" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ldd PDI_example_C @@ -205,15 +216,7 @@ echo "############ example no-pdi/paraconf done" # echo "############ test-api no-pdi/paraconf done" -# Configure, build & test for pdi, with Paraconf -cd "${TEST_DIR_WITH_PDI}" -cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make ${MAKEFLAGS} -ls . -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} - -echo "############ tests pdi/paraconf done" # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf From b21e9bc79336b4cd5f088d38e5061ff4c18ac020 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 15:40:29 +0200 Subject: [PATCH 281/372] Reorder ctests commands for incremental installation of Paraconf then PDI 47 --- bin/build_and_run_all_tests | 8 ++++---- tests/CMakeLists.txt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 0bf74a25d..6055bdd38 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -56,10 +56,10 @@ mkdir api_pdi cd api_pdi TEST_DIR_API="${PWD}" -cd "${TEST_DIR_ROOT}" -mkdir build_paraconf -cd build_paraconf -BUILD_DIR_PARACONF="${PWD}" +# cd "${TEST_DIR_ROOT}" +# mkdir build_paraconf +# cd build_paraconf +# BUILD_DIR_PARACONF="${PWD}" cd "${SRCDIR}" cd "$(dirname "$0")/.." diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f79ac4509..f3a975269 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -84,8 +84,8 @@ add_executable(test_api_C test_api.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_api_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) -if(paraconf_FOUND) -# if(BUILD_WITH_PARACONF) +# if(paraconf_FOUND) +if(BUILD_WITH_PARACONF) target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) else() target_link_libraries(test_api_C PDI::PDI_C) @@ -101,8 +101,8 @@ target_compile_options(test_api_CXX PRIVATE set_target_properties(test_api_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_api_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_api_CXX PROPERTIES LINKER_LANGUAGE CXX) -if(paraconf_FOUND) -# if(BUILD_WITH_PARACONF) +# if(paraconf_FOUND) +if(BUILD_WITH_PARACONF) target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) else() target_link_libraries(test_api_CXX PDI::PDI_C) From fa33ee3ba1e610e1c4ed757475b396f261575be1 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 15:48:02 +0200 Subject: [PATCH 282/372] Reorder ctests commands for incremental installation of Paraconf then PDI 48 --- bin/build_and_run_all_tests | 50 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 6055bdd38..282571383 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -182,39 +182,39 @@ fi # echo "############ got paraconf" -# Configure, build & test for pdi, with Paraconf +# # Configure, build & test for pdi, with Paraconf -cd "${TEST_DIR_WITH_PDI}" -cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make ${MAKEFLAGS} -ls . -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +# cd "${TEST_DIR_WITH_PDI}" +# cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# make ${MAKEFLAGS} +# ls . +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -echo "############ tests pdi/paraconf done" +# echo "############ tests pdi/paraconf done" -# Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf +# # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf -cd "${TEST_DIR_NO_PDI}" -RELATIVE_NO_PDI_PATH="no-pdi" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}:${BUILD_DIR_PARACONF}/paraconf*/build/install_paraconf" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -make ${MAKEFLAGS} -ldd PDI_example_C -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C +# cd "${TEST_DIR_NO_PDI}" +# RELATIVE_NO_PDI_PATH="no-pdi" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +# # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +# # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}:${BUILD_DIR_PARACONF}/paraconf*/build/install_paraconf" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +# make ${MAKEFLAGS} +# ldd PDI_example_C +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C -echo "############ example no-pdi/paraconf done" +# echo "############ example no-pdi/paraconf done" -# cd "${TEST_DIR_API}" -# NO_PDI_TESTS="test_api_C test_api_CXX" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -# make ${MAKEFLAGS} -# ldd test_api_C -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -# rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile +cd "${TEST_DIR_API}" +NO_PDI_TESTS="test_api_C test_api_CXX" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +make ${MAKEFLAGS} +ldd test_api_C +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile -# echo "############ test-api no-pdi/paraconf done" +echo "############ test-api no-pdi/paraconf done" From 6773295d6a0ccb4a81f2195cc938a7b82c31731b Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 15:50:39 +0200 Subject: [PATCH 283/372] Reorder ctests commands for incremental installation of Paraconf then PDI 49 --- bin/build_and_run_all_tests | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 282571383..c8a368ffd 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -207,6 +207,7 @@ fi # echo "############ example no-pdi/paraconf done" cd "${TEST_DIR_API}" +RELATIVE_NO_PDI_PATH="no-pdi" NO_PDI_TESTS="test_api_C test_api_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} From fc22cf38b4e55c28694e6a10bd0dc20f0d490224 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 15:53:24 +0200 Subject: [PATCH 284/372] Reorder ctests commands for incremental installation of Paraconf then PDI 50 --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f3a975269..882e33dc1 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -34,7 +34,7 @@ option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) -# option(BUILD_WITH_PARACONF "BUILD_WITH_PARACONF" ON) +option(BUILD_WITH_PARACONF "BUILD_WITH_PARACONF" ON) # if(BUILD_WITH_PARACONF) # find_package(paraconf 1.0.0 COMPONENTS C) # if(paraconf_FOUND) From 2cf8c955dd322f508c763d3ebc679d045b5a68be Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 15:56:50 +0200 Subject: [PATCH 285/372] Reorder ctests commands for incremental installation of Paraconf then PDI 51 --- .github/workflows/tests.yml | 42 ++++++++++++++++++------------------- bin/build_and_run_all_tests | 3 ++- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 20e3464b5..624f27576 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,27 +32,27 @@ on: push: { branches: [ main, 'v[0-9]+.[0-9]+' ] } pull_request: jobs: - spack: - strategy: - fail-fast: false - matrix: - # version: ['latest', 'oldest'] - # compiler: ['gcc', 'clang'] - # mpi: ['openmpi', 'mpich'] - # variant: ['mini', 'all'] - version: ['latest'] - compiler: ['gcc', 'clang'] - mpi: ['openmpi', 'mpich'] - variant: ['mini', 'all'] - runs-on: ubuntu-24.04 - steps: - - name: Checkout branch - uses: actions/checkout@v4 - with: { submodules: recursive } - - name: Test - uses: ./.github/actions/test/ - with: - image: 'ghcr.io/pdidev/spack/${{matrix.version}}/${{matrix.compiler}}/${{matrix.mpi}}/${{matrix.variant}}:v3' + # spack: + # strategy: + # fail-fast: false + # matrix: + # # version: ['latest', 'oldest'] + # # compiler: ['gcc', 'clang'] + # # mpi: ['openmpi', 'mpich'] + # # variant: ['mini', 'all'] + # version: ['latest'] + # compiler: ['gcc', 'clang'] + # mpi: ['openmpi', 'mpich'] + # variant: ['mini', 'all'] + # runs-on: ubuntu-24.04 + # steps: + # - name: Checkout branch + # uses: actions/checkout@v4 + # with: { submodules: recursive } + # - name: Test + # uses: ./.github/actions/test/ + # with: + # image: 'ghcr.io/pdidev/spack/${{matrix.version}}/${{matrix.compiler}}/${{matrix.mpi}}/${{matrix.variant}}:v3' debuntu: strategy: fail-fast: false diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index c8a368ffd..27f95b483 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -209,7 +209,8 @@ fi cd "${TEST_DIR_API}" RELATIVE_NO_PDI_PATH="no-pdi" NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} ldd test_api_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From 3a7c06aac6f51f886b82d1ac69e139f8275b5e7f Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 15:58:27 +0200 Subject: [PATCH 286/372] Reorder ctests commands for incremental installation of Paraconf then PDI 52 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 27f95b483..21e42c904 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -222,7 +222,7 @@ echo "############ test-api no-pdi/paraconf done" # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf -apt-get uninstall libparaconf-dev +apt-get remove libparaconf-dev cd "${TEST_DIR_API}" RELATIVE_NO_PDI_PATH="no-pdi" From 4fedbd89c528760c14a0584e3702639a37e40eaa Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 16:00:44 +0200 Subject: [PATCH 287/372] Reorder ctests commands for incremental installation of Paraconf then PDI 53 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 21e42c904..654283058 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -222,7 +222,7 @@ echo "############ test-api no-pdi/paraconf done" # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf -apt-get remove libparaconf-dev +# apt-get remove libparaconf-dev cd "${TEST_DIR_API}" RELATIVE_NO_PDI_PATH="no-pdi" From 522da47857313f47a37f5a3d3e6247e62ece5166 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 16:07:51 +0200 Subject: [PATCH 288/372] Reorder ctests commands for incremental installation of Paraconf then PDI 54 --- bin/build_and_run_all_tests | 4 ++-- tests/CMakeLists.txt | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 654283058..8933f9cb4 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -227,8 +227,8 @@ echo "############ test-api no-pdi/paraconf done" cd "${TEST_DIR_API}" RELATIVE_NO_PDI_PATH="no-pdi" NO_PDI_TESTS="test_api_C test_api_CXX" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} ldd test_api_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 882e33dc1..9b55b32d2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -35,22 +35,22 @@ option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) option(BUILD_WITH_PARACONF "BUILD_WITH_PARACONF" ON) -# if(BUILD_WITH_PARACONF) -# find_package(paraconf 1.0.0 COMPONENTS C) -# if(paraconf_FOUND) -# message(WARNING "Paraconf found") -# add_definitions(-DPARACONF_FOUND) -# else() -# message(WARNING "Paraconf not found") -# endif() -# endif() - -find_package(paraconf 1.0.0 COMPONENTS C) -if(paraconf_FOUND) - message(WARNING "Paraconf found for test-api") -else() - message(WARNING "Paraconf not found for test-api") +if(BUILD_WITH_PARACONF) + find_package(paraconf 1.0.0 COMPONENTS C) + if(paraconf_FOUND) + message(WARNING "Paraconf found") + add_definitions(-DPARACONF_FOUND) + else() + message(WARNING "Paraconf not found") + endif() endif() + +# find_package(paraconf 1.0.0 COMPONENTS C) +# if(paraconf_FOUND) +# message(WARNING "Paraconf found for test-api") +# else() +# message(WARNING "Paraconf not found for test-api") +# endif() find_package(PDI REQUIRED COMPONENTS C) if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") From daa70173ddf46d8e425a2661c0e5cd226b9dfc55 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 16:18:17 +0200 Subject: [PATCH 289/372] Reorder ctests commands for incremental installation of Paraconf then PDI 55 --- tests/CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9b55b32d2..a7e298536 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -39,7 +39,8 @@ if(BUILD_WITH_PARACONF) find_package(paraconf 1.0.0 COMPONENTS C) if(paraconf_FOUND) message(WARNING "Paraconf found") - add_definitions(-DPARACONF_FOUND) + # add_definitions(-DPARACONF_FOUND) + add_compile_definitions(PARACONF_FOUND) else() message(WARNING "Paraconf not found") endif() @@ -84,8 +85,8 @@ add_executable(test_api_C test_api.c) set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_api_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) -# if(paraconf_FOUND) -if(BUILD_WITH_PARACONF) +if(paraconf_FOUND) +# if(BUILD_WITH_PARACONF) target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) else() target_link_libraries(test_api_C PDI::PDI_C) @@ -101,8 +102,8 @@ target_compile_options(test_api_CXX PRIVATE set_target_properties(test_api_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_api_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_api_CXX PROPERTIES LINKER_LANGUAGE CXX) -# if(paraconf_FOUND) -if(BUILD_WITH_PARACONF) +if(paraconf_FOUND) +# if(BUILD_WITH_PARACONF) target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) else() target_link_libraries(test_api_CXX PDI::PDI_C) From 3ef949ca571f3833009373890ef48842f18b59dd Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 16:31:10 +0200 Subject: [PATCH 290/372] Reorder ctests commands for incremental installation of Paraconf then PDI 56 --- no-pdi/cmake/PDIConfig.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index ac930f040..5bf0e94a3 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -35,7 +35,11 @@ set_target_properties(PDI_C PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" ) -find_package(paraconf 1.0.0 COMPONENTS C) +option(BUILD_WITH_PARACONF "BUILD_WITH_PARACONF" ON) +if(BUILD_WITH_PARACONF) + find_package(paraconf 1.0.0 COMPONENTS C) +endif() +# find_package(paraconf 1.0.0 COMPONENTS C) if(paraconf_FOUND) message(WARNING "Paraconf found") add_compile_definitions(PARACONF_FOUND) From 0773e51b0ed04cdd7863514a52fc52acd48c489c Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 16:34:49 +0200 Subject: [PATCH 291/372] Reorder ctests commands for incremental installation of Paraconf then PDI 57 --- bin/build_and_run_all_tests | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 8933f9cb4..50eb5a72c 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -193,16 +193,16 @@ fi # echo "############ tests pdi/paraconf done" -# # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf +# Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf -# cd "${TEST_DIR_NO_PDI}" -# RELATIVE_NO_PDI_PATH="no-pdi" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -# # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -# # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}:${BUILD_DIR_PARACONF}/paraconf*/build/install_paraconf" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -# make ${MAKEFLAGS} -# ldd PDI_example_C -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C +cd "${TEST_DIR_NO_PDI}" +RELATIVE_NO_PDI_PATH="no-pdi" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}:${BUILD_DIR_PARACONF}/paraconf*/build/install_paraconf" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +make ${MAKEFLAGS} +ldd PDI_example_C +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C # echo "############ example no-pdi/paraconf done" From 6a0b48ff6518b4b448d5f7900a2370d4d5ebf9bb Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 16:37:11 +0200 Subject: [PATCH 292/372] Reorder ctests commands for incremental installation of Paraconf then PDI 58 --- bin/build_and_run_all_tests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 50eb5a72c..589ecba1f 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -197,8 +197,8 @@ fi cd "${TEST_DIR_NO_PDI}" RELATIVE_NO_PDI_PATH="no-pdi" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" +cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" # cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}:${BUILD_DIR_PARACONF}/paraconf*/build/install_paraconf" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" make ${MAKEFLAGS} ldd PDI_example_C From ab3d747fc320651c73a93bfd171c18829f8c1eb9 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 16:39:30 +0200 Subject: [PATCH 293/372] Reorder ctests commands for incremental installation of Paraconf then PDI 59 --- example/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index ce9c31c8e..4213b7ba2 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -49,7 +49,9 @@ endif() # Includes include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) +message(WARNING "Requiring Paraconf") find_package(paraconf REQUIRED COMPONENTS ${paraconf_COMPONENTS}) +message(WARNING "Paraconf found for example") find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) find_library(LIB_M m DOC "The math library") From be47571f867f85e4bf0f8446e60d253ab593a520 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 16:42:54 +0200 Subject: [PATCH 294/372] Reorder ctests commands for incremental installation of Paraconf then PDI 60 --- no-pdi/cmake/PDIConfig.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index 5bf0e94a3..8522732f8 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -39,6 +39,12 @@ option(BUILD_WITH_PARACONF "BUILD_WITH_PARACONF" ON) if(BUILD_WITH_PARACONF) find_package(paraconf 1.0.0 COMPONENTS C) endif() + +# option(BUILD_WITH_PARACONF "BUILD_WITH_PARACONF" OFF) +# if(BUILD_WITH_PARACONF) +# find_package(paraconf 1.0.0 COMPONENTS C) +# endif() + # find_package(paraconf 1.0.0 COMPONENTS C) if(paraconf_FOUND) message(WARNING "Paraconf found") From c4ddac601874579d244b23c657314c2325b4fe0b Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 1 Aug 2025 16:44:16 +0200 Subject: [PATCH 295/372] Reorder ctests commands for incremental installation of Paraconf then PDI 61 --- example/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 4213b7ba2..88fbd7f34 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -50,7 +50,8 @@ endif() include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) message(WARNING "Requiring Paraconf") -find_package(paraconf REQUIRED COMPONENTS ${paraconf_COMPONENTS}) +# find_package(paraconf REQUIRED COMPONENTS ${paraconf_COMPONENTS}) +find_package(paraconf COMPONENTS ${paraconf_COMPONENTS}) message(WARNING "Paraconf found for example") find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) find_library(LIB_M m DOC "The math library") From 4f5598e1090c491560978cde8ece3e494259f590 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 4 Aug 2025 12:36:54 +0200 Subject: [PATCH 296/372] Reorder ctests commands for incremental installation of Paraconf then PDI 62 --- bin/build_and_run_all_tests | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 589ecba1f..0a0899a61 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -182,17 +182,19 @@ fi # echo "############ got paraconf" -# # Configure, build & test for pdi, with Paraconf +# Configure, build & test for pdi, with Paraconf -# cd "${TEST_DIR_WITH_PDI}" -# cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# make ${MAKEFLAGS} -# ls . -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +cd "${TEST_DIR_WITH_PDI}" +cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make ${MAKEFLAGS} +ls . +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -# echo "############ tests pdi/paraconf done" +echo "############ tests pdi/paraconf done" +pkg-config --modversion paraconf +if pkg-config --exists paraconf; then # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf cd "${TEST_DIR_NO_PDI}" @@ -204,7 +206,7 @@ make ${MAKEFLAGS} ldd PDI_example_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C -# echo "############ example no-pdi/paraconf done" +echo "############ example no-pdi/paraconf done" cd "${TEST_DIR_API}" RELATIVE_NO_PDI_PATH="no-pdi" @@ -217,8 +219,9 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile echo "############ test-api no-pdi/paraconf done" - - +else +echo "############ no-pdi/paraconf skipped" +fi # Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf @@ -234,5 +237,3 @@ ldd test_api_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} echo "############ test-api no-pdi/no-paraconf done" - - From 29b6f6a8673c0dc9fa6bc3c213304e4df3fe3c17 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 4 Aug 2025 12:42:42 +0200 Subject: [PATCH 297/372] Reorder ctests commands for incremental installation of Paraconf then PDI 63 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 0a0899a61..8df840b7e 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -193,7 +193,7 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $ echo "############ tests pdi/paraconf done" -pkg-config --modversion paraconf +# pkg-config --modversion paraconf if pkg-config --exists paraconf; then # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf From 0f8d31f07e988503b14a903795ad53fc6c335b38 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 4 Aug 2025 12:50:11 +0200 Subject: [PATCH 298/372] Reorder ctests commands for incremental installation of Paraconf then PDI 64 --- bin/build_and_run_all_tests | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 8df840b7e..a2221627e 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -182,19 +182,20 @@ fi # echo "############ got paraconf" -# Configure, build & test for pdi, with Paraconf +# # Configure, build & test for pdi, with Paraconf -cd "${TEST_DIR_WITH_PDI}" -cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make ${MAKEFLAGS} -ls . -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +# cd "${TEST_DIR_WITH_PDI}" +# cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +# make ${MAKEFLAGS} +# ls . +# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -echo "############ tests pdi/paraconf done" +# echo "############ tests pdi/paraconf done" # pkg-config --modversion paraconf -if pkg-config --exists paraconf; then +# if pkg-config --exists paraconf; then +if ldconfig -p | grep -q libparaconf; then # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf cd "${TEST_DIR_NO_PDI}" From 37157f8d6d39ac975ba421fc8ede79800851a56e Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 4 Aug 2025 13:27:10 +0200 Subject: [PATCH 299/372] Reorder ctests commands for incremental installation of Paraconf then PDI 65 --- bin/build_and_run_all_tests | 114 ++++++++---------------------------- example/CMakeLists.txt | 5 +- tests/CMakeLists.txt | 13 ---- 3 files changed, 25 insertions(+), 107 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index a2221627e..75ec48ffb 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -124,115 +124,49 @@ fi -# Get Paraconf independently from pdi -# # cd "${SRCDIR}/vendor/paraconf*/" -# cd "${SRCDIR}" -# ls . -# cd vendor/paraconf*/ -# mkdir build -# cd build -# cmake -DUSE_SYSTEM_YAML=OFF .. -# make -# make install - -# cd "${BUILD_DIR_PARACONF}" -# # ls ${SRCDIR}/vendor -# # ls ${SRCDIR}/vendor/paraconf* -# # ls ${SRCDIR}/vendor/paraconf*/vendor -# ls ${SRCDIR}/vendor/paraconf*/vendor/libyaml-0.2.2 -# # cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" -DUSE_SYSTEM_YAML=OFF ${SRCDIR}/vendor/paraconf* -# # cmake -DCMAKE_INSTALL_PREFIX="./install_paraconf" ${SRCDIR}/vendor/paraconf* -# cmake -DCMAKE_PREFIX_PATH=${SRCDIR}/vendor/paraconf*/vendor/libyaml* -DCMAKE_INSTALL_PREFIX="./install_paraconf" ${SRCDIR}/vendor/paraconf* -# make ${MAKEFLAGS} -# make install - -# cd "${BUILD_DIR_PARACONF}" -# PARACONF_SRC=( ${SRCDIR}/vendor/paraconf* ) -# LIBYAML_DIR=( ${SRCDIR}/vendor/paraconf*/vendor/libyaml* ) -# ls "${LIBYAML_DIR[0]}" -# if [[ ${#PARACONF_SRC[@]} -ne 1 ]] || [[ ${#LIBYAML_DIR[@]} -ne 1 ]]; then -# echo "Error: paraconf* or libyaml* did not match exactly one directory" -# exit 1 -# fi -# cmake \ -# -DCMAKE_PREFIX_PATH="${LIBYAML_DIR[0]}" \ -# -DCMAKE_INSTALL_PREFIX="./install_paraconf" \ -# "${PARACONF_SRC[0]}" -# make ${MAKEFLAGS} -# make install - -# cd "${BUILD_DIR_PARACONF}" -# # git clone git@github.com:pdidev/paraconf.git -# # wget https://github.com/pdidev/paraconf/archive/1.0.0.tar.gz -# # tar -xzf 1.0.0.tar.gz -# # mv paraconf-1.0.0 paraconf -# cp -r ${SRCDIR}/vendor/paraconf*/ . -# cd paraconf* -# # sed EMBEDDED_PATH "vendor/libyaml-0.2.2.tar"* -# ls vendor/libyaml* -# echo "---" -# # sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(ls vendor/libyaml-*)\"|" CMakeLists.txt -# # sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"$(basename "$(ls vendor/libyaml-*.tar)" .tar)\"|" CMakeLists.txt -# sed -i "s|EMBEDDED_PATH \"vendor/libyaml-0.2.2.tar\"|EMBEDDED_PATH \"vendor/libyaml-0.2.2\"|" CMakeLists.txt -# mkdir build -# cd build -# cmake -DUSE_SYSTEM_YAML=OFF -DCMAKE_INSTALL_PREFIX="./install_paraconf" .. -# make -# make install - -# echo "############ got paraconf" - # # Configure, build & test for pdi, with Paraconf # cd "${TEST_DIR_WITH_PDI}" # cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" # make ${MAKEFLAGS} -# ls . # ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} # echo "############ tests pdi/paraconf done" -# pkg-config --modversion paraconf -# if pkg-config --exists paraconf; then +ldconfig -p if ldconfig -p | grep -q libparaconf; then -# Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf - -cd "${TEST_DIR_NO_PDI}" -RELATIVE_NO_PDI_PATH="no-pdi" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}:${BUILD_DIR_PARACONF}/paraconf*/build/install_paraconf" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" -make ${MAKEFLAGS} -ldd PDI_example_C -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C - -echo "############ example no-pdi/paraconf done" - -cd "${TEST_DIR_API}" -RELATIVE_NO_PDI_PATH="no-pdi" -NO_PDI_TESTS="test_api_C test_api_CXX" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -make ${MAKEFLAGS} -ldd test_api_C -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile - -echo "############ test-api no-pdi/paraconf done" + # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf + + cd "${TEST_DIR_NO_PDI}" + RELATIVE_NO_PDI_PATH="no-pdi" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + make ${MAKEFLAGS} + ldd PDI_example_C + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C + + echo "############ example no-pdi/paraconf done" + + cd "${TEST_DIR_API}" + RELATIVE_NO_PDI_PATH="no-pdi" + NO_PDI_TESTS="test_api_C test_api_CXX" + cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" + make ${MAKEFLAGS} + ldd test_api_C + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} + rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile + + echo "############ test-api no-pdi/paraconf done" else -echo "############ no-pdi/paraconf skipped" + echo "############ no-pdi/paraconf skipped, paraconf not available" fi -# Configure, build & test for no-pdi's specific tests with BUILD_WITHOUT_PDI (include_directories), without Paraconf - -# apt-get remove libparaconf-dev +# Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), without Paraconf cd "${TEST_DIR_API}" RELATIVE_NO_PDI_PATH="no-pdi" NO_PDI_TESTS="test_api_C test_api_CXX" cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" -# cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" make ${MAKEFLAGS} ldd test_api_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 88fbd7f34..ce9c31c8e 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -49,10 +49,7 @@ endif() # Includes include(CTest) find_package(MPI REQUIRED COMPONENTS ${MPI_COMPONENTS}) -message(WARNING "Requiring Paraconf") -# find_package(paraconf REQUIRED COMPONENTS ${paraconf_COMPONENTS}) -find_package(paraconf COMPONENTS ${paraconf_COMPONENTS}) -message(WARNING "Paraconf found for example") +find_package(paraconf REQUIRED COMPONENTS ${paraconf_COMPONENTS}) find_package(PDI REQUIRED COMPONENTS ${PDI_COMPONENTS}) find_library(LIB_M m DOC "The math library") diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a7e298536..c23519fc7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -39,19 +39,12 @@ if(BUILD_WITH_PARACONF) find_package(paraconf 1.0.0 COMPONENTS C) if(paraconf_FOUND) message(WARNING "Paraconf found") - # add_definitions(-DPARACONF_FOUND) add_compile_definitions(PARACONF_FOUND) else() message(WARNING "Paraconf not found") endif() endif() -# find_package(paraconf 1.0.0 COMPONENTS C) -# if(paraconf_FOUND) -# message(WARNING "Paraconf found for test-api") -# else() -# message(WARNING "Paraconf not found for test-api") -# endif() find_package(PDI REQUIRED COMPONENTS C) if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") @@ -86,13 +79,10 @@ set(BUILD_FLAGS_FOR_C "-Wall") target_compile_options(test_api_C PRIVATE $<$:${BUILD_FLAGS_FOR_C}>) if(paraconf_FOUND) -# if(BUILD_WITH_PARACONF) target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) else() target_link_libraries(test_api_C PDI::PDI_C) endif() -# target_link_libraries(test_api_C PDI::PDI_C) -# target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) add_test(NAME test_api_C COMMAND "$") add_executable(test_api_CXX test_api.cpp) @@ -103,11 +93,8 @@ set_target_properties(test_api_CXX PROPERTIES CXX_STANDARD 11) set_target_properties(test_api_CXX PROPERTIES LANGUAGE CXX) set_target_properties(test_api_CXX PROPERTIES LINKER_LANGUAGE CXX) if(paraconf_FOUND) -# if(BUILD_WITH_PARACONF) target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) else() target_link_libraries(test_api_CXX PDI::PDI_C) endif() -# target_link_libraries(test_api_CXX PDI::PDI_C) -# target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) add_test(NAME test_api_CXX COMMAND "$") From d6c1c91b966f25f9f99d45255b21290b07250a56 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 4 Aug 2025 13:27:25 +0200 Subject: [PATCH 300/372] Reorder ctests commands for incremental installation of Paraconf then PDI 66 --- bin/build_and_run_all_tests | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 75ec48ffb..13ffad819 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -124,14 +124,14 @@ fi -# # Configure, build & test for pdi, with Paraconf +# Configure, build & test for pdi, with Paraconf -# cd "${TEST_DIR_WITH_PDI}" -# cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -# make ${MAKEFLAGS} -# ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +cd "${TEST_DIR_WITH_PDI}" +cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make ${MAKEFLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -# echo "############ tests pdi/paraconf done" +echo "############ tests pdi/paraconf done" ldconfig -p From 708c9c93bb033310c70306f2881d10e0f870a6e2 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 4 Aug 2025 13:50:19 +0200 Subject: [PATCH 301/372] Reorder ctests commands for incremental installation of Paraconf then PDI 67 --- bin/build_and_run_all_tests | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 13ffad819..b559c8c44 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -134,13 +134,13 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $ echo "############ tests pdi/paraconf done" -ldconfig -p +ldconfig -p | grep -q libparaconf if ldconfig -p | grep -q libparaconf; then # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf cd "${TEST_DIR_NO_PDI}" RELATIVE_NO_PDI_PATH="no-pdi" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/example" + cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" make ${MAKEFLAGS} ldd PDI_example_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C @@ -150,7 +150,7 @@ if ldconfig -p | grep -q libparaconf; then cd "${TEST_DIR_API}" RELATIVE_NO_PDI_PATH="no-pdi" NO_PDI_TESTS="test_api_C test_api_CXX" - cmake -DBUILD_BENCHMARKING=OFF -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" + cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" make ${MAKEFLAGS} ldd test_api_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} @@ -166,7 +166,7 @@ fi cd "${TEST_DIR_API}" RELATIVE_NO_PDI_PATH="no-pdi" NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DBUILD_BENCHMARKING=OFF -DBUILD_UNSTABLE=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}/tests" +cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF "${SRCDIR}/tests" make ${MAKEFLAGS} ldd test_api_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From 6bdb9b6afa02c3c4354a8f6cb52f074a90028f49 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 4 Aug 2025 13:58:30 +0200 Subject: [PATCH 302/372] Reorder ctests commands for incremental installation of Paraconf then PDI 68 --- bin/build_and_run_all_tests | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index b559c8c44..39c5ac20f 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -133,8 +133,6 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $ echo "############ tests pdi/paraconf done" - -ldconfig -p | grep -q libparaconf if ldconfig -p | grep -q libparaconf; then # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf @@ -158,7 +156,7 @@ if ldconfig -p | grep -q libparaconf; then echo "############ test-api no-pdi/paraconf done" else - echo "############ no-pdi/paraconf skipped, paraconf not available" + echo "############ no-pdi/paraconf skipped, paraconf not available on mini configuration" fi # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), without Paraconf @@ -166,7 +164,7 @@ fi cd "${TEST_DIR_API}" RELATIVE_NO_PDI_PATH="no-pdi" NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_WITH_PARACONF=OFF -DBUILD_SERIALIZE_PLUGIN=OFF -DBUILD_SET_VALUE_PLUGIN=OFF "${SRCDIR}/tests" +cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_WITH_PARACONF=OFF "${SRCDIR}/tests" make ${MAKEFLAGS} ldd test_api_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} From 370813ca573f991feea53d28da6d01564d46a865 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 12 Sep 2025 10:51:16 +0200 Subject: [PATCH 303/372] Re-enable current main CI --- .github/workflows/tests.yml | 43 ++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 624f27576..fe615162f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,35 +32,28 @@ on: push: { branches: [ main, 'v[0-9]+.[0-9]+' ] } pull_request: jobs: - # spack: - # strategy: - # fail-fast: false - # matrix: - # # version: ['latest', 'oldest'] - # # compiler: ['gcc', 'clang'] - # # mpi: ['openmpi', 'mpich'] - # # variant: ['mini', 'all'] - # version: ['latest'] - # compiler: ['gcc', 'clang'] - # mpi: ['openmpi', 'mpich'] - # variant: ['mini', 'all'] - # runs-on: ubuntu-24.04 - # steps: - # - name: Checkout branch - # uses: actions/checkout@v4 - # with: { submodules: recursive } - # - name: Test - # uses: ./.github/actions/test/ - # with: - # image: 'ghcr.io/pdidev/spack/${{matrix.version}}/${{matrix.compiler}}/${{matrix.mpi}}/${{matrix.variant}}:v3' + spack: + strategy: + fail-fast: false + matrix: + version: ['latest', 'oldest'] + compiler: ['gcc', 'clang'] + mpi: ['openmpi', 'mpich'] + variant: ['mini', 'all'] + runs-on: ubuntu-24.04 + steps: + - name: Checkout branch + uses: actions/checkout@v4 + with: { submodules: recursive } + - name: Test + uses: ./.github/actions/test/ + with: + image: 'ghcr.io/pdidev/spack/${{matrix.version}}/${{matrix.compiler}}/${{matrix.mpi}}/${{matrix.variant}}:v3' debuntu: strategy: fail-fast: false matrix: - # base: ['ubuntu/focal', 'ubuntu/rolling', 'debian/bookworm', 'debian/unstable'] - # mpi: ['openmpi', 'mpich'] - # variant: ['mini', 'all'] - base: ['debian/bookworm'] + base: ['ubuntu/focal', 'ubuntu/rolling', 'debian/bookworm', 'debian/unstable'] mpi: ['openmpi', 'mpich'] variant: ['mini', 'all'] runs-on: ubuntu-24.04 From 82a222ed0f9691f03e290ffa0a1f94012b71e551 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 12 Sep 2025 10:54:45 +0200 Subject: [PATCH 304/372] Clean for PR --- no-pdi/cmake/PDIConfig.cmake | 6 ----- no-pdi/include/pdi.h | 46 ------------------------------------ tests/test_api.h | 3 --- 3 files changed, 55 deletions(-) diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index 8522732f8..24f32350a 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -40,12 +40,6 @@ if(BUILD_WITH_PARACONF) find_package(paraconf 1.0.0 COMPONENTS C) endif() -# option(BUILD_WITH_PARACONF "BUILD_WITH_PARACONF" OFF) -# if(BUILD_WITH_PARACONF) -# find_package(paraconf 1.0.0 COMPONENTS C) -# endif() - -# find_package(paraconf 1.0.0 COMPONENTS C) if(paraconf_FOUND) message(WARNING "Paraconf found") add_compile_definitions(PARACONF_FOUND) diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 53201c5f7..2289602b0 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -55,11 +55,6 @@ #ifndef PDI_H_ #define PDI_H_ -// #if defined __has_include -// #if __has_include() -// #include -// #endif -// #endif #ifdef PARACONF_FOUND #warning "PARACONF_FOUND, paraconf included" #include @@ -158,47 +153,6 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) /** Initializes PDI */ -// // #ifndef PARACONF_H__ // Add ifndef to not prevent "no-pdi with paraconf" (and allow "no-pdi without paraconf") -// #if defined __has_include -// #warning "Knows '__has_include'" -// #if !__has_include() -// #warning "PARACONF_H__ is missing, defining mock PC_tree and PC_parse_string" - -// typedef struct PC_tree_s { -// } PC_tree_t; - -// static inline PC_tree_t PC_parse_string(const char* document) -// { -// PC_tree_t mock_PC_tree = {}; -// return mock_PC_tree; -// } - -// #endif -// #endif -// // #endif - -// #if defined(__has_include) -// #if __has_include() -// #warning "INCLUDE" -// #include -// #else -// #warning "MOCK" -// typedef struct PC_tree_s { } PC_tree_t; -// struct _IO_FILE; -// typedef struct _IO_FILE FILE; -// static inline PC_tree_t PC_parse_string(const char* document) { -// PC_tree_t mock = {}; -// return mock; -// } -// static inline PC_tree_t PC_parse_file(FILE *file) { -// PC_tree_t mock = {}; -// return mock; -// } -// #endif -// #else -// #warning "ELSE" -// #endif - #ifdef PARACONF_FOUND #warning "PARACONF_FOUND, PDI_init set" diff --git a/tests/test_api.h b/tests/test_api.h index 175da10d8..d5f49a10e 100644 --- a/tests/test_api.h +++ b/tests/test_api.h @@ -32,9 +32,6 @@ #include #include #endif -// #ifndef PC_parse_string -// #include -// #endif #ifdef PARACONF_FOUND #warning "PARACONF_FOUND, paraconf included in test_api.h" #include From 1e171ad74984c792d4d492a6b44654abe9a9512a Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 12 Sep 2025 11:12:18 +0200 Subject: [PATCH 305/372] Clean for PR 2 --- bin/build_and_run_all_tests | 5 ----- example/CMakeLists.txt | 2 +- no-pdi/cmake/PDIConfigVersion.cmake | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 39c5ac20f..3789857c3 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -56,11 +56,6 @@ mkdir api_pdi cd api_pdi TEST_DIR_API="${PWD}" -# cd "${TEST_DIR_ROOT}" -# mkdir build_paraconf -# cd build_paraconf -# BUILD_DIR_PARACONF="${PWD}" - cd "${SRCDIR}" cd "$(dirname "$0")/.." SRCDIR="${PWD}" diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index ce9c31c8e..f0f3e50be 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -148,4 +148,4 @@ if("${BUILD_PYTHON}") add_test(NAME PDI_example_trace_P COMMAND "${MPIEXEC}" "${MPIEXEC_NUMPROC_FLAG}" 3 ${MPIEXEC_PREFLAGS} "$" "${Python3_EXECUTABLE}" ${MPIEXEC_POSTFLAGS} "${CMAKE_CURRENT_SOURCE_DIR}/example.py" "${CMAKE_CURRENT_SOURCE_DIR}/trace.yml") set_property(TEST PDI_example_trace_P PROPERTY TIMEOUT 15) set_property(TEST PDI_example_trace_P PROPERTY PROCESSORS 3) -endif("${BUILD_PYTHON}") \ No newline at end of file +endif("${BUILD_PYTHON}") diff --git a/no-pdi/cmake/PDIConfigVersion.cmake b/no-pdi/cmake/PDIConfigVersion.cmake index e1032a2e8..3d88162a4 100644 --- a/no-pdi/cmake/PDIConfigVersion.cmake +++ b/no-pdi/cmake/PDIConfigVersion.cmake @@ -27,4 +27,4 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -set(PDI_VERSION "1.8.3") +set(PDI_VERSION "1.9.2") From 3d9e16d302337bf972b009779dc2a3e81d40ee60 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 12 Sep 2025 15:37:40 +0200 Subject: [PATCH 306/372] Update 'Using_PDI.md' --- bin/build_and_run_all_tests | 2 +- pdi/docs/Using_PDI.md | 56 ++++++++++++++++++------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 3789857c3..f8bbc98ea 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -151,7 +151,7 @@ if ldconfig -p | grep -q libparaconf; then echo "############ test-api no-pdi/paraconf done" else - echo "############ no-pdi/paraconf skipped, paraconf not available on mini configuration" + echo "############ no-pdi/paraconf skipped, paraconf not available on the CI's mini configuration" fi # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), without Paraconf diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 5158050a1..b1a7bbbfc 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -98,41 +98,41 @@ plugins in 4 steps (it will use the first plugin found): ## How to deactivate PDI {#deactivate_pdi} -### Using the no-pdi included in the currently used pdi repository +### Using the no-pdi directory with an available Paraconf -You can copy the no-pdi folder from PDI in your application repository, and -add an option (`BUILD_WITHOUT_PDI` in the example below) to your -`CMakeLists.txt` to use this mock folder instead of the real PDI. - -In your `CMakeLists.txt`, replace the `find_package(PDI)` with code similar to -the paragraph defining the option `BUILD_WITHOUT_PDI` of `pdi/tests/CMakeLists.txt`. -Then you can build your project with this option specified to disable PDI: +You may copy the no-pdi folder from %PDI in your application repository, and +must add an option (`CMAKE_PREFIX_PATH` in the example below) to your +cmake command to use this mock folder instead of the real PDI. +Use your target `CMakeLists.txt` with `SRCDIR` as the directory containing no-pdi +(it is the root %PDI directory if you did not move the no-pdi directory) : ```bash -cmake . -DBUILD_WITHOUT_PDI=ON +cmake . -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/no-pdi" ``` -This method does not rely on an external dependency to Paraconf, and can only -be used if only the initialisation of PDI calls a Paraconf function. - -This is the preferred method of using no-pdi, as the next method may results -in a conflict when using a dependency toward Paraconf outside of PDI. -You can refer to `pdi/tests/CMakeLists.txt` for an example. - -### Using a specific no-pdi through a full path +%PDI path as `SRCDIR` containing no-pdi in the example above. -Alternatively, you can use a specific no-pdi folder among your system, -to compile with an added argument pointing to this no-pdi folder using a full path. +### Using the no-pdi directory without an available Paraconf -Use the following to specify your no-pdi location : +In addition to the previous, you may also want to disable the use of Paraconf +if your system doesn't already include an available install : ```bash -cmake . -DCMAKE_PREFIX_PATH="////pdi/no-pdi/cmake" +cmake . -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/no-pdi" -DBUILD_WITH_PARACONF=OFF ``` -You may also want an option `-DBUILD_WITH_PARACONF_FOR_NO_PDI` if your code -uses more than `PDI_init`, and you want to be able to use an -already available Paraconf dependency (see `pdi/example/CMakeLists.txt`). -If you do not add this option, similarly to the other no-pdi method, +You will need to modify your target `CMakeLists.txt` (see `pdi/tests/CMakeLists.txt`) : +```cmake +option(BUILD_WITH_PARACONF "BUILD_WITH_PARACONF" ON) +if(BUILD_WITH_PARACONF) + find_package(paraconf 1.0.0 COMPONENTS C) + if(paraconf_FOUND) + message(WARNING "Paraconf found") + add_compile_definitions(PARACONF_FOUND) + else() + message(WARNING "Paraconf not found") + endif() +endif() +``` +If you add this option, unlike the other no-pdi method, Paraconf must not be called outside of the initialisation of %PDI. - -This is not the preferred method of using no-pdi, as it may results in -a conflict when using a dependency toward a Paraconf outside of %PDI. +In this case, only the basic `.yaml` file reader of Paraconf +will be enabled to fit with no-pdi, through `PDI_init`. %PDI can be re-enabled by reverting those modifications. From c512904484a37f20af693adf66c4fb907b79da58 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 18 Sep 2025 15:58:51 +0200 Subject: [PATCH 307/372] Add feedback from 17-09-25 ('Using_PDI.md' not updated) --- .github/actions/test/action.yml | 4 +-- CMakeLists.txt | 2 ++ bin/build_and_run_all_tests | 6 ++-- example/CMakeLists.txt | 7 ---- example/example.c | 2 +- example/pluginless.yml | 17 ---------- no-paraconf/include/paraconf.h | 60 --------------------------------- no-pdi/cmake/PDIConfig.cmake | 5 +-- no-pdi/include/pdi.h | 2 -- tests/test_api.h | 1 - 10 files changed, 9 insertions(+), 97 deletions(-) delete mode 100644 example/pluginless.yml delete mode 100644 no-paraconf/include/paraconf.h diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 89c153521..911756d7d 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -44,7 +44,7 @@ runs: JOBID="$(echo "${{github.run_id}}"|md5sum|cut -b 1)" if [[ "01234567" == *"${JOBID}"* ]]; then export PDI_PLUGIN_PATH=/tmp/pdi_plugins; fi export MAKEFLAGS='-j 4' - export CTEST_FLAGS="--output-junit /tmp/tests.xml" + export CTEST_FLAGS="--output-junit /tests.xml" export TEST_DIR="/tmp" /src/bin/build_and_run_all_tests EOF @@ -54,7 +54,7 @@ runs: --tmpfs /tmp:exec \ ${{inputs.image}} \ bash /src/run.sh - if docker cp "$(cat docker.cid)":/tmp/tests.xml tests.xml + if docker cp "$(cat docker.cid)":/tests.xml tests.xml then echo "with_report=true" >> "$GITHUB_OUTPUT" else echo "with_report=false" >> "$GITHUB_OUTPUT" fi diff --git a/CMakeLists.txt b/CMakeLists.txt index ef2c1cbee..a4b2ace5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,8 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI_DIST LANGUAGES C CXX) + + ### Build options ## Global options diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index f8bbc98ea..ba7a05437 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -133,10 +133,10 @@ if ldconfig -p | grep -q libparaconf; then cd "${TEST_DIR_NO_PDI}" RELATIVE_NO_PDI_PATH="no-pdi" - cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" + cmake -DBUILD_TRACE_PLUGIN=ON -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" make ${MAKEFLAGS} - ldd PDI_example_C - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C + ldd PDI_example_trace_C + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_trace_C echo "############ example no-pdi/paraconf done" diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index f0f3e50be..5844a1d85 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -77,13 +77,6 @@ end module endif() endif() -message(WARNING "PDI_example_C") -add_executable(PDI_example_C example.c) -target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) -add_test(NAME PDI_example_C COMMAND "${MPIEXEC}" "${MPIEXEC_NUMPROC_FLAG}" 3 ${MPIEXEC_PREFLAGS} "$" ${MPIEXEC_POSTFLAGS} "${CMAKE_CURRENT_SOURCE_DIR}/pluginless.yml") -set_property(TEST PDI_example_C PROPERTY TIMEOUT 15) -set_property(TEST PDI_example_C PROPERTY PROCESSORS 3) - if("${BUILD_FORTRAN}") add_executable(PDI_example_F example.F90) target_link_libraries(PDI_example_F PDI::PDI_f90 MPI_with_mod m) diff --git a/example/example.c b/example/example.c index 9603928ab..7beedfa48 100644 --- a/example/example.c +++ b/example/example.c @@ -160,9 +160,9 @@ int main(int argc, char* argv[]) } PC_tree_t conf = PC_parse_path(argv[1]); - PDI_init(PC_get(conf, ".pdi")); MPI_Comm main_comm = MPI_COMM_WORLD; + PDI_init(PC_get(conf, ".pdi")); PDI_expose("mpi_comm", &main_comm, PDI_INOUT); diff --git a/example/pluginless.yml b/example/pluginless.yml deleted file mode 100644 index 71de7685d..000000000 --- a/example/pluginless.yml +++ /dev/null @@ -1,17 +0,0 @@ -# duration in seconds -duration: 0.75 -# global [height, width] (excluding boundary conditions or ghosts) -datasize: [60, 12] -# degree of parallelism -parallelism: { height: 3, width: 1 } - -# only the following config is passed to PDI -pdi: - metadata: # type of small values for which PDI keeps a copy - iter: int # current iteration id - dsize: { size: 2, type: array, subtype: int } # local data size including ghosts/boundary - psize: { size: 2, type: array, subtype: int } # number of processes in each dimension - pcoord: { size: 2, type: array, subtype: int } # coordinate of the process - data: # type of values for which PDI does not keep a copy - main_field: { size: [ '$dsize[0]', '$dsize[1]' ], type: array, subtype: double } - diff --git a/no-paraconf/include/paraconf.h b/no-paraconf/include/paraconf.h deleted file mode 100644 index dd39c6a71..000000000 --- a/no-paraconf/include/paraconf.h +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* -* Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) -* All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * 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. -* * Neither the name of CEA nor the names of its contributors may be used to -* endorse or promote products derived from this software without specific -* prior written permission. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -******************************************************************************/ - -/** \file paraconf.h for deactivation - */ - -#ifndef PARACONF_H_ -#define PARACONF_H__H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/** \addtogroup error - * \{ - */ - -typedef struct PC_tree_s { -} PC_tree_t; -struct _IO_FILE; -typedef struct _IO_FILE FILE; - -static inline PC_tree_t PC_parse_string(const char* document) -{ - PC_tree_t mock = {}; - return mock; -} - -static inline PC_tree_t PC_parse_file(FILE* file) -{ - PC_tree_t mock = {}; - return mock; -} - -#ifdef __cplusplus -} // extern C -#endif - -#endif // PARACONF_H_ diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index 24f32350a..fb2161111 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -35,10 +35,7 @@ set_target_properties(PDI_C PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" ) -option(BUILD_WITH_PARACONF "BUILD_WITH_PARACONF" ON) -if(BUILD_WITH_PARACONF) - find_package(paraconf 1.0.0 COMPONENTS C) -endif() +find_package(paraconf 1.0.0 COMPONENTS C) if(paraconf_FOUND) message(WARNING "Paraconf found") diff --git a/no-pdi/include/pdi.h b/no-pdi/include/pdi.h index 2289602b0..bf486d90b 100644 --- a/no-pdi/include/pdi.h +++ b/no-pdi/include/pdi.h @@ -56,7 +56,6 @@ #define PDI_H_ #ifdef PARACONF_FOUND -#warning "PARACONF_FOUND, paraconf included" #include #endif @@ -154,7 +153,6 @@ static inline PDI_errhandler_t PDI_errhandler(PDI_errhandler_t handler) /** Initializes PDI */ #ifdef PARACONF_FOUND -#warning "PARACONF_FOUND, PDI_init set" static inline PDI_status_t PDI_init(PC_tree_t conf) { diff --git a/tests/test_api.h b/tests/test_api.h index d5f49a10e..e332db05a 100644 --- a/tests/test_api.h +++ b/tests/test_api.h @@ -33,7 +33,6 @@ #include #endif #ifdef PARACONF_FOUND -#warning "PARACONF_FOUND, paraconf included in test_api.h" #include #endif From 8e6decd1b955b9af34fe916ba6c85f2bad91aa14 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 18 Sep 2025 16:14:10 +0200 Subject: [PATCH 308/372] Add feedback from 17-09-25 ('Using_PDI.md' not updated) 2 --- example/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 5844a1d85..f0bcb8b51 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -77,6 +77,11 @@ end module endif() endif() + +add_executable(PDI_example_C example.c) +target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) + + if("${BUILD_FORTRAN}") add_executable(PDI_example_F example.F90) target_link_libraries(PDI_example_F PDI::PDI_f90 MPI_with_mod m) From 01faac8c42eed3448c6b365a991f1d2355f00b46 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 18 Sep 2025 16:42:44 +0200 Subject: [PATCH 309/372] Add feedback from 17-09-25 ('Using_PDI.md' not updated) 3 --- bin/build_and_run_all_tests | 4 ++-- tests/CMakeLists.txt | 15 ++++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 217a217bd..c6da42990 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -149,7 +149,7 @@ if ldconfig -p | grep -q libparaconf; then cd "${TEST_DIR_NO_PDI}" RELATIVE_NO_PDI_PATH="no-pdi" - cmake -DBUILD_TRACE_PLUGIN=ON -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" + cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" make ${MAKEFLAGS} ldd PDI_example_trace_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_trace_C @@ -175,7 +175,7 @@ fi cd "${TEST_DIR_API}" RELATIVE_NO_PDI_PATH="no-pdi" NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" -DBUILD_WITH_PARACONF=OFF "${SRCDIR}/tests" +cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" make ${MAKEFLAGS} ldd test_api_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c23519fc7..d5bed7325 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -34,15 +34,12 @@ option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) -option(BUILD_WITH_PARACONF "BUILD_WITH_PARACONF" ON) -if(BUILD_WITH_PARACONF) - find_package(paraconf 1.0.0 COMPONENTS C) - if(paraconf_FOUND) - message(WARNING "Paraconf found") - add_compile_definitions(PARACONF_FOUND) - else() - message(WARNING "Paraconf not found") - endif() +find_package(paraconf 1.0.0 COMPONENTS C) +if(paraconf_FOUND) + message(WARNING "Paraconf found") + add_compile_definitions(PARACONF_FOUND) +else() + message(WARNING "Paraconf not found") endif() find_package(PDI REQUIRED COMPONENTS C) From b398efb5dcc0aced79b60059543afa6104cc229f Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 18 Sep 2025 16:53:56 +0200 Subject: [PATCH 310/372] Add feedback from 17-09-25 ('Using_PDI.md' not updated) 4 --- example/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index f0bcb8b51..59625bcfe 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -79,7 +79,7 @@ endif() add_executable(PDI_example_C example.c) -target_link_libraries(PDI_example_C PDI::PDI_C MPI::MPI_C m) +target_link_libraries(PDI_example_C paraconf::paraconf PDI::PDI_C MPI::MPI_C m) if("${BUILD_FORTRAN}") From 5d89837338caf035d1d557b2a025b48b684e8feb Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 19 Sep 2025 09:56:17 +0200 Subject: [PATCH 311/372] Add feedback from 17-09-25 ('Using_PDI.md' not updated) 5 --- bin/build_and_run_all_tests | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index c6da42990..77f4d6aca 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -151,6 +151,7 @@ if ldconfig -p | grep -q libparaconf; then RELATIVE_NO_PDI_PATH="no-pdi" cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" make ${MAKEFLAGS} + ls ldd PDI_example_trace_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_trace_C From ec266721bb93f40d873ce2f1ee2b0a8f20fec706 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 19 Sep 2025 10:01:39 +0200 Subject: [PATCH 312/372] Add feedback from 17-09-25 ('Using_PDI.md' not updated) 6 --- bin/build_and_run_all_tests | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 77f4d6aca..081e4a0f8 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -151,9 +151,8 @@ if ldconfig -p | grep -q libparaconf; then RELATIVE_NO_PDI_PATH="no-pdi" cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" make ${MAKEFLAGS} - ls - ldd PDI_example_trace_C - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_trace_C + ldd PDI_example_C + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C echo "############ example no-pdi/paraconf done" From 5a89616e0b45b567087a6e9204fefcd0a099de68 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 19 Sep 2025 10:23:57 +0200 Subject: [PATCH 313/372] Add feedback from 17-09-25 ('Using_PDI.md' not updated) 7 - Account for MacOS CI --- bin/build_and_run_all_tests | 3 --- 1 file changed, 3 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 081e4a0f8..8bb0a89d0 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -151,7 +151,6 @@ if ldconfig -p | grep -q libparaconf; then RELATIVE_NO_PDI_PATH="no-pdi" cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" make ${MAKEFLAGS} - ldd PDI_example_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C echo "############ example no-pdi/paraconf done" @@ -161,7 +160,6 @@ if ldconfig -p | grep -q libparaconf; then NO_PDI_TESTS="test_api_C test_api_CXX" cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" make ${MAKEFLAGS} - ldd test_api_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile @@ -177,7 +175,6 @@ RELATIVE_NO_PDI_PATH="no-pdi" NO_PDI_TESTS="test_api_C test_api_CXX" cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" make ${MAKEFLAGS} -ldd test_api_C ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} echo "############ test-api no-pdi/no-paraconf done" From 5d8842c6cf29fa2dcd414f5b692be79499247913 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 19 Sep 2025 11:03:05 +0200 Subject: [PATCH 314/372] Add feedback from 17-09-25 --- AUTHORS | 3 +++ bin/build_and_run_all_tests | 2 +- pdi/docs/Using_PDI.md | 28 ++++------------------------ 3 files changed, 8 insertions(+), 25 deletions(-) diff --git a/AUTHORS b/AUTHORS index b8096eb20..91ae0cd8c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -25,6 +25,9 @@ François-Xavier Mordant - CEA (francois-xavier.mordant@cea.fr) * Fixed CMake issues, internal API enhancement * Bug fix, JSON plugin +Julian Auriac - CEA (julian.auriac@cea.fr) +* Add pdi deactivation option + Jacques Morice - CEA (jacques.morice@cea.fr) * fix the directory of hdf5 library for rhel diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 8bb0a89d0..015933907 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -165,7 +165,7 @@ if ldconfig -p | grep -q libparaconf; then echo "############ test-api no-pdi/paraconf done" else - echo "############ no-pdi/paraconf skipped, paraconf not available on the CI's mini configuration" + echo "############ no-pdi/paraconf skipped, paraconf not available on specific CI configurations" fi # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), without Paraconf diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index b1a7bbbfc..4650d3815 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -110,29 +110,9 @@ cmake . -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR ``` %PDI path as `SRCDIR` containing no-pdi in the example above. -### Using the no-pdi directory without an available Paraconf - -In addition to the previous, you may also want to disable the use of Paraconf -if your system doesn't already include an available install : -```bash -cmake . -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/no-pdi" -DBUILD_WITH_PARACONF=OFF -``` -You will need to modify your target `CMakeLists.txt` (see `pdi/tests/CMakeLists.txt`) : -```cmake -option(BUILD_WITH_PARACONF "BUILD_WITH_PARACONF" ON) -if(BUILD_WITH_PARACONF) - find_package(paraconf 1.0.0 COMPONENTS C) - if(paraconf_FOUND) - message(WARNING "Paraconf found") - add_compile_definitions(PARACONF_FOUND) - else() - message(WARNING "Paraconf not found") - endif() -endif() -``` -If you add this option, unlike the other no-pdi method, -Paraconf must not be called outside of the initialisation of %PDI. -In this case, only the basic `.yaml` file reader of Paraconf +If you add this option, Paraconf will only be used if it is found. +In the case if is not found, only the basic `.yaml` file reader of Paraconf will be enabled to fit with no-pdi, through `PDI_init`. -%PDI can be re-enabled by reverting those modifications. +%PDI can be re-enabled by reverting those modifications, +using cmake again without specifying a path to no-pdi. From 75b3052f9186f2bc291772140a1332e2adc0efcb Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 19 Sep 2025 11:09:43 +0200 Subject: [PATCH 315/372] Add feedback from 17-09-25 (remove duplicate) --- AUTHORS | 3 --- 1 file changed, 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 91ae0cd8c..563e02b46 100644 --- a/AUTHORS +++ b/AUTHORS @@ -7,9 +7,6 @@ each sub-project (including PDI itself) is located in the dedicated sub-project AUTHORS file. -Julian Auriac - CEA (julian.auriac@cea.fr) -* No-PDI contributor - Julien Bigot - CEA (julien.bigot@cea.fr) * Maintainer (Dec. 2014 - ...) * Design and initial implementation From 063b0c35c32bb2dff2fb9ae4f1e18d73d881dc12 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 19 Sep 2025 11:16:30 +0200 Subject: [PATCH 316/372] Add feedback from 17-09-25 - Remove CI output differentiating test cases used by each specific CI configuration --- bin/build_and_run_all_tests | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 015933907..e99e5ee44 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -142,8 +142,6 @@ cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -echo "############ tests pdi/paraconf done" - if ldconfig -p | grep -q libparaconf; then # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf @@ -153,8 +151,6 @@ if ldconfig -p | grep -q libparaconf; then make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C - echo "############ example no-pdi/paraconf done" - cd "${TEST_DIR_API}" RELATIVE_NO_PDI_PATH="no-pdi" NO_PDI_TESTS="test_api_C test_api_CXX" @@ -162,10 +158,6 @@ if ldconfig -p | grep -q libparaconf; then make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile - - echo "############ test-api no-pdi/paraconf done" -else - echo "############ no-pdi/paraconf skipped, paraconf not available on specific CI configurations" fi # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), without Paraconf @@ -176,5 +168,3 @@ NO_PDI_TESTS="test_api_C test_api_CXX" cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} - -echo "############ test-api no-pdi/no-paraconf done" From e9380ba6cbb6624f2ef189d392f82a88ae9f8ac7 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 19 Sep 2025 14:12:19 +0200 Subject: [PATCH 317/372] Update AUTHORS 2 --- AUTHORS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 563e02b46..51656a5f0 100644 --- a/AUTHORS +++ b/AUTHORS @@ -6,6 +6,8 @@ Please note this is the list for the distribution mechanism of PDI. The list for each sub-project (including PDI itself) is located in the dedicated sub-project AUTHORS file. +Julian Auriac - CEA (julian.auriac@cea.fr) +* Add pdi deactivation option Julien Bigot - CEA (julien.bigot@cea.fr) * Maintainer (Dec. 2014 - ...) @@ -22,9 +24,6 @@ François-Xavier Mordant - CEA (francois-xavier.mordant@cea.fr) * Fixed CMake issues, internal API enhancement * Bug fix, JSON plugin -Julian Auriac - CEA (julian.auriac@cea.fr) -* Add pdi deactivation option - Jacques Morice - CEA (jacques.morice@cea.fr) * fix the directory of hdf5 library for rhel From 6c2af6b49f56f24698c58a959af8086918edb166 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 19 Sep 2025 15:08:59 +0200 Subject: [PATCH 318/372] Update Using_PDI.md --- pdi/docs/Using_PDI.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 4650d3815..9d93dc71c 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -100,19 +100,18 @@ plugins in 4 steps (it will use the first plugin found): ### Using the no-pdi directory with an available Paraconf -You may copy the no-pdi folder from %PDI in your application repository, and -must add an option (`CMAKE_PREFIX_PATH` in the example below) to your -cmake command to use this mock folder instead of the real PDI. -Use your target `CMakeLists.txt` with `SRCDIR` as the directory containing no-pdi -(it is the root %PDI directory if you did not move the no-pdi directory) : +You may use the no-pdi mock folder instead of the real PDI to compile your +application. The only modification you need to make is to add the +CMAKE_PREFIX_PATH option to your CMake command : ```bash -cmake . -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/no-pdi" +cmake . -your-usual-cmake-compile-options -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}/no-pdi" ``` -%PDI path as `SRCDIR` containing no-pdi in the example above. +The no-pdi directory can be copied out of the pdi repository, for convenience. -If you add this option, Paraconf will only be used if it is found. -In the case if is not found, only the basic `.yaml` file reader of Paraconf -will be enabled to fit with no-pdi, through `PDI_init`. +If Paraconf is missing from your system, you need to remove all calls to it +from your application. +This contains its inclusion (`#include ` in C/C++, for example), +its use by PDI via `PDI_init`, and direct calls to Paraconf API. %PDI can be re-enabled by reverting those modifications, using cmake again without specifying a path to no-pdi. From 8b139d680918be0e71399952d57c92deb9bbbff7 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 1 Oct 2025 09:59:40 +0200 Subject: [PATCH 319/372] Add feedback from 23-09-25 1/2 - Include a script to run the CI locally, see PR #595 fixing #596 --- bin/build_and_run_all_tests | 37 ++++++-------- no-pdi/cmake/PDIConfig.cmake | 3 -- run-local-CI.sh | 98 ++++++++++++++++++++++++++++++++++++ tests/CMakeLists.txt | 19 +++---- 4 files changed, 120 insertions(+), 37 deletions(-) create mode 100755 run-local-CI.sh diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index e99e5ee44..f15409dba 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -35,8 +35,13 @@ set -xe # Make our work dirs -SRCDIR="${PWD}" +# Set SRCDIR only if not provided +if [[ -z "${SRCDIR:-}" ]]; then + SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + SRCDIR="$(cd "$SCRIPT_DIR/.." && pwd)" +fi +# Prepare working directories TEST_DIR_WITH_PDI="${TEST_DIR_WITH_PDI:-${PWD}}" cd "${TEST_DIR_WITH_PDI}" cd "$(mktemp -d pdibuild.XXXXX)" @@ -135,36 +140,24 @@ fi -# Configure, build & test for pdi, with Paraconf +# Configure, build & test for pdi cd "${TEST_DIR_WITH_PDI}" cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -if ldconfig -p | grep -q libparaconf; then - # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with Paraconf - - cd "${TEST_DIR_NO_PDI}" - RELATIVE_NO_PDI_PATH="no-pdi" - cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" - make ${MAKEFLAGS} - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C - - cd "${TEST_DIR_API}" - RELATIVE_NO_PDI_PATH="no-pdi" - NO_PDI_TESTS="test_api_C test_api_CXX" - cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" - make ${MAKEFLAGS} - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} - rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile -fi +# Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package) -# Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), without Paraconf +cd "${TEST_DIR_NO_PDI}" +RELATIVE_NO_PDI_PATH="no-pdi" +cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" +make ${MAKEFLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C cd "${TEST_DIR_API}" -RELATIVE_NO_PDI_PATH="no-pdi" NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" +cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index fb2161111..d6f41154e 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -38,8 +38,5 @@ set_target_properties(PDI_C PROPERTIES find_package(paraconf 1.0.0 COMPONENTS C) if(paraconf_FOUND) - message(WARNING "Paraconf found") add_compile_definitions(PARACONF_FOUND) -else() - message(WARNING "Paraconf not found") endif() diff --git a/run-local-CI.sh b/run-local-CI.sh new file mode 100755 index 000000000..f917551b2 --- /dev/null +++ b/run-local-CI.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env bash +#============================================================================= +# Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * 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. +# * Neither the names of CEA, nor the names of the 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. +#============================================================================= + +set -euo pipefail + +# ----------- Config ------------------ +IMAGE="ghcr.io/pdidev/ubuntu/rolling/openmpi/all:v3" +SCRIPT_NAME="run.sh" +SCRIPT_DIR="./.ci_tmp" +REPORT_FILE="tests.xml" +TMP_DIR="/tmp_dir_test" +BINARY_PATH="./bin/build_and_run_all_tests" +# ------------------------------------ + +mkdir -p "$SCRIPT_DIR" +rm -f "$SCRIPT_DIR/$SCRIPT_NAME" "$REPORT_FILE" + +# Make sure the binary exists and is executable +if [[ ! -f "$BINARY_PATH" ]]; then + echo "Binary not found at $BINARY_PATH" + exit 1 +fi + +echo "Generating $SCRIPT_NAME in $SCRIPT_DIR..." +cat < "$SCRIPT_DIR/$SCRIPT_NAME" +#!/bin/bash +set -xe + +JOBID="\$(echo "manual-run" | md5sum | cut -b 1)" +if [[ "01234567" == *"\${JOBID}"* ]]; then + export PDI_PLUGIN_PATH=/tmp/pdi_plugins +fi + +export MAKEFLAGS='-j 4' +export CTEST_FLAGS="--output-junit /tmp/tests.xml" +export TEST_DIR="/tmp_dir_test" +export SRCDIR="/src" + +chmod +x /tmp/build_and_run_all_tests +/tmp/build_and_run_all_tests +EOF + +chmod +x "$SCRIPT_DIR/$SCRIPT_NAME" + +# Step 1: Create a container and inject the script +echo "Creating and preparing container..." +CONTAINER_ID=$(podman create \ + --userns=keep-id \ + -v "$PWD":/src \ + --tmpfs "$TMP_DIR:exec" \ + "$IMAGE" \ + bash /tmp/run.sh) + +echo "Copying script and binary into container..." +podman cp "$SCRIPT_DIR/$SCRIPT_NAME" "$CONTAINER_ID:/tmp/run.sh" +podman cp "$BINARY_PATH" "$CONTAINER_ID:/tmp/build_and_run_all_tests" + +# DO NOT run podman exec here — container isn't running yet + +echo "Starting container and running script..." +podman start --attach "$CONTAINER_ID" + +echo "Attempting to extract test report from container..." +if podman cp "$CONTAINER_ID":/tmp/tests.xml "$REPORT_FILE"; then + echo "Test report saved as $REPORT_FILE" +else + echo "Test report not found in container." +fi + +echo "Cleaning up container..." +podman rm "$CONTAINER_ID" >/dev/null 2>&1 || true diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d5bed7325..bd48e80db 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -36,10 +36,7 @@ include(CTest) find_package(paraconf 1.0.0 COMPONENTS C) if(paraconf_FOUND) - message(WARNING "Paraconf found") add_compile_definitions(PARACONF_FOUND) -else() - message(WARNING "Paraconf not found") endif() find_package(PDI REQUIRED COMPONENTS C) @@ -72,9 +69,8 @@ add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOUR endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") add_executable(test_api_C test_api.c) -set(BUILD_FLAGS_FOR_C "-Wall") -target_compile_options(test_api_C PRIVATE - $<$:${BUILD_FLAGS_FOR_C}>) +# target_compile_options(test_api_C PRIVATE +# $<$:${BUILD_FLAGS_FOR_C}>) if(paraconf_FOUND) target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) else() @@ -83,12 +79,11 @@ endif() add_test(NAME test_api_C COMMAND "$") add_executable(test_api_CXX test_api.cpp) -set(BUILD_FLAGS_FOR_CXX "-Wall") -target_compile_options(test_api_CXX PRIVATE - $<$:${BUILD_FLAGS_FOR_CXX}>) -set_target_properties(test_api_CXX PROPERTIES CXX_STANDARD 11) -set_target_properties(test_api_CXX PROPERTIES LANGUAGE CXX) -set_target_properties(test_api_CXX PROPERTIES LINKER_LANGUAGE CXX) +# target_compile_options(test_api_CXX PRIVATE +# $<$:${BUILD_FLAGS_FOR_CXX}>) +# set_target_properties(test_api_CXX PROPERTIES CXX_STANDARD 11) +# set_target_properties(test_api_CXX PROPERTIES LANGUAGE CXX) +# set_target_properties(test_api_CXX PROPERTIES LINKER_LANGUAGE CXX) if(paraconf_FOUND) target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) else() From b31deef9d87c486d146dd7752cb5121d4dc8ffc8 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 1 Oct 2025 11:32:14 +0200 Subject: [PATCH 320/372] Add feedback from 23-09-25 2/2 - Fix the script to run the CI locally --- bin/build_and_run_all_tests | 10 +++------- pdi/CMakeLists.txt | 1 + run-local-CI.sh | 3 ++- tests/CMakeLists.txt | 7 ------- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index f15409dba..69198526b 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -61,10 +61,6 @@ mkdir api_pdi cd api_pdi TEST_DIR_API="${PWD}" -cd "${SRCDIR}" -cd "$(dirname "$0")/.." -SRCDIR="${PWD}" - @@ -151,13 +147,13 @@ ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $ cd "${TEST_DIR_NO_PDI}" RELATIVE_NO_PDI_PATH="no-pdi" -cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" +cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_C +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_trace_C cd "${TEST_DIR_API}" NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+${CMAKE_PREFIX_PATH}:}${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" +cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile diff --git a/pdi/CMakeLists.txt b/pdi/CMakeLists.txt index ce1064b30..4348faf8c 100644 --- a/pdi/CMakeLists.txt +++ b/pdi/CMakeLists.txt @@ -31,6 +31,7 @@ cmake_minimum_required(VERSION 3.16...3.29) project(PDI LANGUAGES CXX C) list(APPEND CMAKE_MODULE_PATH "${PDI_SOURCE_DIR}/cmake") + # Version file(READ VERSION PDI_VERSION) diff --git a/run-local-CI.sh b/run-local-CI.sh index f917551b2..8f2bf9e44 100755 --- a/run-local-CI.sh +++ b/run-local-CI.sh @@ -31,7 +31,8 @@ set -euo pipefail # ----------- Config ------------------ -IMAGE="ghcr.io/pdidev/ubuntu/rolling/openmpi/all:v3" +# IMAGE="ghcr.io/pdidev/ubuntu/rolling/openmpi/all:v3" +IMAGE="ghcr.io/pdidev/spack/latest/gcc/mpich/all:v3" SCRIPT_NAME="run.sh" SCRIPT_DIR="./.ci_tmp" REPORT_FILE="tests.xml" diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index bd48e80db..188dfae2d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -69,8 +69,6 @@ add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOUR endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") add_executable(test_api_C test_api.c) -# target_compile_options(test_api_C PRIVATE -# $<$:${BUILD_FLAGS_FOR_C}>) if(paraconf_FOUND) target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) else() @@ -79,11 +77,6 @@ endif() add_test(NAME test_api_C COMMAND "$") add_executable(test_api_CXX test_api.cpp) -# target_compile_options(test_api_CXX PRIVATE -# $<$:${BUILD_FLAGS_FOR_CXX}>) -# set_target_properties(test_api_CXX PROPERTIES CXX_STANDARD 11) -# set_target_properties(test_api_CXX PROPERTIES LANGUAGE CXX) -# set_target_properties(test_api_CXX PROPERTIES LINKER_LANGUAGE CXX) if(paraconf_FOUND) target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) else() From 069ac76905d4b8b300f1064f746914457db65167 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 1 Oct 2025 13:59:46 +0200 Subject: [PATCH 321/372] Add feedback from 17-09-25, to check specific no-pdi/paraconf combination in CI --- bin/build_and_run_all_tests | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 69198526b..ce484a9ec 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -143,13 +143,17 @@ cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -# Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package) - -cd "${TEST_DIR_NO_PDI}" RELATIVE_NO_PDI_PATH="no-pdi" -cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" -make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_trace_C +if ldconfig -p | grep -q libparaconf; then + # Configure, build & test for pdi's example with CMAKE_PREFIX_PATH (find_package) for no-pdi, with Paraconf + + cd "${TEST_DIR_NO_PDI}" + cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" + make ${MAKEFLAGS} + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_trace_C +fi + +# Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with or without Paraconf cd "${TEST_DIR_API}" NO_PDI_TESTS="test_api_C test_api_CXX" From 7b554f25671fdae2d5ae0a3aea0f1ada13acec41 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 1 Oct 2025 14:19:50 +0200 Subject: [PATCH 322/372] OK for review, despite some CI jobs ending with 'Could not find the file /tmp/tests.xml' --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index ce484a9ec..561073838 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -157,7 +157,7 @@ fi cd "${TEST_DIR_API}" NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" +cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile From ad35695897d7d571431e7bbf7fd01c0e656e2af2 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 6 Oct 2025 13:52:34 +0200 Subject: [PATCH 323/372] Remove run-local-CI.sh from tracking --- run-local-CI.sh | 99 ------------------------------------------------- 1 file changed, 99 deletions(-) delete mode 100755 run-local-CI.sh diff --git a/run-local-CI.sh b/run-local-CI.sh deleted file mode 100755 index 8f2bf9e44..000000000 --- a/run-local-CI.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env bash -#============================================================================= -# Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# * 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. -# * Neither the names of CEA, nor the names of the 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. -#============================================================================= - -set -euo pipefail - -# ----------- Config ------------------ -# IMAGE="ghcr.io/pdidev/ubuntu/rolling/openmpi/all:v3" -IMAGE="ghcr.io/pdidev/spack/latest/gcc/mpich/all:v3" -SCRIPT_NAME="run.sh" -SCRIPT_DIR="./.ci_tmp" -REPORT_FILE="tests.xml" -TMP_DIR="/tmp_dir_test" -BINARY_PATH="./bin/build_and_run_all_tests" -# ------------------------------------ - -mkdir -p "$SCRIPT_DIR" -rm -f "$SCRIPT_DIR/$SCRIPT_NAME" "$REPORT_FILE" - -# Make sure the binary exists and is executable -if [[ ! -f "$BINARY_PATH" ]]; then - echo "Binary not found at $BINARY_PATH" - exit 1 -fi - -echo "Generating $SCRIPT_NAME in $SCRIPT_DIR..." -cat < "$SCRIPT_DIR/$SCRIPT_NAME" -#!/bin/bash -set -xe - -JOBID="\$(echo "manual-run" | md5sum | cut -b 1)" -if [[ "01234567" == *"\${JOBID}"* ]]; then - export PDI_PLUGIN_PATH=/tmp/pdi_plugins -fi - -export MAKEFLAGS='-j 4' -export CTEST_FLAGS="--output-junit /tmp/tests.xml" -export TEST_DIR="/tmp_dir_test" -export SRCDIR="/src" - -chmod +x /tmp/build_and_run_all_tests -/tmp/build_and_run_all_tests -EOF - -chmod +x "$SCRIPT_DIR/$SCRIPT_NAME" - -# Step 1: Create a container and inject the script -echo "Creating and preparing container..." -CONTAINER_ID=$(podman create \ - --userns=keep-id \ - -v "$PWD":/src \ - --tmpfs "$TMP_DIR:exec" \ - "$IMAGE" \ - bash /tmp/run.sh) - -echo "Copying script and binary into container..." -podman cp "$SCRIPT_DIR/$SCRIPT_NAME" "$CONTAINER_ID:/tmp/run.sh" -podman cp "$BINARY_PATH" "$CONTAINER_ID:/tmp/build_and_run_all_tests" - -# DO NOT run podman exec here — container isn't running yet - -echo "Starting container and running script..." -podman start --attach "$CONTAINER_ID" - -echo "Attempting to extract test report from container..." -if podman cp "$CONTAINER_ID":/tmp/tests.xml "$REPORT_FILE"; then - echo "Test report saved as $REPORT_FILE" -else - echo "Test report not found in container." -fi - -echo "Cleaning up container..." -podman rm "$CONTAINER_ID" >/dev/null 2>&1 || true From 3ed9d853a8ff9850f0dc6e949ab594b9103cf16d Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 24 Oct 2025 09:38:22 +0200 Subject: [PATCH 324/372] Reactivate the CI's benchmarking option --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 561073838..28d8f4149 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -139,7 +139,7 @@ fi # Configure, build & test for pdi cd "${TEST_DIR_WITH_PDI}" -cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} From 23c6e1ffd953f8aa504788bdc21677e0520887e4 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 27 Oct 2025 12:39:16 +0100 Subject: [PATCH 325/372] Remove explicit options deactivation for no-pdi's CI tests --- bin/build_and_run_all_tests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 28d8f4149..29d9b2d71 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -148,7 +148,7 @@ if ldconfig -p | grep -q libparaconf; then # Configure, build & test for pdi's example with CMAKE_PREFIX_PATH (find_package) for no-pdi, with Paraconf cd "${TEST_DIR_NO_PDI}" - cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" + cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_trace_C fi @@ -157,7 +157,7 @@ fi cd "${TEST_DIR_API}" NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" +cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile From 12175f96466935662ee716f80170979b12ec824f Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 27 Oct 2025 13:08:47 +0100 Subject: [PATCH 326/372] Reactivate explicit options for no-pdi's CI tests, for HDF5 and NetCDF --- bin/build_and_run_all_tests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 29d9b2d71..44af1f8a1 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -148,7 +148,7 @@ if ldconfig -p | grep -q libparaconf; then # Configure, build & test for pdi's example with CMAKE_PREFIX_PATH (find_package) for no-pdi, with Paraconf cd "${TEST_DIR_NO_PDI}" - cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" + cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_trace_C fi @@ -157,7 +157,7 @@ fi cd "${TEST_DIR_API}" NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" +cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile From f7c466fb823c6b05c6081ade08b0e9a8fd54ff61 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 28 Oct 2025 10:32:49 +0100 Subject: [PATCH 327/372] Add feedback from 28-10-25 - Ready for PR --- bin/build_and_run_all_tests | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 44af1f8a1..494c8beae 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -35,11 +35,7 @@ set -xe # Make our work dirs -# Set SRCDIR only if not provided -if [[ -z "${SRCDIR:-}" ]]; then - SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - SRCDIR="$(cd "$SCRIPT_DIR/.." && pwd)" -fi +SRCDIR="${PWD}" # Prepare working directories TEST_DIR_WITH_PDI="${TEST_DIR_WITH_PDI:-${PWD}}" @@ -148,7 +144,7 @@ if ldconfig -p | grep -q libparaconf; then # Configure, build & test for pdi's example with CMAKE_PREFIX_PATH (find_package) for no-pdi, with Paraconf cd "${TEST_DIR_NO_PDI}" - cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" + cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_JSON_PLUGIN=OFF -DBUILD_FORTRAN=OFF -DBUILD_PYTHON=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_trace_C fi @@ -160,4 +156,3 @@ NO_PDI_TESTS="test_api_C test_api_CXX" cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} -rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile From 6e40eef20c38c4b44ed246d7b62a4988386bfcf8 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 28 Oct 2025 10:42:55 +0100 Subject: [PATCH 328/372] Add feedback from 28-10-25 - Ready for PR 2 --- bin/build_and_run_all_tests | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 494c8beae..4cc3e1efb 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -57,6 +57,9 @@ mkdir api_pdi cd api_pdi TEST_DIR_API="${PWD}" +cd "${SRCDIR}" +cd "$(dirname "$0")/.." +SRCDIR="${PWD}" From 8816811ae021ea9b80402a9ca90a684524a29fce Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 28 Oct 2025 10:50:25 +0100 Subject: [PATCH 329/372] Add feedback from 28-10-25 - Attempt to remove build_and_run_all_tests double definition of SRCDIR --- bin/build_and_run_all_tests | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 4cc3e1efb..826ef73c9 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -35,7 +35,7 @@ set -xe # Make our work dirs -SRCDIR="${PWD}" +SRCDIR="$(dirname "$0")/.." # Prepare working directories TEST_DIR_WITH_PDI="${TEST_DIR_WITH_PDI:-${PWD}}" @@ -57,10 +57,6 @@ mkdir api_pdi cd api_pdi TEST_DIR_API="${PWD}" -cd "${SRCDIR}" -cd "$(dirname "$0")/.." -SRCDIR="${PWD}" - # Gather options From e48a682f1d6945ab9d86f5bfee6aa2a7f55a167a Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 28 Oct 2025 11:01:29 +0100 Subject: [PATCH 330/372] Add feedback from 28-10-25 - Attempt to remove build_and_run_all_tests double definition of SRCDIR 2 --- bin/build_and_run_all_tests | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 826ef73c9..ebdc9ddfe 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -35,7 +35,8 @@ set -xe # Make our work dirs -SRCDIR="$(dirname "$0")/.." +cd "$(dirname "$0")/.." +SRCDIR="${PWD}" # Prepare working directories TEST_DIR_WITH_PDI="${TEST_DIR_WITH_PDI:-${PWD}}" From 98c854bf5a0970958f848083c407b96c64a0dd71 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 28 Oct 2025 11:21:51 +0100 Subject: [PATCH 331/372] Revert toward "Add feedback from 28-10-25 - Ready for PR 2" This reverts commit e48a682f1d6945ab9d86f5bfee6aa2a7f55a167a. --- bin/build_and_run_all_tests | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index ebdc9ddfe..826ef73c9 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -35,8 +35,7 @@ set -xe # Make our work dirs -cd "$(dirname "$0")/.." -SRCDIR="${PWD}" +SRCDIR="$(dirname "$0")/.." # Prepare working directories TEST_DIR_WITH_PDI="${TEST_DIR_WITH_PDI:-${PWD}}" From 9af74c8f4f54477603c9683ce619e223cf8cded0 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Tue, 28 Oct 2025 11:22:27 +0100 Subject: [PATCH 332/372] Revert toward "Add feedback from 28-10-25 - Ready for PR 2" 2 This reverts commit 8816811ae021ea9b80402a9ca90a684524a29fce. --- bin/build_and_run_all_tests | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 826ef73c9..4cc3e1efb 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -35,7 +35,7 @@ set -xe # Make our work dirs -SRCDIR="$(dirname "$0")/.." +SRCDIR="${PWD}" # Prepare working directories TEST_DIR_WITH_PDI="${TEST_DIR_WITH_PDI:-${PWD}}" @@ -57,6 +57,10 @@ mkdir api_pdi cd api_pdi TEST_DIR_API="${PWD}" +cd "${SRCDIR}" +cd "$(dirname "$0")/.." +SRCDIR="${PWD}" + # Gather options From a357171de327ab8257357a167fe8c8a7515ea4b8 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 29 Oct 2025 13:47:26 +0100 Subject: [PATCH 333/372] Add feedback from 28-10-25 bis --- bin/build_and_run_all_tests | 33 +++++++++++++-------------------- example/CMakeLists.txt | 9 ++++++++- example/README.md | 2 +- no-pdi/CMakeLists.txt | 2 +- no-pdi/cmake/PDIConfig.cmake | 3 ++- pdi/docs/Using_PDI.md | 4 +--- tests/CMakeLists.txt | 18 +++++++++--------- 7 files changed, 35 insertions(+), 36 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 4cc3e1efb..f6fca688a 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -33,29 +33,23 @@ set -xe -# Make our work dirs +# Make work directories SRCDIR="${PWD}" -# Prepare working directories -TEST_DIR_WITH_PDI="${TEST_DIR_WITH_PDI:-${PWD}}" -cd "${TEST_DIR_WITH_PDI}" +TEST_DIR="${TEST_DIR:-${PWD}}" +cd "${TEST_DIR}" cd "$(mktemp -d pdibuild.XXXXX)" -TEST_DIR_ROOT="${PWD}" +TEST_DIR="${PWD}" -mkdir no_pdi -cd no_pdi -TEST_DIR_NO_PDI="${PWD}" +TEST_DIR_WITH_PDI="${TEST_DIR}/with_pdi" +mkdir "${TEST_DIR_WITH_PDI}" -cd "${TEST_DIR_ROOT}" -mkdir with_pdi -cd with_pdi -TEST_DIR_WITH_PDI="${PWD}" +TEST_DIR_NO_PDI="${TEST_DIR}/no_pdi" +mkdir "${TEST_DIR_NO_PDI}" -cd "${TEST_DIR_ROOT}" -mkdir api_pdi -cd api_pdi -TEST_DIR_API="${PWD}" +TEST_DIR_API="${TEST_DIR}/api" +mkdir "${TEST_DIR_API}" cd "${SRCDIR}" cd "$(dirname "$0")/.." @@ -142,12 +136,11 @@ cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -RELATIVE_NO_PDI_PATH="no-pdi" -if ldconfig -p | grep -q libparaconf; then +if [[ "x${PDI_LIBS}" = "xprovided" ]]; then # Configure, build & test for pdi's example with CMAKE_PREFIX_PATH (find_package) for no-pdi, with Paraconf cd "${TEST_DIR_NO_PDI}" - cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DBUILD_JSON_PLUGIN=OFF -DBUILD_FORTRAN=OFF -DBUILD_PYTHON=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" + cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/example" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_trace_C fi @@ -156,6 +149,6 @@ fi cd "${TEST_DIR_API}" NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" +cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/tests" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 59625bcfe..30257d0b4 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -33,7 +33,14 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") set(MPI_COMPONENTS C) set(paraconf_COMPONENTS C) -set(PDI_COMPONENTS C) +set(PDI_COMPONENTS C f90) + +option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" OFF) +option(BUILD_DECL_NETCDF_PLUGIN "Build Decl'NetCDF plug-in" OFF) +option(BUILD_FORTRAN "Build with Fortran support" OFF) +option(BUILD_PYCALL_PLUGIN "Build Pycall plug-in" OFF) +option(BUILD_PYTHON "Build with Python support" OFF) +option(BUILD_JSON_PLUGIN "Build JSON plugin" OFF) if("${BUILD_FORTRAN}") enable_language(Fortran) diff --git a/example/README.md b/example/README.md index 5675b362a..eb66321ce 100644 --- a/example/README.md +++ b/example/README.md @@ -122,5 +122,5 @@ We have covered the logic behind the %PDI example. Now you can start the \ref Ha Use `no-pdi` instead of `pdi` when building with: ```bash -cmake -DCMAKE_MODULE_PATH=/no-pdi/cmake .. +cmake -DCMAKE_MODULE_PATH=/no-pdi .. ``` diff --git a/no-pdi/CMakeLists.txt b/no-pdi/CMakeLists.txt index 42b11fbc9..5ba12a192 100644 --- a/no-pdi/CMakeLists.txt +++ b/no-pdi/CMakeLists.txt @@ -28,6 +28,6 @@ #============================================================================= cmake_minimum_required(VERSION 3.16...3.29) -project(PDI LANGUAGES C CXX) +project(PDI LANGUAGES C) include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake") diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index d6f41154e..93ce54d79 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -38,5 +38,6 @@ set_target_properties(PDI_C PROPERTIES find_package(paraconf 1.0.0 COMPONENTS C) if(paraconf_FOUND) - add_compile_definitions(PARACONF_FOUND) + target_link_libraries(PDI_C INTERFACE paraconf::paraconf) + target_compile_definitions(PDI_C INTERFACE PARACONF_FOUND) endif() diff --git a/pdi/docs/Using_PDI.md b/pdi/docs/Using_PDI.md index 9d93dc71c..89f171c2c 100644 --- a/pdi/docs/Using_PDI.md +++ b/pdi/docs/Using_PDI.md @@ -98,9 +98,7 @@ plugins in 4 steps (it will use the first plugin found): ## How to deactivate PDI {#deactivate_pdi} -### Using the no-pdi directory with an available Paraconf - -You may use the no-pdi mock folder instead of the real PDI to compile your +You may use the no-pdi mock directory (with an available Paraconf) instead of the real PDI to compile your application. The only modification you need to make is to add the CMAKE_PREFIX_PATH option to your CMake command : ```bash diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 188dfae2d..bb2bd5ef2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -29,15 +29,13 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") -option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" ON) -option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) +option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" OFF) +option(BUILD_DECL_NETCDF_PLUGIN "Build Decl'NetCDF plug-in" OFF) +option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) find_package(paraconf 1.0.0 COMPONENTS C) -if(paraconf_FOUND) - add_compile_definitions(PARACONF_FOUND) -endif() find_package(PDI REQUIRED COMPONENTS C) @@ -70,16 +68,18 @@ endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") add_executable(test_api_C test_api.c) if(paraconf_FOUND) - target_link_libraries(test_api_C paraconf::paraconf PDI::PDI_C) + target_link_libraries(test_api_C PRIVATE paraconf::paraconf PDI::PDI_C) + target_compile_definitions(test_api_C PRIVATE PARACONF_FOUND) else() - target_link_libraries(test_api_C PDI::PDI_C) + target_link_libraries(test_api_C PRIVATE PDI::PDI_C) endif() add_test(NAME test_api_C COMMAND "$") add_executable(test_api_CXX test_api.cpp) if(paraconf_FOUND) - target_link_libraries(test_api_CXX paraconf::paraconf PDI::PDI_C) + target_link_libraries(test_api_CXX PRIVATE paraconf::paraconf PDI::PDI_C) + target_compile_definitions(test_api_CXX PRIVATE PARACONF_FOUND) else() - target_link_libraries(test_api_CXX PDI::PDI_C) + target_link_libraries(test_api_CXX PRIVATE PDI::PDI_C) endif() add_test(NAME test_api_CXX COMMAND "$") From 1c088939993f97b4d0be5b73b123dbf3be7b73c4 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 29 Oct 2025 14:28:39 +0100 Subject: [PATCH 334/372] Add feedback from 28-10-25 bis 2 --- example/CMakeLists.txt | 3 ++- no-pdi/cmake/PDIConfig.cmake | 2 +- tests/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 30257d0b4..a622b91e4 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -33,7 +33,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") set(MPI_COMPONENTS C) set(paraconf_COMPONENTS C) -set(PDI_COMPONENTS C f90) +set(PDI_COMPONENTS C) option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" OFF) option(BUILD_DECL_NETCDF_PLUGIN "Build Decl'NetCDF plug-in" OFF) @@ -45,6 +45,7 @@ option(BUILD_JSON_PLUGIN "Build JSON plugin" OFF) if("${BUILD_FORTRAN}") enable_language(Fortran) list(APPEND MPI_COMPONENTS Fortran) + list(APPEND PARACONF_COMPONENTS "f90") list(APPEND PDI_COMPONENTS f90) endif() diff --git a/no-pdi/cmake/PDIConfig.cmake b/no-pdi/cmake/PDIConfig.cmake index 93ce54d79..4ed8dc67d 100644 --- a/no-pdi/cmake/PDIConfig.cmake +++ b/no-pdi/cmake/PDIConfig.cmake @@ -35,7 +35,7 @@ set_target_properties(PDI_C PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" ) -find_package(paraconf 1.0.0 COMPONENTS C) +find_package(paraconf QUIET COMPONENTS C) if(paraconf_FOUND) target_link_libraries(PDI_C INTERFACE paraconf::paraconf) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index bb2bd5ef2..af629d162 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -35,7 +35,7 @@ option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) -find_package(paraconf 1.0.0 COMPONENTS C) +find_package(paraconf COMPONENTS C) find_package(PDI REQUIRED COMPONENTS C) From c274f02921162631128b9d639ad17b5c7f8e0fa3 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 29 Oct 2025 14:57:54 +0100 Subject: [PATCH 335/372] Add feedback from 28-10-25 bis 3 --- CMakeLists.txt | 8 +++++ bin/build_and_run_all_tests | 7 ++-- example/CMakeLists.txt | 10 +++--- test_api/CHANGELOG.md | 22 +++++++++++++ test_api/CMakeLists.txt | 56 ++++++++++++++++++++++++++++++++ test_api/cmake/runtest-dir | 18 ++++++++++ {tests => test_api}/test_api.c | 0 {tests => test_api}/test_api.cpp | 0 {tests => test_api}/test_api.h | 0 tests/CMakeLists.txt | 25 ++------------ 10 files changed, 115 insertions(+), 31 deletions(-) create mode 100644 test_api/CHANGELOG.md create mode 100644 test_api/CMakeLists.txt create mode 100755 test_api/cmake/runtest-dir rename {tests => test_api}/test_api.c (100%) rename {tests => test_api}/test_api.cpp (100%) rename {tests => test_api}/test_api.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86e942e02..025aa1737 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -558,3 +558,11 @@ sbuild_add_module(PDI_TESTS INSTALL_COMMAND "" SUBSTEPS test ) + +sbuild_add_module(PDI_TEST_API + ENABLE_BUILD_FLAG BUILD_TESTING + SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/test_api" + DEPENDS PDI + INSTALL_COMMAND "" + SUBSTEPS test +) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index f6fca688a..0f1ddb293 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -145,10 +145,9 @@ if [[ "x${PDI_LIBS}" = "xprovided" ]]; then ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_trace_C fi -# Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with or without Paraconf +# Configure, build & test for pdi's API specific tests with CMAKE_PREFIX_PATH (find_package), with or without Paraconf cd "${TEST_DIR_API}" -NO_PDI_TESTS="test_api_C test_api_CXX" -cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/tests" +cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/test_api" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index a622b91e4..5734a946a 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -35,12 +35,12 @@ set(MPI_COMPONENTS C) set(paraconf_COMPONENTS C) set(PDI_COMPONENTS C) -option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" OFF) -option(BUILD_DECL_NETCDF_PLUGIN "Build Decl'NetCDF plug-in" OFF) +option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" OFF) +option(BUILD_DECL_NETCDF_PLUGIN "Build Decl'NetCDF plug-in" OFF) option(BUILD_FORTRAN "Build with Fortran support" OFF) -option(BUILD_PYCALL_PLUGIN "Build Pycall plug-in" OFF) -option(BUILD_PYTHON "Build with Python support" OFF) -option(BUILD_JSON_PLUGIN "Build JSON plugin" OFF) +option(BUILD_PYCALL_PLUGIN "Build Pycall plug-in" OFF) +option(BUILD_PYTHON "Build with Python support" OFF) +option(BUILD_JSON_PLUGIN "Build JSON plugin" OFF) if("${BUILD_FORTRAN}") enable_language(Fortran) diff --git a/test_api/CHANGELOG.md b/test_api/CHANGELOG.md new file mode 100644 index 000000000..b6b5619fa --- /dev/null +++ b/test_api/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog for PDI tests project +All notable changes to the tests project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + + +## [Unreleased] + +### Added + +### Changed + +### Deprecated + +### Removed + +### Fixed + +### Security + + +## [x.x.x] - xxxx-xx-xx diff --git a/test_api/CMakeLists.txt b/test_api/CMakeLists.txt new file mode 100644 index 000000000..a0bc536c9 --- /dev/null +++ b/test_api/CMakeLists.txt @@ -0,0 +1,56 @@ +#============================================================================= +# Copyright (C) 2020 Institute of Bioorganic Chemistry Polish Academy of Science (PSNC) +# Copyright (C) 2020-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * 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. +# * Neither the name of CEA nor the names of its contributors may be used to +# endorse or promote products derived from this software without specific +# prior written permission. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#============================================================================= + +cmake_minimum_required(VERSION 3.16...3.29) +project(pdi_test_api LANGUAGES C CXX) +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") + +set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") + +option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" OFF) +option(BUILD_DECL_NETCDF_PLUGIN "Build Decl'NetCDF plug-in" OFF) + +include(CTest) + +find_package(paraconf COMPONENTS C) +find_package(PDI REQUIRED COMPONENTS C) + +add_executable(test_api_C test_api.c) +if(paraconf_FOUND) + target_link_libraries(test_api_C PRIVATE paraconf::paraconf PDI::PDI_C) + target_compile_definitions(test_api_C PRIVATE PARACONF_FOUND) +else() + target_link_libraries(test_api_C PRIVATE PDI::PDI_C) +endif() +add_test(NAME test_api_C COMMAND "$") + +add_executable(test_api_CXX test_api.cpp) +if(paraconf_FOUND) + target_link_libraries(test_api_CXX PRIVATE paraconf::paraconf PDI::PDI_C) + target_compile_definitions(test_api_CXX PRIVATE PARACONF_FOUND) +else() + target_link_libraries(test_api_CXX PRIVATE PDI::PDI_C) +endif() +add_test(NAME test_api_CXX COMMAND "$") diff --git a/test_api/cmake/runtest-dir b/test_api/cmake/runtest-dir new file mode 100755 index 000000000..e617dbc92 --- /dev/null +++ b/test_api/cmake/runtest-dir @@ -0,0 +1,18 @@ +#!/bin/bash + +WKDIR="$(mktemp -p "${PWD}" -d run-XXXXXXXXXX)" +function finish { + rm -rf "${WKDIR}" +} +trap finish EXIT + +while [ '--runtest-dir-copy-file' = "$1" ] +do + shift + cp "$1" "${WKDIR}/" + shift +done + +cd "${WKDIR}" + +"$@" diff --git a/tests/test_api.c b/test_api/test_api.c similarity index 100% rename from tests/test_api.c rename to test_api/test_api.c diff --git a/tests/test_api.cpp b/test_api/test_api.cpp similarity index 100% rename from tests/test_api.cpp rename to test_api/test_api.cpp diff --git a/tests/test_api.h b/test_api/test_api.h similarity index 100% rename from tests/test_api.h rename to test_api/test_api.h diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index af629d162..717cfd0fa 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -29,14 +29,13 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") set(RUNTEST_DIR "${CMAKE_CURRENT_LIST_DIR}/../cmake/runtest-dir") -option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" OFF) -option(BUILD_DECL_NETCDF_PLUGIN "Build Decl'NetCDF plug-in" OFF) -option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) +option(BUILD_DECL_HDF5_PLUGIN "Build Decl'HDF5 plug-in" ON) +option(BUILD_DECL_NETCDF_PLUGIN "Build Decl'NetCDF plug-in" ON) +option(BUILD_SERIALIZE_PLUGIN "Build Serialize plug-in" ON) include(CTest) find_package(paraconf COMPONENTS C) - find_package(PDI REQUIRED COMPONENTS C) if("${BUILD_DECL_HDF5_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") @@ -65,21 +64,3 @@ target_link_libraries(test_05_C PDI::PDI_C) add_test(NAME test_05_C COMMAND "$" "${CMAKE_CURRENT_SOURCE_DIR}/test_05.yml") endif("${BUILD_DECL_NETCDF_PLUGIN}" AND "${BUILD_SERIALIZE_PLUGIN}") - -add_executable(test_api_C test_api.c) -if(paraconf_FOUND) - target_link_libraries(test_api_C PRIVATE paraconf::paraconf PDI::PDI_C) - target_compile_definitions(test_api_C PRIVATE PARACONF_FOUND) -else() - target_link_libraries(test_api_C PRIVATE PDI::PDI_C) -endif() -add_test(NAME test_api_C COMMAND "$") - -add_executable(test_api_CXX test_api.cpp) -if(paraconf_FOUND) - target_link_libraries(test_api_CXX PRIVATE paraconf::paraconf PDI::PDI_C) - target_compile_definitions(test_api_CXX PRIVATE PARACONF_FOUND) -else() - target_link_libraries(test_api_CXX PRIVATE PDI::PDI_C) -endif() -add_test(NAME test_api_CXX COMMAND "$") From 39f1595f61f62701197a07d593fed4da16b9d7c7 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 29 Oct 2025 15:08:15 +0100 Subject: [PATCH 336/372] Check CI for MacOS --- bin/build_and_run_all_tests | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 0f1ddb293..a854b979c 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -129,15 +129,16 @@ fi -# Configure, build & test for pdi +# Configure, build & test for pdi, including example and test_api cd "${TEST_DIR_WITH_PDI}" cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +# Configure, build & test for pdi's example with CMAKE_PREFIX_PATH (find_package) for no-pdi, only with Paraconf + if [[ "x${PDI_LIBS}" = "xprovided" ]]; then - # Configure, build & test for pdi's example with CMAKE_PREFIX_PATH (find_package) for no-pdi, with Paraconf cd "${TEST_DIR_NO_PDI}" cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/example" @@ -145,7 +146,7 @@ if [[ "x${PDI_LIBS}" = "xprovided" ]]; then ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_trace_C fi -# Configure, build & test for pdi's API specific tests with CMAKE_PREFIX_PATH (find_package), with or without Paraconf +# Configure, build & test for pdi's API specific tests with CMAKE_PREFIX_PATH (find_package) for no-pdi, with or without Paraconf cd "${TEST_DIR_API}" cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/test_api" From 917377ed6de43bc9fcb503177f28270f360d8748 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Wed, 29 Oct 2025 16:23:13 +0100 Subject: [PATCH 337/372] Attempt to enable multiple ctest junit output files for the CI, via merge --- .github/actions/test/action.yml | 1 + bin/build_and_run_all_tests | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 33b5b7245..4f7e29fc9 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -45,6 +45,7 @@ runs: if [[ "01234567" == *"${JOBID}"* ]]; then export PDI_PLUGIN_PATH=/tmp/pdi_plugins; fi export MAKEFLAGS='-j 4' export CTEST_FLAGS="--output-junit /tmp/tests.xml" + export CTEST_OUTPUT_JUNIT="/tmp/tests.xml" export TEST_DIR="/tmp_dir_test" /src/bin/build_and_run_all_tests EOF diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index a854b979c..3904b5019 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -143,7 +143,7 @@ if [[ "x${PDI_LIBS}" = "xprovided" ]]; then cd "${TEST_DIR_NO_PDI}" cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/example" make ${MAKEFLAGS} - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_trace_C + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS}_2.xml -R PDI_example_trace_C fi # Configure, build & test for pdi's API specific tests with CMAKE_PREFIX_PATH (find_package) for no-pdi, with or without Paraconf @@ -151,4 +151,6 @@ fi cd "${TEST_DIR_API}" cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/test_api" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS}_3.xml + +junitparser merge $(ls ${CTEST_OUTPUT_JUNIT}*.xml 2>/dev/null) ${CTEST_OUTPUT_JUNIT} || echo "No output files of junit to merge" From aa6e9ab9c04bcacfbf423810859ed03e453c2361 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Oct 2025 08:52:32 +0100 Subject: [PATCH 338/372] Attempt to enable multiple ctest junit output files for the CI, via devmasx/junit-merge-action@v1 --- .github/actions/test/action.yml | 2 +- .github/workflows/tests.yml | 12 ++++++++++++ bin/build_and_run_all_tests | 6 +++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 4f7e29fc9..ca5dda668 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -55,7 +55,7 @@ runs: --tmpfs /tmp_dir_test:exec \ ${{inputs.image}} \ bash /src/run.sh - if docker cp "$(cat docker.cid)":/tmp/tests.xml tests.xml + if docker cp "$(cat docker.cid)":/tmp/. ./ then echo "with_report=true" >> "$GITHUB_OUTPUT" else echo "with_report=false" >> "$GITHUB_OUTPUT" fi diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fe615162f..3b7d73a68 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -49,6 +49,12 @@ jobs: uses: ./.github/actions/test/ with: image: 'ghcr.io/pdidev/spack/${{matrix.version}}/${{matrix.compiler}}/${{matrix.mpi}}/${{matrix.variant}}:v3' + - name: Merge JUnit reports + if: always() && steps.test.outputs.with_report == 'true' + uses: devmasx/junit-merge-action@v1 + with: + files: 'tests.xml_*' + output: 'tests.xml' debuntu: strategy: fail-fast: false @@ -65,3 +71,9 @@ jobs: uses: ./.github/actions/test/ with: image: 'ghcr.io/pdidev/${{matrix.base}}/${{matrix.mpi}}/${{matrix.variant}}:v3' + - name: Merge JUnit reports + if: always() && steps.test.outputs.with_report == 'true' + uses: devmasx/junit-merge-action@v1 + with: + files: 'tests.xml_*' + output: 'tests.xml' diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 3904b5019..6748edae1 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -83,7 +83,7 @@ NC_VERSION_MINOR="$(nc-config --version | sed 's/^[a-zA-Z ]*\([0-9]*\)\.\([0-9]* if (( NC_VERSION_MAJOR > 4 || ( NC_VERSION_MAJOR == 4 && NC_VERSION_MINOR > 8 ) )) || [[ "x${PDI_LIBS}" != "xprovided" ]] then #TODO: NetCDF error https://gitlab.maisondelasimulation.fr/pdidev/pdi/-/issues/433 - EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}test_05_C" + # EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}test_05_C" fi if [[ "x${PDI_SYSTEM}" =~ ^x(ubuntu|debian) && "x${PDI_MPI}" = "xmpich" ]] @@ -134,7 +134,7 @@ fi cd "${TEST_DIR_WITH_PDI}" cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS}_1.xml ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} # Configure, build & test for pdi's example with CMAKE_PREFIX_PATH (find_package) for no-pdi, only with Paraconf @@ -153,4 +153,4 @@ cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/test_api" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS}_3.xml -junitparser merge $(ls ${CTEST_OUTPUT_JUNIT}*.xml 2>/dev/null) ${CTEST_OUTPUT_JUNIT} || echo "No output files of junit to merge" +# junitparser merge $(ls ${CTEST_OUTPUT_JUNIT}*.xml 2>/dev/null) ${CTEST_OUTPUT_JUNIT} || echo "No output files of junit to merge" From 8ec2586b209292d50ed0e2dfe0b58a454362d44d Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Oct 2025 08:54:38 +0100 Subject: [PATCH 339/372] Attempt to enable multiple ctest junit output files for the CI, via tricycl/junit-merge@v1 --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3b7d73a68..b1aae6785 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -51,7 +51,7 @@ jobs: image: 'ghcr.io/pdidev/spack/${{matrix.version}}/${{matrix.compiler}}/${{matrix.mpi}}/${{matrix.variant}}:v3' - name: Merge JUnit reports if: always() && steps.test.outputs.with_report == 'true' - uses: devmasx/junit-merge-action@v1 + uses: tricycl/junit-merge@v1 with: files: 'tests.xml_*' output: 'tests.xml' @@ -73,7 +73,7 @@ jobs: image: 'ghcr.io/pdidev/${{matrix.base}}/${{matrix.mpi}}/${{matrix.variant}}:v3' - name: Merge JUnit reports if: always() && steps.test.outputs.with_report == 'true' - uses: devmasx/junit-merge-action@v1 + uses: tricycl/junit-merge@v1 with: files: 'tests.xml_*' output: 'tests.xml' From d8106aab24384c5eed5bdfb46b8c9e5aa576d6d1 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Oct 2025 08:58:48 +0100 Subject: [PATCH 340/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed --- .github/workflows/tests.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b1aae6785..b94068eab 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -51,10 +51,16 @@ jobs: image: 'ghcr.io/pdidev/spack/${{matrix.version}}/${{matrix.compiler}}/${{matrix.mpi}}/${{matrix.variant}}:v3' - name: Merge JUnit reports if: always() && steps.test.outputs.with_report == 'true' - uses: tricycl/junit-merge@v1 - with: - files: 'tests.xml_*' - output: 'tests.xml' + shell: bash + run: | + echo '' > tests.xml + echo '' >> tests.xml + for f in tests.xml_*; do + echo "Merging $f" + sed -n '//p' "$f" >> tests.xml || true + done + echo '' >> tests.xml + ls -lh tests.xml debuntu: strategy: fail-fast: false @@ -73,7 +79,13 @@ jobs: image: 'ghcr.io/pdidev/${{matrix.base}}/${{matrix.mpi}}/${{matrix.variant}}:v3' - name: Merge JUnit reports if: always() && steps.test.outputs.with_report == 'true' - uses: tricycl/junit-merge@v1 - with: - files: 'tests.xml_*' - output: 'tests.xml' + shell: bash + run: | + echo '' > tests.xml + echo '' >> tests.xml + for f in tests.xml_*; do + echo "Merging $f" + sed -n '//p' "$f" >> tests.xml || true + done + echo '' >> tests.xml + ls -lh tests.xml From acf493af78a4d9412deb0322adbc4467a28b5f64 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Oct 2025 09:11:40 +0100 Subject: [PATCH 341/372] Re-enable test_05_C after NetCDF version error fix --- bin/build_and_run_all_tests | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 6748edae1..098acfb39 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -80,11 +80,11 @@ fi NC_VERSION_MAJOR="$(nc-config --version | sed 's/^[a-zA-Z ]*\([0-9]*\)\.\([0-9]*\).*$/\1/')" NC_VERSION_MINOR="$(nc-config --version | sed 's/^[a-zA-Z ]*\([0-9]*\)\.\([0-9]*\).*$/\2/')" -if (( NC_VERSION_MAJOR > 4 || ( NC_VERSION_MAJOR == 4 && NC_VERSION_MINOR > 8 ) )) || [[ "x${PDI_LIBS}" != "xprovided" ]] -then - #TODO: NetCDF error https://gitlab.maisondelasimulation.fr/pdidev/pdi/-/issues/433 - # EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}test_05_C" -fi +# if (( NC_VERSION_MAJOR > 4 || ( NC_VERSION_MAJOR == 4 && NC_VERSION_MINOR > 8 ) )) || [[ "x${PDI_LIBS}" != "xprovided" ]] +# then +# #TODO: NetCDF error https://gitlab.maisondelasimulation.fr/pdidev/pdi/-/issues/433 +# EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}test_05_C" +# fi if [[ "x${PDI_SYSTEM}" =~ ^x(ubuntu|debian) && "x${PDI_MPI}" = "xmpich" ]] then From 6b21418c89ee663a254c801a0cc8492c69c71e6f Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Oct 2025 09:20:47 +0100 Subject: [PATCH 342/372] Disable test_05_C and use EXCLUDED_PDI_TESTS for all ctests commands --- bin/build_and_run_all_tests | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 098acfb39..d6e540c96 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -80,11 +80,11 @@ fi NC_VERSION_MAJOR="$(nc-config --version | sed 's/^[a-zA-Z ]*\([0-9]*\)\.\([0-9]*\).*$/\1/')" NC_VERSION_MINOR="$(nc-config --version | sed 's/^[a-zA-Z ]*\([0-9]*\)\.\([0-9]*\).*$/\2/')" -# if (( NC_VERSION_MAJOR > 4 || ( NC_VERSION_MAJOR == 4 && NC_VERSION_MINOR > 8 ) )) || [[ "x${PDI_LIBS}" != "xprovided" ]] -# then -# #TODO: NetCDF error https://gitlab.maisondelasimulation.fr/pdidev/pdi/-/issues/433 -# EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}test_05_C" -# fi +if (( NC_VERSION_MAJOR > 4 || ( NC_VERSION_MAJOR == 4 && NC_VERSION_MINOR > 8 ) )) || [[ "x${PDI_LIBS}" != "xprovided" ]] +then + #TODO: NetCDF error https://gitlab.maisondelasimulation.fr/pdidev/pdi/-/issues/433 + EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}test_05_C" +fi if [[ "x${PDI_SYSTEM}" =~ ^x(ubuntu|debian) && "x${PDI_MPI}" = "xmpich" ]] then @@ -143,7 +143,7 @@ if [[ "x${PDI_LIBS}" = "xprovided" ]]; then cd "${TEST_DIR_NO_PDI}" cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/example" make ${MAKEFLAGS} - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS}_2.xml -R PDI_example_trace_C + ctest --output-on-failure --timeout 90 ${CTEST_FLAGS}_2.xml -R PDI_example_trace_C -E ${EXCLUDED_PDI_TESTS} fi # Configure, build & test for pdi's API specific tests with CMAKE_PREFIX_PATH (find_package) for no-pdi, with or without Paraconf @@ -151,6 +151,4 @@ fi cd "${TEST_DIR_API}" cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/test_api" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS}_3.xml - -# junitparser merge $(ls ${CTEST_OUTPUT_JUNIT}*.xml 2>/dev/null) ${CTEST_OUTPUT_JUNIT} || echo "No output files of junit to merge" +ctest --output-on-failure --timeout 90 ${CTEST_FLAGS}_3.xml -E ${EXCLUDED_PDI_TESTS} From 1f24f1269212939a087881ce7af54cb355436536 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Oct 2025 10:20:35 +0100 Subject: [PATCH 343/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed 2 --- .github/actions/test/action.yml | 9 +++++++ .github/workflows/tests.yml | 48 ++++++++++++++++----------------- 2 files changed, 33 insertions(+), 24 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index ca5dda668..adc69ae2f 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -59,6 +59,15 @@ runs: then echo "with_report=true" >> "$GITHUB_OUTPUT" else echo "with_report=false" >> "$GITHUB_OUTPUT" fi + - id: Merge JUnit reports + shell: bash + run: | + echo '' > tests.xml + echo '' >> tests.xml + for f in tests.xml_*.xml; do + sed -n '//p' "$f" >> tests.xml + done + echo '' >> tests.xml - id: Publish uses: mikepenz/action-junit-report@v4 if: always() && steps.test.outputs.with_report == 'true' # always run even if the previous step fails diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b94068eab..aff548f71 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -49,18 +49,18 @@ jobs: uses: ./.github/actions/test/ with: image: 'ghcr.io/pdidev/spack/${{matrix.version}}/${{matrix.compiler}}/${{matrix.mpi}}/${{matrix.variant}}:v3' - - name: Merge JUnit reports - if: always() && steps.test.outputs.with_report == 'true' - shell: bash - run: | - echo '' > tests.xml - echo '' >> tests.xml - for f in tests.xml_*; do - echo "Merging $f" - sed -n '//p' "$f" >> tests.xml || true - done - echo '' >> tests.xml - ls -lh tests.xml + # - name: Merge JUnit reports + # if: always() && steps.test.outputs.with_report == 'true' + # shell: bash + # run: | + # echo '' > tests.xml + # echo '' >> tests.xml + # for f in tests.xml_*; do + # echo "Merging $f" + # sed -n '//p' "$f" >> tests.xml || true + # done + # echo '' >> tests.xml + # ls -lh tests.xml debuntu: strategy: fail-fast: false @@ -77,15 +77,15 @@ jobs: uses: ./.github/actions/test/ with: image: 'ghcr.io/pdidev/${{matrix.base}}/${{matrix.mpi}}/${{matrix.variant}}:v3' - - name: Merge JUnit reports - if: always() && steps.test.outputs.with_report == 'true' - shell: bash - run: | - echo '' > tests.xml - echo '' >> tests.xml - for f in tests.xml_*; do - echo "Merging $f" - sed -n '//p' "$f" >> tests.xml || true - done - echo '' >> tests.xml - ls -lh tests.xml + # - name: Merge JUnit reports + # if: always() && steps.test.outputs.with_report == 'true' + # shell: bash + # run: | + # echo '' > tests.xml + # echo '' >> tests.xml + # for f in tests.xml_*; do + # echo "Merging $f" + # sed -n '//p' "$f" >> tests.xml || true + # done + # echo '' >> tests.xml + # ls -lh tests.xml From 817b8d9c195368d478b46ea0b2d16bb29b227eda Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Oct 2025 10:24:00 +0100 Subject: [PATCH 344/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed 3 --- .github/actions/test/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index adc69ae2f..1c27b1d9d 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -36,7 +36,7 @@ inputs: runs: using: "composite" steps: - - id: test + - id: RunTests shell: bash run: | cat<<-'EOF' > run.sh @@ -59,7 +59,7 @@ runs: then echo "with_report=true" >> "$GITHUB_OUTPUT" else echo "with_report=false" >> "$GITHUB_OUTPUT" fi - - id: Merge JUnit reports + - id: MergeTestsReports shell: bash run: | echo '' > tests.xml @@ -68,7 +68,7 @@ runs: sed -n '//p' "$f" >> tests.xml done echo '' >> tests.xml - - id: Publish + - id: PublishMergedReport uses: mikepenz/action-junit-report@v4 if: always() && steps.test.outputs.with_report == 'true' # always run even if the previous step fails with: { report_paths: 'tests.xml' } From f74b93576c7295c88c46226a6d2bb56074b71dcf Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Oct 2025 10:39:23 +0100 Subject: [PATCH 345/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed 4 --- .github/actions/test/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 1c27b1d9d..eaa1dafa7 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -70,5 +70,5 @@ runs: echo '' >> tests.xml - id: PublishMergedReport uses: mikepenz/action-junit-report@v4 - if: always() && steps.test.outputs.with_report == 'true' # always run even if the previous step fails + if: always() && steps.RunTests.outputs.with_report == 'true' # always run even if the previous step fails with: { report_paths: 'tests.xml' } From b87eeca8a9a022f91af2a7fe56d77698578f4b17 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Oct 2025 10:56:21 +0100 Subject: [PATCH 346/372] Attempt to bind mount tmp for Docker, to fix junit output issue on ubuntu/focal --- .github/actions/test/action.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index eaa1dafa7..03e073937 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -39,9 +39,11 @@ runs: - id: RunTests shell: bash run: | - cat<<-'EOF' > run.sh + mkdir -p tmp + + cat <<-'EOF' > run.sh set -xe - JOBID="$(echo "${{github.run_id}}"|md5sum|cut -b 1)" + JOBID="$(echo "${{github.run_id}}" | md5sum | cut -b 1)" if [[ "01234567" == *"${JOBID}"* ]]; then export PDI_PLUGIN_PATH=/tmp/pdi_plugins; fi export MAKEFLAGS='-j 4' export CTEST_FLAGS="--output-junit /tmp/tests.xml" @@ -49,25 +51,31 @@ runs: export TEST_DIR="/tmp_dir_test" /src/bin/build_and_run_all_tests EOF + docker run \ - --cidfile='docker.cid' \ -v ${PWD}:/src:ro \ + -v ${PWD}/tmp:/tmp \ --tmpfs /tmp_dir_test:exec \ ${{inputs.image}} \ bash /src/run.sh - if docker cp "$(cat docker.cid)":/tmp/. ./ - then echo "with_report=true" >> "$GITHUB_OUTPUT" - else echo "with_report=false" >> "$GITHUB_OUTPUT" + + if compgen -G tmp/tests.xml_*.xml > /dev/null; then + echo "with_report=true" >> "$GITHUB_OUTPUT" + else + echo "with_report=false" >> "$GITHUB_OUTPUT" fi + - id: MergeTestsReports shell: bash run: | echo '' > tests.xml echo '' >> tests.xml - for f in tests.xml_*.xml; do + for f in tmp/tests.xml_*.xml; do sed -n '//p' "$f" >> tests.xml done echo '' >> tests.xml + ls -lh tests.xml + - id: PublishMergedReport uses: mikepenz/action-junit-report@v4 if: always() && steps.RunTests.outputs.with_report == 'true' # always run even if the previous step fails From 022102bd58f54eacccc677bd63d743c1343368a5 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Oct 2025 13:37:12 +0100 Subject: [PATCH 347/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed 5 --- .github/actions/test/action.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 03e073937..3031c5d01 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -39,8 +39,6 @@ runs: - id: RunTests shell: bash run: | - mkdir -p tmp - cat <<-'EOF' > run.sh set -xe JOBID="$(echo "${{github.run_id}}" | md5sum | cut -b 1)" @@ -52,30 +50,35 @@ runs: /src/bin/build_and_run_all_tests EOF - docker run \ + CONTAINER_ID=$(docker run -d \ -v ${PWD}:/src:ro \ - -v ${PWD}/tmp:/tmp \ --tmpfs /tmp_dir_test:exec \ ${{inputs.image}} \ - bash /src/run.sh + bash /src/run.sh) + + echo "Docker container ID: $CONTAINER_ID" + + docker wait $CONTAINER_ID + + docker cp $CONTAINER_ID:/tmp/. ./ - if compgen -G tmp/tests.xml_*.xml > /dev/null; then + docker rm $CONTAINER_ID + + if compgen -G tests.xml_*.xml > /dev/null; then echo "with_report=true" >> "$GITHUB_OUTPUT" else echo "with_report=false" >> "$GITHUB_OUTPUT" fi - - id: MergeTestsReports shell: bash run: | echo '' > tests.xml echo '' >> tests.xml - for f in tmp/tests.xml_*.xml; do + for f in tests.xml_*.xml; do sed -n '//p' "$f" >> tests.xml done echo '' >> tests.xml ls -lh tests.xml - - id: PublishMergedReport uses: mikepenz/action-junit-report@v4 if: always() && steps.RunTests.outputs.with_report == 'true' # always run even if the previous step fails From a2d0dae30835e588d67b50677b0d26efa9be79d7 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Oct 2025 14:10:56 +0100 Subject: [PATCH 348/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed 6 --- .github/actions/test/action.yml | 36 +++++++++++---------------------- 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 3031c5d01..d896b70a3 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -50,36 +50,24 @@ runs: /src/bin/build_and_run_all_tests EOF - CONTAINER_ID=$(docker run -d \ + # Run container and save ID to a file (works even on older Docker) + docker run --cidfile docker.cid \ -v ${PWD}:/src:ro \ --tmpfs /tmp_dir_test:exec \ ${{inputs.image}} \ - bash /src/run.sh) + bash /src/run.sh || true - echo "Docker container ID: $CONTAINER_ID" + CONTAINER_ID=$(cat docker.cid | tr -d '\n') + echo "Container ID: $CONTAINER_ID" - docker wait $CONTAINER_ID - - docker cp $CONTAINER_ID:/tmp/. ./ - - docker rm $CONTAINER_ID - - if compgen -G tests.xml_*.xml > /dev/null; then + # Copy test reports from container /tmp + if docker cp "$CONTAINER_ID":/tmp/. ./; then + echo "Copied test reports from container." echo "with_report=true" >> "$GITHUB_OUTPUT" else + echo "Failed to copy test reports." echo "with_report=false" >> "$GITHUB_OUTPUT" fi - - id: MergeTestsReports - shell: bash - run: | - echo '' > tests.xml - echo '' >> tests.xml - for f in tests.xml_*.xml; do - sed -n '//p' "$f" >> tests.xml - done - echo '' >> tests.xml - ls -lh tests.xml - - id: PublishMergedReport - uses: mikepenz/action-junit-report@v4 - if: always() && steps.RunTests.outputs.with_report == 'true' # always run even if the previous step fails - with: { report_paths: 'tests.xml' } + + # Clean up + docker rm "$CONTAINER_ID" || true From c3037003e4f311e98b196b6c3f28d2ff56e1b7bd Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Oct 2025 14:44:37 +0100 Subject: [PATCH 349/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed 7 --- .github/actions/test/action.yml | 3 --- .github/workflows/tests.yml | 10 ++++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index d896b70a3..4fe966f2f 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -50,7 +50,6 @@ runs: /src/bin/build_and_run_all_tests EOF - # Run container and save ID to a file (works even on older Docker) docker run --cidfile docker.cid \ -v ${PWD}:/src:ro \ --tmpfs /tmp_dir_test:exec \ @@ -60,7 +59,6 @@ runs: CONTAINER_ID=$(cat docker.cid | tr -d '\n') echo "Container ID: $CONTAINER_ID" - # Copy test reports from container /tmp if docker cp "$CONTAINER_ID":/tmp/. ./; then echo "Copied test reports from container." echo "with_report=true" >> "$GITHUB_OUTPUT" @@ -69,5 +67,4 @@ runs: echo "with_report=false" >> "$GITHUB_OUTPUT" fi - # Clean up docker rm "$CONTAINER_ID" || true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aff548f71..51ea50abb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -61,6 +61,11 @@ jobs: # done # echo '' >> tests.xml # ls -lh tests.xml + - name: Publish JUnit report + if: always() && steps.test.outputs.with_report == 'true' + uses: mikepenz/action-junit-report@v4 + with: + report_paths: 'tests.xml' debuntu: strategy: fail-fast: false @@ -89,3 +94,8 @@ jobs: # done # echo '' >> tests.xml # ls -lh tests.xml + - name: Publish JUnit report + if: always() && steps.test.outputs.with_report == 'true' + uses: mikepenz/action-junit-report@v4 + with: + report_paths: 'tests.xml' From 513501e81114cd49470278194e734f27988a88e6 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Oct 2025 14:59:57 +0100 Subject: [PATCH 350/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed 8 --- .github/actions/test/action.yml | 17 +++++++++++++++++ .github/workflows/tests.yml | 30 ++++-------------------------- 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 4fe966f2f..58f7c929d 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -33,6 +33,12 @@ inputs: image: required: true description: "docker image in which to run the test" + +outputs: + with_report: + description: "True if test report was successfully copied from container" + value: ${{ steps.RunTests.outputs.with_report }} + runs: using: "composite" steps: @@ -68,3 +74,14 @@ runs: fi docker rm "$CONTAINER_ID" || true + + - id: MergeTestsReports + shell: bash + run: | + echo '' > tests.xml + echo '' >> tests.xml + for f in tests.xml_*.xml; do + sed -n '//p' "$f" >> tests.xml + done + echo '' >> tests.xml + ls -lh tests.xml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 51ea50abb..f610576fe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,23 +46,12 @@ jobs: uses: actions/checkout@v4 with: { submodules: recursive } - name: Test + id: testSpack uses: ./.github/actions/test/ with: image: 'ghcr.io/pdidev/spack/${{matrix.version}}/${{matrix.compiler}}/${{matrix.mpi}}/${{matrix.variant}}:v3' - # - name: Merge JUnit reports - # if: always() && steps.test.outputs.with_report == 'true' - # shell: bash - # run: | - # echo '' > tests.xml - # echo '' >> tests.xml - # for f in tests.xml_*; do - # echo "Merging $f" - # sed -n '//p' "$f" >> tests.xml || true - # done - # echo '' >> tests.xml - # ls -lh tests.xml - name: Publish JUnit report - if: always() && steps.test.outputs.with_report == 'true' + if: always() && steps.testSpack.outputs.with_report == 'true' uses: mikepenz/action-junit-report@v4 with: report_paths: 'tests.xml' @@ -79,23 +68,12 @@ jobs: uses: actions/checkout@v4 with: { submodules: recursive } - name: Test + id: testDebuntu uses: ./.github/actions/test/ with: image: 'ghcr.io/pdidev/${{matrix.base}}/${{matrix.mpi}}/${{matrix.variant}}:v3' - # - name: Merge JUnit reports - # if: always() && steps.test.outputs.with_report == 'true' - # shell: bash - # run: | - # echo '' > tests.xml - # echo '' >> tests.xml - # for f in tests.xml_*; do - # echo "Merging $f" - # sed -n '//p' "$f" >> tests.xml || true - # done - # echo '' >> tests.xml - # ls -lh tests.xml - name: Publish JUnit report - if: always() && steps.test.outputs.with_report == 'true' + if: always() && steps.testDebuntu.outputs.with_report == 'true' uses: mikepenz/action-junit-report@v4 with: report_paths: 'tests.xml' From 922f15820b8a1aa0f8adcfc560928bc30fef6de4 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Oct 2025 15:08:00 +0100 Subject: [PATCH 351/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed 9 --- .github/actions/test/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 58f7c929d..58cd451f2 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -56,7 +56,7 @@ runs: /src/bin/build_and_run_all_tests EOF - docker run --cidfile docker.cid \ + docker run --rm=false --cidfile docker.cid \ -v ${PWD}:/src:ro \ --tmpfs /tmp_dir_test:exec \ ${{inputs.image}} \ From ea775f9ea763567c1c4b6b6c25679658954a3e3d Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Thu, 30 Oct 2025 15:26:29 +0100 Subject: [PATCH 352/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed 10 --- .github/actions/test/action.yml | 52 +++++++++++++++------------ .github/workflows/tests.yml | 64 +++++++++++++++++++-------------- 2 files changed, 66 insertions(+), 50 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 58cd451f2..29fc86fd2 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -28,15 +28,15 @@ #============================================================================= name: Test PDI -description: 'Test PDI' +description: 'Run and merge PDI tests' inputs: image: required: true - description: "docker image in which to run the test" + description: "Docker image in which to run the test" outputs: with_report: - description: "True if test report was successfully copied from container" + description: "True if test report was successfully generated" value: ${{ steps.RunTests.outputs.with_report }} runs: @@ -45,43 +45,49 @@ runs: - id: RunTests shell: bash run: | - cat <<-'EOF' > run.sh - set -xe - JOBID="$(echo "${{github.run_id}}" | md5sum | cut -b 1)" - if [[ "01234567" == *"${JOBID}"* ]]; then export PDI_PLUGIN_PATH=/tmp/pdi_plugins; fi - export MAKEFLAGS='-j 4' - export CTEST_FLAGS="--output-junit /tmp/tests.xml" - export CTEST_OUTPUT_JUNIT="/tmp/tests.xml" - export TEST_DIR="/tmp_dir_test" - /src/bin/build_and_run_all_tests + set -xe + + # Prepare working directory (shared with container) + mkdir -p work_dir + + cat <<'EOF' > run.sh + set -xe + JOBID="$(echo "${{ github.run_id }}" | md5sum | cut -b 1)" + if [[ "01234567" == *"${JOBID}"* ]]; then export PDI_PLUGIN_PATH=/tmp/pdi_plugins; fi + export MAKEFLAGS='-j 4' + export CTEST_FLAGS='--output-junit /work/tests.xml' + export CTEST_OUTPUT_JUNIT='/work/tests.xml' + export TEST_DIR='/tmp_dir_test' + /src/bin/build_and_run_all_tests EOF - docker run --rm=false --cidfile docker.cid \ + # Run the container with a bind-mounted /work dir + docker run --rm \ -v ${PWD}:/src:ro \ + -v ${PWD}/work_dir:/work \ --tmpfs /tmp_dir_test:exec \ - ${{inputs.image}} \ + ${{ inputs.image }} \ bash /src/run.sh || true - CONTAINER_ID=$(cat docker.cid | tr -d '\n') - echo "Container ID: $CONTAINER_ID" - - if docker cp "$CONTAINER_ID":/tmp/. ./; then - echo "Copied test reports from container." + # Copy results to workspace + if ls work_dir/tests.xml* >/dev/null 2>&1; then + cp work_dir/tests.xml* ./ echo "with_report=true" >> "$GITHUB_OUTPUT" else - echo "Failed to copy test reports." echo "with_report=false" >> "$GITHUB_OUTPUT" fi - docker rm "$CONTAINER_ID" || true - - id: MergeTestsReports + if: steps.RunTests.outputs.with_report == 'true' shell: bash run: | + set -xe echo '' > tests.xml echo '' >> tests.xml - for f in tests.xml_*.xml; do + for f in tests.xml_* tests.xml_*xml 2>/dev/null; do + [ -f "$f" ] || continue sed -n '//p' "$f" >> tests.xml done echo '' >> tests.xml ls -lh tests.xml + diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f610576fe..a3a6e0c9b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,8 +29,10 @@ name: tests on: - push: { branches: [ main, 'v[0-9]+.[0-9]+' ] } + push: + branches: [ main, 'v[0-9]+.[0-9]+' ] pull_request: + jobs: spack: strategy: @@ -42,19 +44,23 @@ jobs: variant: ['mini', 'all'] runs-on: ubuntu-24.04 steps: - - name: Checkout branch - uses: actions/checkout@v4 - with: { submodules: recursive } - - name: Test - id: testSpack - uses: ./.github/actions/test/ - with: - image: 'ghcr.io/pdidev/spack/${{matrix.version}}/${{matrix.compiler}}/${{matrix.mpi}}/${{matrix.variant}}:v3' - - name: Publish JUnit report - if: always() && steps.testSpack.outputs.with_report == 'true' - uses: mikepenz/action-junit-report@v4 - with: - report_paths: 'tests.xml' + - name: Checkout branch + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Test Spack + id: testSpack + uses: ./.github/actions/test/ + with: + image: ghcr.io/pdidev/spack/${{matrix.version}}/${{matrix.compiler}}/${{matrix.mpi}}/${{matrix.variant}}:v3 + + - name: Publish JUnit report (Spack) + if: always() && steps.testSpack.outputs.with_report == 'true' + uses: mikepenz/action-junit-report@v4 + with: + report_paths: 'tests.xml' + debuntu: strategy: fail-fast: false @@ -64,16 +70,20 @@ jobs: variant: ['mini', 'all'] runs-on: ubuntu-24.04 steps: - - name: Checkout branch - uses: actions/checkout@v4 - with: { submodules: recursive } - - name: Test - id: testDebuntu - uses: ./.github/actions/test/ - with: - image: 'ghcr.io/pdidev/${{matrix.base}}/${{matrix.mpi}}/${{matrix.variant}}:v3' - - name: Publish JUnit report - if: always() && steps.testDebuntu.outputs.with_report == 'true' - uses: mikepenz/action-junit-report@v4 - with: - report_paths: 'tests.xml' + - name: Checkout branch + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Test Debuntu + id: testDebuntu + uses: ./.github/actions/test/ + with: + image: ghcr.io/pdidev/${{matrix.base}}/${{matrix.mpi}}/${{matrix.variant}}:v3 + + - name: Publish JUnit report (Debuntu) + if: always() && steps.testDebuntu.outputs.with_report == 'true' + uses: mikepenz/action-junit-report@v4 + with: + report_paths: 'tests.xml' + From da0a6df475cf1888e4e2e859f4a9fbde6aebff52 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 09:56:27 +0100 Subject: [PATCH 353/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar --- .github/actions/test/action.yml | 40 ++++++++++++++++----------------- bin/build_and_run_all_tests | 6 ++++- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 29fc86fd2..5c825f285 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -46,37 +46,38 @@ runs: shell: bash run: | set -xe - - # Prepare working directory (shared with container) - mkdir -p work_dir - cat <<'EOF' > run.sh - set -xe - JOBID="$(echo "${{ github.run_id }}" | md5sum | cut -b 1)" - if [[ "01234567" == *"${JOBID}"* ]]; then export PDI_PLUGIN_PATH=/tmp/pdi_plugins; fi - export MAKEFLAGS='-j 4' - export CTEST_FLAGS='--output-junit /work/tests.xml' - export CTEST_OUTPUT_JUNIT='/work/tests.xml' - export TEST_DIR='/tmp_dir_test' - /src/bin/build_and_run_all_tests + set -xe + JOBID="$(echo "${{ github.run_id }}" | md5sum | cut -b 1)" + if [[ "01234567" == *"${JOBID}"* ]]; then export PDI_PLUGIN_PATH=/tmp/pdi_plugins; fi + export MAKEFLAGS='-j 4' + export CTEST_FLAGS='--output-junit /tmp/tests.xml' + export CTEST_OUTPUT_JUNIT='/tmp/tests.xml' + export TEST_DIR='/tmp_dir_test' + /src/bin/build_and_run_all_tests + cd /tmp + tar czf /tmp/test_results.tar tests.xml* EOF - # Run the container with a bind-mounted /work dir - docker run --rm \ + docker run --cidfile docker.cid \ -v ${PWD}:/src:ro \ - -v ${PWD}/work_dir:/work \ --tmpfs /tmp_dir_test:exec \ ${{ inputs.image }} \ bash /src/run.sh || true - # Copy results to workspace - if ls work_dir/tests.xml* >/dev/null 2>&1; then - cp work_dir/tests.xml* ./ + CONTAINER_ID=$(cat docker.cid | tr -d '\n') + echo "Container ID: $CONTAINER_ID" + + # Copy the tarball out + if docker cp "$CONTAINER_ID":/tmp/test_results.tar ./; then + tar xzf test_results.tar echo "with_report=true" >> "$GITHUB_OUTPUT" else echo "with_report=false" >> "$GITHUB_OUTPUT" fi + docker rm "$CONTAINER_ID" || true + - id: MergeTestsReports if: steps.RunTests.outputs.with_report == 'true' shell: bash @@ -84,10 +85,9 @@ runs: set -xe echo '' > tests.xml echo '' >> tests.xml - for f in tests.xml_* tests.xml_*xml 2>/dev/null; do + for f in tests.xml_* 2>/dev/null; do [ -f "$f" ] || continue sed -n '//p' "$f" >> tests.xml done echo '' >> tests.xml ls -lh tests.xml - diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index d6e540c96..a083e705c 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -132,7 +132,7 @@ fi # Configure, build & test for pdi, including example and test_api cd "${TEST_DIR_WITH_PDI}" -cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS}_1.xml ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} @@ -152,3 +152,7 @@ cd "${TEST_DIR_API}" cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/test_api" make ${MAKEFLAGS} ctest --output-on-failure --timeout 90 ${CTEST_FLAGS}_3.xml -E ${EXCLUDED_PDI_TESTS} + +# After all three ctest commands +cd /tmp +tar czf /tmp/test_results.tar tests.xml* From 77b5d50ab222b5fa0f00aff61f2fd73062506719 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 10:06:10 +0100 Subject: [PATCH 354/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 2 --- .github/actions/test/action.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 5c825f285..db0a68f95 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -59,8 +59,8 @@ runs: tar czf /tmp/test_results.tar tests.xml* EOF - docker run --cidfile docker.cid \ - -v ${PWD}:/src:ro \ + docker run --rm=false --cidfile=docker.cid \ + -v "${PWD}:/src:ro" \ --tmpfs /tmp_dir_test:exec \ ${{ inputs.image }} \ bash /src/run.sh || true @@ -68,14 +68,17 @@ runs: CONTAINER_ID=$(cat docker.cid | tr -d '\n') echo "Container ID: $CONTAINER_ID" - # Copy the tarball out + # Copy the tarball out from /tmp (where build_and_run_all_tests created it) if docker cp "$CONTAINER_ID":/tmp/test_results.tar ./; then - tar xzf test_results.tar + echo "Extracting test results..." + tar xzf test_results.tar || echo "Warning: could not extract test_results.tar" echo "with_report=true" >> "$GITHUB_OUTPUT" else + echo "No test_results.tar found in container" echo "with_report=false" >> "$GITHUB_OUTPUT" fi + # Clean up container docker rm "$CONTAINER_ID" || true - id: MergeTestsReports From 62bbf526567e54b653c30d10a058417cd5d2d5b8 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 10:14:15 +0100 Subject: [PATCH 355/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 3 --- .github/actions/test/action.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index db0a68f95..8eaec0301 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -86,11 +86,17 @@ runs: shell: bash run: | set -xe + echo "Current working directory: $(pwd)" + echo "Listing all files:" + find . -maxdepth 3 -type f -print | sort + echo '' > tests.xml echo '' >> tests.xml - for f in tests.xml_* 2>/dev/null; do - [ -f "$f" ] || continue + + for f in tests.xml_* tests.xml_*xml; do + echo "Merging $f" sed -n '//p' "$f" >> tests.xml done + echo '' >> tests.xml ls -lh tests.xml From 9b9e1ac26ea257707ce4c2aea8fdb0bcbf3565cf Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 10:32:47 +0100 Subject: [PATCH 356/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 4 --- .github/actions/test/action.yml | 2 +- bin/build_and_run_all_tests | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 8eaec0301..1c87c0ec1 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -93,7 +93,7 @@ runs: echo '' > tests.xml echo '' >> tests.xml - for f in tests.xml_* tests.xml_*xml; do + for f in tests.xml_*; do echo "Merging $f" sed -n '//p' "$f" >> tests.xml done diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index a083e705c..2a14d3ddc 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -134,7 +134,8 @@ fi cd "${TEST_DIR_WITH_PDI}" cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS}_1.xml ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +CTEST_FILE="${CTEST_FLAGS%.*}_1.xml" +ctest --output-on-failure --timeout 90 $CTEST_FILE ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} # Configure, build & test for pdi's example with CMAKE_PREFIX_PATH (find_package) for no-pdi, only with Paraconf @@ -143,7 +144,8 @@ if [[ "x${PDI_LIBS}" = "xprovided" ]]; then cd "${TEST_DIR_NO_PDI}" cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/example" make ${MAKEFLAGS} - ctest --output-on-failure --timeout 90 ${CTEST_FLAGS}_2.xml -R PDI_example_trace_C -E ${EXCLUDED_PDI_TESTS} + CTEST_FILE="${CTEST_FLAGS%.*}_2.xml" + ctest --output-on-failure --timeout 90 $CTEST_FILE -R PDI_example_trace_C -E ${EXCLUDED_PDI_TESTS} fi # Configure, build & test for pdi's API specific tests with CMAKE_PREFIX_PATH (find_package) for no-pdi, with or without Paraconf @@ -151,7 +153,8 @@ fi cd "${TEST_DIR_API}" cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/test_api" make ${MAKEFLAGS} -ctest --output-on-failure --timeout 90 ${CTEST_FLAGS}_3.xml -E ${EXCLUDED_PDI_TESTS} +CTEST_FILE="${CTEST_FLAGS%.*}_3.xml" +ctest --output-on-failure --timeout 90 $CTEST_FILE -E ${EXCLUDED_PDI_TESTS} # After all three ctest commands cd /tmp From 5512329f4aca5c69a2f6eb45b774c561122b83e3 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 10:49:37 +0100 Subject: [PATCH 357/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 5 --- .github/actions/test/action.yml | 2 +- bin/build_and_run_all_tests | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 1c87c0ec1..a4bd1f329 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -93,7 +93,7 @@ runs: echo '' > tests.xml echo '' >> tests.xml - for f in tests.xml_*; do + for f in tests_*.xml; do echo "Merging $f" sed -n '//p' "$f" >> tests.xml done diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 2a14d3ddc..330da5ab9 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -55,6 +55,9 @@ cd "${SRCDIR}" cd "$(dirname "$0")/.." SRCDIR="${PWD}" +TEST_OUTPUT_DIR="${SRCDIR}/tmp_test_results" +mkdir -p "$TEST_OUTPUT_DIR" + # Gather options @@ -134,7 +137,7 @@ fi cd "${TEST_DIR_WITH_PDI}" cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -CTEST_FILE="${CTEST_FLAGS%.*}_1.xml" +CTEST_FILE="--output-junit ${TEST_OUTPUT_DIR}/tests_1.xml" ctest --output-on-failure --timeout 90 $CTEST_FILE ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} # Configure, build & test for pdi's example with CMAKE_PREFIX_PATH (find_package) for no-pdi, only with Paraconf @@ -144,7 +147,7 @@ if [[ "x${PDI_LIBS}" = "xprovided" ]]; then cd "${TEST_DIR_NO_PDI}" cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/example" make ${MAKEFLAGS} - CTEST_FILE="${CTEST_FLAGS%.*}_2.xml" + CTEST_FILE="--output-junit ${TEST_OUTPUT_DIR}/tests_2.xml" ctest --output-on-failure --timeout 90 $CTEST_FILE -R PDI_example_trace_C -E ${EXCLUDED_PDI_TESTS} fi @@ -153,9 +156,9 @@ fi cd "${TEST_DIR_API}" cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/test_api" make ${MAKEFLAGS} -CTEST_FILE="${CTEST_FLAGS%.*}_3.xml" +CTEST_FILE="--output-junit ${TEST_OUTPUT_DIR}/tests_3.xml" ctest --output-on-failure --timeout 90 $CTEST_FILE -E ${EXCLUDED_PDI_TESTS} # After all three ctest commands cd /tmp -tar czf /tmp/test_results.tar tests.xml* +tar czf /tmp/test_results.tar ${TEST_OUTPUT_DIR}/tests_*.xml From 03a6db5eae6c4a2c12fd5e11af955703ab3a5928 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 10:57:42 +0100 Subject: [PATCH 358/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 6 --- bin/build_and_run_all_tests | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 330da5ab9..2b4b0623a 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -51,13 +51,13 @@ mkdir "${TEST_DIR_NO_PDI}" TEST_DIR_API="${TEST_DIR}/api" mkdir "${TEST_DIR_API}" +TEST_OUTPUT_DIR="${TEST_DIR}/tmp_test_results" +mkdir -p "$TEST_OUTPUT_DIR" + cd "${SRCDIR}" cd "$(dirname "$0")/.." SRCDIR="${PWD}" -TEST_OUTPUT_DIR="${SRCDIR}/tmp_test_results" -mkdir -p "$TEST_OUTPUT_DIR" - # Gather options @@ -160,5 +160,5 @@ CTEST_FILE="--output-junit ${TEST_OUTPUT_DIR}/tests_3.xml" ctest --output-on-failure --timeout 90 $CTEST_FILE -E ${EXCLUDED_PDI_TESTS} # After all three ctest commands -cd /tmp -tar czf /tmp/test_results.tar ${TEST_OUTPUT_DIR}/tests_*.xml +cd ${TEST_OUTPUT_DIR} +tar czf "${TEST_OUTPUT_DIR}/test_results.tar" "${TEST_OUTPUT_DIR}/tests_*.xml" From 0c3b8068fe72f50674ff60f04e2711749b57a4a8 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 11:07:39 +0100 Subject: [PATCH 359/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 7 --- bin/build_and_run_all_tests | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 2b4b0623a..1842d953d 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -161,4 +161,6 @@ ctest --output-on-failure --timeout 90 $CTEST_FILE -E ${EXCLUDED_PDI_TESTS} # After all three ctest commands cd ${TEST_OUTPUT_DIR} -tar czf "${TEST_OUTPUT_DIR}/test_results.tar" "${TEST_OUTPUT_DIR}/tests_*.xml" +# tar czf "${TEST_OUTPUT_DIR}/test_results.tar" "${TEST_OUTPUT_DIR}/tests_*.xml" +# tar czf test_results_BIS.tar tests_*.xml +tar czf /tmp/test_results.tar tests_*.xml From 40338f352b13002c8f15d9efdc923b2edfa31e65 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 11:26:39 +0100 Subject: [PATCH 360/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 8 --- bin/build_and_run_all_tests | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 1842d953d..367d05240 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -51,7 +51,7 @@ mkdir "${TEST_DIR_NO_PDI}" TEST_DIR_API="${TEST_DIR}/api" mkdir "${TEST_DIR_API}" -TEST_OUTPUT_DIR="${TEST_DIR}/tmp_test_results" +TEST_OUTPUT_DIR="${TEST_DIR}/test_results" mkdir -p "$TEST_OUTPUT_DIR" cd "${SRCDIR}" @@ -137,8 +137,8 @@ fi cd "${TEST_DIR_WITH_PDI}" cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -CTEST_FILE="--output-junit ${TEST_OUTPUT_DIR}/tests_1.xml" -ctest --output-on-failure --timeout 90 $CTEST_FILE ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +CTEST_FILE="${TEST_OUTPUT_DIR}/tests_1.xml" +ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} # Configure, build & test for pdi's example with CMAKE_PREFIX_PATH (find_package) for no-pdi, only with Paraconf @@ -147,8 +147,8 @@ if [[ "x${PDI_LIBS}" = "xprovided" ]]; then cd "${TEST_DIR_NO_PDI}" cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/example" make ${MAKEFLAGS} - CTEST_FILE="--output-junit ${TEST_OUTPUT_DIR}/tests_2.xml" - ctest --output-on-failure --timeout 90 $CTEST_FILE -R PDI_example_trace_C -E ${EXCLUDED_PDI_TESTS} + CTEST_FILE="${TEST_OUTPUT_DIR}/tests_2.xml" + ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" -R PDI_example_trace_C -E ${EXCLUDED_PDI_TESTS} fi # Configure, build & test for pdi's API specific tests with CMAKE_PREFIX_PATH (find_package) for no-pdi, with or without Paraconf @@ -156,11 +156,9 @@ fi cd "${TEST_DIR_API}" cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/test_api" make ${MAKEFLAGS} -CTEST_FILE="--output-junit ${TEST_OUTPUT_DIR}/tests_3.xml" -ctest --output-on-failure --timeout 90 $CTEST_FILE -E ${EXCLUDED_PDI_TESTS} - -# After all three ctest commands -cd ${TEST_OUTPUT_DIR} -# tar czf "${TEST_OUTPUT_DIR}/test_results.tar" "${TEST_OUTPUT_DIR}/tests_*.xml" -# tar czf test_results_BIS.tar tests_*.xml -tar czf /tmp/test_results.tar tests_*.xml +CTEST_FILE="${TEST_OUTPUT_DIR}/tests_3.xml" +ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" -E ${EXCLUDED_PDI_TESTS} + +cd "$TEST_OUTPUT_DIR" +echo $TEST_OUTPUT_DIR +tar czf "${TEST_OUTPUT_DIR}/test_results.tar" tests_*.xml From 2489a27faaa8394b3ee065dfc4f8994e2e132b2e Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 13:56:02 +0100 Subject: [PATCH 361/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 9 --- .github/actions/test/action.yml | 77 +++++++++++++++++---------------- bin/build_and_run_all_tests | 16 ++++--- 2 files changed, 49 insertions(+), 44 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index a4bd1f329..b07af7420 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -27,76 +27,77 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -name: Test PDI -description: 'Run and merge PDI tests' +name: "Run PDI tests in Docker" +description: "Build, run, and extract test results" inputs: image: + description: "Docker image to use for testing" required: true - description: "Docker image in which to run the test" - -outputs: - with_report: - description: "True if test report was successfully generated" - value: ${{ steps.RunTests.outputs.with_report }} runs: using: "composite" steps: - - id: RunTests + - name: Run tests inside Docker and extract results shell: bash run: | set -xe + + # Write the run.sh script to be executed inside the container cat <<'EOF' > run.sh set -xe + + echo "=== Inside container ===" + echo "PWD: $(pwd)" + echo "Running tests..." + JOBID="$(echo "${{ github.run_id }}" | md5sum | cut -b 1)" if [[ "01234567" == *"${JOBID}"* ]]; then export PDI_PLUGIN_PATH=/tmp/pdi_plugins; fi export MAKEFLAGS='-j 4' export CTEST_FLAGS='--output-junit /tmp/tests.xml' export CTEST_OUTPUT_JUNIT='/tmp/tests.xml' export TEST_DIR='/tmp_dir_test' + /src/bin/build_and_run_all_tests - cd /tmp - tar czf /tmp/test_results.tar tests.xml* + + echo "=== Locating test result files ===" + find /tmp_dir_test -type f -name "tests_*.xml" || true + + echo "=== Preparing tarball ===" + TEST_OUTPUT_DIR="$(find /tmp_dir_test -type d -name test_results | head -n 1 || true)" + echo "TEST_OUTPUT_DIR found at: ${TEST_OUTPUT_DIR}" + + if [[ -n "${TEST_OUTPUT_DIR}" && -d "${TEST_OUTPUT_DIR}" ]]; then + cd "${TEST_OUTPUT_DIR}" + ls -l + tar czf /tmp/test_results.tar tests_*.xml + echo "Tar created at /tmp/test_results.tar" + else + echo "ERROR: TEST_OUTPUT_DIR not found!" + exit 1 + fi EOF - docker run --rm=false --cidfile=docker.cid \ + chmod +x run.sh + + # Run inside Docker + docker run --cidfile docker.cid \ -v "${PWD}:/src:ro" \ --tmpfs /tmp_dir_test:exec \ ${{ inputs.image }} \ bash /src/run.sh || true CONTAINER_ID=$(cat docker.cid | tr -d '\n') - echo "Container ID: $CONTAINER_ID" + echo "Container ID: ${CONTAINER_ID}" - # Copy the tarball out from /tmp (where build_and_run_all_tests created it) - if docker cp "$CONTAINER_ID":/tmp/test_results.tar ./; then - echo "Extracting test results..." - tar xzf test_results.tar || echo "Warning: could not extract test_results.tar" + echo "=== Copying test_results.tar from container ===" + if docker cp "${CONTAINER_ID}":/tmp/test_results.tar ./; then + echo "Successfully copied test_results.tar" + tar tzf test_results.tar || true echo "with_report=true" >> "$GITHUB_OUTPUT" else echo "No test_results.tar found in container" echo "with_report=false" >> "$GITHUB_OUTPUT" fi - # Clean up container - docker rm "$CONTAINER_ID" || true - - - id: MergeTestsReports - if: steps.RunTests.outputs.with_report == 'true' - shell: bash - run: | - set -xe - echo "Current working directory: $(pwd)" - echo "Listing all files:" - find . -maxdepth 3 -type f -print | sort - - echo '' > tests.xml - echo '' >> tests.xml - - for f in tests_*.xml; do - echo "Merging $f" - sed -n '//p' "$f" >> tests.xml - done + docker rm "${CONTAINER_ID}" || true - echo '' >> tests.xml - ls -lh tests.xml diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 367d05240..7768718f9 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -38,18 +38,18 @@ set -xe SRCDIR="${PWD}" TEST_DIR="${TEST_DIR:-${PWD}}" -cd "${TEST_DIR}" +cd -p "${TEST_DIR}" cd "$(mktemp -d pdibuild.XXXXX)" TEST_DIR="${PWD}" TEST_DIR_WITH_PDI="${TEST_DIR}/with_pdi" -mkdir "${TEST_DIR_WITH_PDI}" +mkdir -p "${TEST_DIR_WITH_PDI}" TEST_DIR_NO_PDI="${TEST_DIR}/no_pdi" -mkdir "${TEST_DIR_NO_PDI}" +mkdir -p "${TEST_DIR_NO_PDI}" TEST_DIR_API="${TEST_DIR}/api" -mkdir "${TEST_DIR_API}" +mkdir -p "${TEST_DIR_API}" TEST_OUTPUT_DIR="${TEST_DIR}/test_results" mkdir -p "$TEST_OUTPUT_DIR" @@ -160,5 +160,9 @@ CTEST_FILE="${TEST_OUTPUT_DIR}/tests_3.xml" ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" -E ${EXCLUDED_PDI_TESTS} cd "$TEST_OUTPUT_DIR" -echo $TEST_OUTPUT_DIR -tar czf "${TEST_OUTPUT_DIR}/test_results.tar" tests_*.xml +echo "Contents of TEST_OUTPUT_DIR ($TEST_OUTPUT_DIR):" +find . -type f -maxdepth 1 -print || true + +tar czf /tmp/test_results.tar tests_*.xml +echo "✅ Created /tmp/test_results.tar with the following files:" +tar tzf /tmp/test_results.tar || true From c40bb1368dc47cc2c5c724bde3749016afc6e5cd Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 13:58:16 +0100 Subject: [PATCH 362/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 10 --- bin/build_and_run_all_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 7768718f9..aafdd71ae 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -38,7 +38,7 @@ set -xe SRCDIR="${PWD}" TEST_DIR="${TEST_DIR:-${PWD}}" -cd -p "${TEST_DIR}" +cd "${TEST_DIR}" cd "$(mktemp -d pdibuild.XXXXX)" TEST_DIR="${PWD}" From d264058b35f9c17ff7a7e238a06fcd77e0ebb947 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 14:12:27 +0100 Subject: [PATCH 363/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 11 --- .github/actions/test/action.yml | 13 +++++++++++++ bin/build_and_run_all_tests | 7 +++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index b07af7420..e5bbbacb1 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -101,3 +101,16 @@ runs: docker rm "${CONTAINER_ID}" || true + - name: Extract merged tests + if: always() && steps.testSpack.outputs.with_report == 'true' + run: | + mkdir -p merged_results + tar -xzf test_results.tar -C merged_results + echo '' > tests.xml + echo '' >> tests.xml + for f in merged_results/tests_*.xml; do + echo "Merging $f" + sed -n '//p' "$f" >> tests.xml + done + echo '' >> tests.xml + ls -lh tests.xml diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index aafdd71ae..5ada9221c 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -29,9 +29,8 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -set -xe - - +set -euo pipefail +set -x # Make work directories @@ -164,5 +163,5 @@ echo "Contents of TEST_OUTPUT_DIR ($TEST_OUTPUT_DIR):" find . -type f -maxdepth 1 -print || true tar czf /tmp/test_results.tar tests_*.xml -echo "✅ Created /tmp/test_results.tar with the following files:" +echo "Created /tmp/test_results.tar with the following files:" tar tzf /tmp/test_results.tar || true From 5fb8ca5c1f95a88ec8363b203563be6915f4cfdd Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 14:16:45 +0100 Subject: [PATCH 364/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 12 --- .github/actions/test/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index e5bbbacb1..ac0b52806 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -100,9 +100,9 @@ runs: fi docker rm "${CONTAINER_ID}" || true - - name: Extract merged tests - if: always() && steps.testSpack.outputs.with_report == 'true' + shell: bash + # if: always() && steps.testSpack.outputs.with_report == 'true' run: | mkdir -p merged_results tar -xzf test_results.tar -C merged_results From a0145e8171c9763cdb941d534aaa718e39a15c2f Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 14:27:13 +0100 Subject: [PATCH 365/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 13 --- .github/actions/test/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index ac0b52806..6259a7b33 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -90,7 +90,8 @@ runs: echo "Container ID: ${CONTAINER_ID}" echo "=== Copying test_results.tar from container ===" - if docker cp "${CONTAINER_ID}":/tmp/test_results.tar ./; then + # if docker cp "${CONTAINER_ID}":/tmp/test_results.tar ./; then + if docker cp "${CONTAINER_ID}":/tmp_dir_test/pdibuild.*/test_results/test_results.tar ./; then echo "Successfully copied test_results.tar" tar tzf test_results.tar || true echo "with_report=true" >> "$GITHUB_OUTPUT" From 9cad52fe67bd93e48d3c2f139005aec18bc0f242 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 14:30:35 +0100 Subject: [PATCH 366/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 14 --- .github/actions/test/action.yml | 3 +-- bin/build_and_run_all_tests | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 6259a7b33..ac0b52806 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -90,8 +90,7 @@ runs: echo "Container ID: ${CONTAINER_ID}" echo "=== Copying test_results.tar from container ===" - # if docker cp "${CONTAINER_ID}":/tmp/test_results.tar ./; then - if docker cp "${CONTAINER_ID}":/tmp_dir_test/pdibuild.*/test_results/test_results.tar ./; then + if docker cp "${CONTAINER_ID}":/tmp/test_results.tar ./; then echo "Successfully copied test_results.tar" tar tzf test_results.tar || true echo "with_report=true" >> "$GITHUB_OUTPUT" diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 5ada9221c..c189775d0 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -158,10 +158,19 @@ make ${MAKEFLAGS} CTEST_FILE="${TEST_OUTPUT_DIR}/tests_3.xml" ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" -E ${EXCLUDED_PDI_TESTS} -cd "$TEST_OUTPUT_DIR" -echo "Contents of TEST_OUTPUT_DIR ($TEST_OUTPUT_DIR):" -find . -type f -maxdepth 1 -print || true -tar czf /tmp/test_results.tar tests_*.xml -echo "Created /tmp/test_results.tar with the following files:" -tar tzf /tmp/test_results.tar || true + +echo ">>> Current TEST_OUTPUT_DIR: $TEST_OUTPUT_DIR" +echo ">>> Listing test results directory:" +find "$TEST_OUTPUT_DIR" -type f -maxdepth 1 || true + +cd "$TEST_OUTPUT_DIR" +if ls tests_*.xml 1>/dev/null 2>&1; then + echo ">>> Creating test_results.tar from:" + ls -l tests_*.xml + tar czf test_results.tar tests_*.xml + echo ">>> Copying tar to /tmp for extraction" + cp test_results.tar /tmp/test_results.tar +else + echo ">>> No XML test results found — skipping tar creation" +fi From fb3239f49ce8dbf8c45448130ff58c19873a1303 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 14:42:46 +0100 Subject: [PATCH 367/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 15 --- bin/build_and_run_all_tests | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index c189775d0..e3e54b3a1 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -29,8 +29,7 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -set -euo pipefail -set -x +set -xe # Make work directories From 2e18f1826cbbf70f0357595f376f3f8151a43dcc Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 14:58:03 +0100 Subject: [PATCH 368/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 16 --- .github/actions/test/action.yml | 61 +++++++-------- bin/build_and_run_all_tests | 128 +++++++++++++------------------- 2 files changed, 82 insertions(+), 107 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index ac0b52806..90b6e55dd 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -44,36 +44,33 @@ runs: # Write the run.sh script to be executed inside the container cat <<'EOF' > run.sh + #!/bin/bash set -xe echo "=== Inside container ===" echo "PWD: $(pwd)" echo "Running tests..." - JOBID="$(echo "${{ github.run_id }}" | md5sum | cut -b 1)" - if [[ "01234567" == *"${JOBID}"* ]]; then export PDI_PLUGIN_PATH=/tmp/pdi_plugins; fi - export MAKEFLAGS='-j 4' - export CTEST_FLAGS='--output-junit /tmp/tests.xml' - export CTEST_OUTPUT_JUNIT='/tmp/tests.xml' - export TEST_DIR='/tmp_dir_test' + # Ensure environment variables exist + : "${TEST_DIR:=/tmp_dir_test}" + : "${MAKEFLAGS:=-j}" + : "${CMAKE_FLAGS:=}" + : "${EXCLUDED_PDI_TESTS:=}" + + mkdir -p "$TEST_DIR/test_results" + + export TEST_DIR /src/bin/build_and_run_all_tests echo "=== Locating test result files ===" - find /tmp_dir_test -type f -name "tests_*.xml" || true - - echo "=== Preparing tarball ===" - TEST_OUTPUT_DIR="$(find /tmp_dir_test -type d -name test_results | head -n 1 || true)" - echo "TEST_OUTPUT_DIR found at: ${TEST_OUTPUT_DIR}" + find "$TEST_DIR/test_results" -type f -name "tests_*.xml" || true - if [[ -n "${TEST_OUTPUT_DIR}" && -d "${TEST_OUTPUT_DIR}" ]]; then - cd "${TEST_OUTPUT_DIR}" - ls -l - tar czf /tmp/test_results.tar tests_*.xml - echo "Tar created at /tmp/test_results.tar" + if ls "$TEST_DIR/test_results/tests_*.xml" 1>/dev/null 2>&1; then + tar czf /tmp/test_results.tar -C "$TEST_DIR/test_results" tests_*.xml + echo ">>> Created /tmp/test_results.tar" else - echo "ERROR: TEST_OUTPUT_DIR not found!" - exit 1 + echo ">>> No test results found — skipping tar creation" fi EOF @@ -82,7 +79,7 @@ runs: # Run inside Docker docker run --cidfile docker.cid \ -v "${PWD}:/src:ro" \ - --tmpfs /tmp_dir_test:exec \ + -v /tmp_dir_test:/tmp_dir_test \ ${{ inputs.image }} \ bash /src/run.sh || true @@ -100,17 +97,21 @@ runs: fi docker rm "${CONTAINER_ID}" || true + - name: Extract merged tests shell: bash - # if: always() && steps.testSpack.outputs.with_report == 'true' run: | - mkdir -p merged_results - tar -xzf test_results.tar -C merged_results - echo '' > tests.xml - echo '' >> tests.xml - for f in merged_results/tests_*.xml; do - echo "Merging $f" - sed -n '//p' "$f" >> tests.xml - done - echo '' >> tests.xml - ls -lh tests.xml + if [ -f test_results.tar ]; then + mkdir -p merged_results + tar -xzf test_results.tar -C merged_results + echo '' > tests.xml + echo '' >> tests.xml + for f in merged_results/tests_*.xml; do + echo "Merging $f" + sed -n '//p' "$f" >> tests.xml + done + echo '' >> tests.xml + ls -lh tests.xml + else + echo "No test_results.tar to extract — skipping merge" + fi diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index e3e54b3a1..5eac370cf 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -29,9 +29,12 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= +#!/usr/bin/env bash set -xe -# Make work directories +# ----------------------- +# Setup work directories +# ----------------------- SRCDIR="${PWD}" @@ -52,112 +55,84 @@ mkdir -p "${TEST_DIR_API}" TEST_OUTPUT_DIR="${TEST_DIR}/test_results" mkdir -p "$TEST_OUTPUT_DIR" -cd "${SRCDIR}" +cd "$SRCDIR" cd "$(dirname "$0")/.." SRCDIR="${PWD}" - - +# ----------------------- # Gather options +# ----------------------- MAKEFLAGS="${MAKEFLAGS:--j}" EXCLUDED_PDI_TESTS="" -if [[ -n "${PDI_PLUGIN_PATH}" ]] -then - CMAKE_FLAGS="${CMAKE_FLAGS} -DINSTALL_PDIPLUGINDIR=${PDI_PLUGIN_PATH}" +# Initialize CMAKE_FLAGS safely +: "${CMAKE_FLAGS:=}" + +if [[ -n "${PDI_PLUGIN_PATH}" ]]; then + CMAKE_FLAGS="${CMAKE_FLAGS} -DINSTALL_PDIPLUGINDIR=${PDI_PLUGIN_PATH}" fi -if [[ "x${PDI_LIBS}" = "xprovided" ]] -then - CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_DEFAULT=SYSTEM" +if [[ "x${PDI_LIBS}" = "xprovided" ]]; then + CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_DEFAULT=SYSTEM" else - CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_DEFAULT=EMBEDDED" + CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_DEFAULT=EMBEDDED" fi - - -# Various workarounds +# ----------------------- +# Workarounds for Debian/Ubuntu +# ----------------------- NC_VERSION_MAJOR="$(nc-config --version | sed 's/^[a-zA-Z ]*\([0-9]*\)\.\([0-9]*\).*$/\1/')" NC_VERSION_MINOR="$(nc-config --version | sed 's/^[a-zA-Z ]*\([0-9]*\)\.\([0-9]*\).*$/\2/')" -if (( NC_VERSION_MAJOR > 4 || ( NC_VERSION_MAJOR == 4 && NC_VERSION_MINOR > 8 ) )) || [[ "x${PDI_LIBS}" != "xprovided" ]] -then - #TODO: NetCDF error https://gitlab.maisondelasimulation.fr/pdidev/pdi/-/issues/433 - EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}test_05_C" -fi -if [[ "x${PDI_SYSTEM}" =~ ^x(ubuntu|debian) && "x${PDI_MPI}" = "xmpich" ]] -then - #Workaround: mpi4py in debuntu is packaged for openmpi only - EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}PDI_example_trace_P|PDI_example_decl_hdf5_P" +if (( NC_VERSION_MAJOR > 4 || ( NC_VERSION_MAJOR == 4 && NC_VERSION_MINOR > 8 ) )) || [[ "x${PDI_LIBS}" != "xprovided" ]]; then + EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}test_05_C" fi -if [[ "x${PDI_SYSTEM}" =~ ^xubuntu && "x${PDI_MPI}" = "xmpich" ]] && dpkg -s mpich | grep -q 4.2.0-5 -then - #Workaround: mpich is broken in ubuntu noble and launches independent processes - #Due to https://bugs.launchpad.net/ubuntu/+source/mpich/+bug/2072338 - EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}mpi|decl_hdf5_02_F|decl_hdf5_03_F|decl_hdf5_04_F|PDI_example" +if [[ "x${PDI_SYSTEM}" =~ ^x(ubuntu|debian) && "x${PDI_MPI}" = "xmpich" ]]; then + EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}PDI_example_trace_P|PDI_example_decl_hdf5_P" fi -if [[ "x${PDI_SYSTEM}" =~ ^x(ubuntu|debian) && "x${PDI_LIBS}" = "xprovided" ]] -then - #Workaround: parallel NetCDF detection broken in debuntu (and absent in mpich case) - CMAKE_FLAGS="${CMAKE_FLAGS} -DBUILD_NETCDF_PARALLEL=OFF" +if [[ "x${PDI_SYSTEM}" =~ ^xubuntu && "x${PDI_MPI}" = "xmpich" ]] && dpkg -s mpich | grep -q 4.2.0-5; then + EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}mpi|decl_hdf5_02_F|decl_hdf5_03_F|decl_hdf5_04_F|PDI_example" fi -if [[ "x${PDI_SYSTEM}" =~ ^xmacos ]] -then - #Workaround: not all plugins work on OSX yet (https://github.com/pdidev/pdi/issues/580) - CMAKE_FLAGS="${CMAKE_FLAGS} \ --DBUILD_BENCHMARKING=OFF \ --DBUILD_DECL_HDF5_PLUGIN=ON \ --DBUILD_DECL_NETCDF_PLUGIN=OFF \ --DBUILD_DEISA_PLUGIN=OFF \ --DBUILD_DOCUMENTATION=OFF \ --DBUILD_HDF5_PARALLEL=ON \ --DBUILD_FORTRAN=OFF \ --DBUILD_PYTHON=OFF \ --DBUILD_MPI_PLUGIN=ON \ --DBUILD_NETCDF_PARALLEL=ON \ --DBUILD_PYCALL_PLUGIN=OFF \ --DBUILD_SERIALIZE_PLUGIN=ON \ --DBUILD_SET_VALUE_PLUGIN=ON \ --DBUILD_TESTING=ON \ --DBUILD_TRACE_PLUGIN=ON \ --DBUILD_USER_CODE_PLUGIN=ON" +if [[ "x${PDI_SYSTEM}" =~ ^x(ubuntu|debian) && "x${PDI_LIBS}" = "xprovided" ]]; then + CMAKE_FLAGS="${CMAKE_FLAGS} -DBUILD_NETCDF_PARALLEL=OFF" fi +# ----------------------- +# Configure, build & run tests +# ----------------------- +run_ctest() { + local build_dir="$1" + local cmake_opts="$2" + local regex="$3" -# Configure, build & test for pdi, including example and test_api - -cd "${TEST_DIR_WITH_PDI}" -cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" -make ${MAKEFLAGS} -CTEST_FILE="${TEST_OUTPUT_DIR}/tests_1.xml" -ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} + mkdir -p "$build_dir" + cd "$build_dir" + cmake $cmake_opts "$SRCDIR" + make $MAKEFLAGS + CTEST_FILE="${TEST_OUTPUT_DIR}/tests_$(basename "$build_dir").xml" + ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" ${regex:+-R $regex} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +} -# Configure, build & test for pdi's example with CMAKE_PREFIX_PATH (find_package) for no-pdi, only with Paraconf +# Run PDI tests +run_ctest "$TEST_DIR_WITH_PDI" "-DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel $CMAKE_FLAGS" +# Run example tests if PDI_LIBS=provided if [[ "x${PDI_LIBS}" = "xprovided" ]]; then - - cd "${TEST_DIR_NO_PDI}" - cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/example" - make ${MAKEFLAGS} - CTEST_FILE="${TEST_OUTPUT_DIR}/tests_2.xml" - ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" -R PDI_example_trace_C -E ${EXCLUDED_PDI_TESTS} + run_ctest "$TEST_DIR_NO_PDI" "-DCMAKE_PREFIX_PATH=${SRCDIR}/no-pdi ${SRCDIR}/example" "PDI_example_trace_C" fi -# Configure, build & test for pdi's API specific tests with CMAKE_PREFIX_PATH (find_package) for no-pdi, with or without Paraconf - -cd "${TEST_DIR_API}" -cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/test_api" -make ${MAKEFLAGS} -CTEST_FILE="${TEST_OUTPUT_DIR}/tests_3.xml" -ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" -E ${EXCLUDED_PDI_TESTS} - +# Run API-specific tests +run_ctest "$TEST_DIR_API" "-DCMAKE_PREFIX_PATH=${SRCDIR}/no-pdi ${SRCDIR}/test_api" +# ----------------------- +# Package results +# ----------------------- echo ">>> Current TEST_OUTPUT_DIR: $TEST_OUTPUT_DIR" echo ">>> Listing test results directory:" @@ -167,9 +142,8 @@ cd "$TEST_OUTPUT_DIR" if ls tests_*.xml 1>/dev/null 2>&1; then echo ">>> Creating test_results.tar from:" ls -l tests_*.xml - tar czf test_results.tar tests_*.xml - echo ">>> Copying tar to /tmp for extraction" - cp test_results.tar /tmp/test_results.tar + tar czf /tmp/test_results.tar tests_*.xml + echo ">>> Test results tarball created at /tmp/test_results.tar" else echo ">>> No XML test results found — skipping tar creation" fi From 953da81d444f2dfbbd86a6dc30ebd30d464d8ad9 Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 15:02:25 +0100 Subject: [PATCH 369/372] Attempt to enable multiple ctest junit output files for the CI, via manual merge using sed and tar 17 --- .github/actions/test/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 90b6e55dd..4ac32de1f 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -80,6 +80,7 @@ runs: docker run --cidfile docker.cid \ -v "${PWD}:/src:ro" \ -v /tmp_dir_test:/tmp_dir_test \ + --user root \ ${{ inputs.image }} \ bash /src/run.sh || true From 0b892a35eb07612c286dd90a494f7788b8bf874e Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Fri, 31 Oct 2025 15:14:00 +0100 Subject: [PATCH 370/372] Attempt to enable multiple ctest junit output files for the CI, via junitparser --- .github/actions/test/action.yml | 85 ++++++++++------------------- .github/workflows/tests.yml | 1 - bin/build_and_run_all_tests | 96 ++++++++++----------------------- 3 files changed, 55 insertions(+), 127 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 4ac32de1f..bdd8e56b0 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -28,7 +28,7 @@ #============================================================================= name: "Run PDI tests in Docker" -description: "Build, run, and extract test results" +description: "Build, run, and extract test results using junitparser" inputs: image: description: "Docker image to use for testing" @@ -37,82 +37,53 @@ inputs: runs: using: "composite" steps: - - name: Run tests inside Docker and extract results + - name: Prepare directories + shell: bash + run: | + mkdir -p merged_results + + - name: Run tests inside Docker shell: bash run: | set -xe # Write the run.sh script to be executed inside the container cat <<'EOF' > run.sh - #!/bin/bash set -xe - + echo "=== Inside container ===" - echo "PWD: $(pwd)" - echo "Running tests..." - - # Ensure environment variables exist - : "${TEST_DIR:=/tmp_dir_test}" - : "${MAKEFLAGS:=-j}" - : "${CMAKE_FLAGS:=}" - : "${EXCLUDED_PDI_TESTS:=}" + export MAKEFLAGS='-j 4' + export CTEST_FLAGS='--output-junit /tmp_dir_test/test_results' + export TEST_DIR='/tmp_dir_test' - mkdir -p "$TEST_DIR/test_results" - - export TEST_DIR + mkdir -p "${TEST_DIR}/test_results" /src/bin/build_and_run_all_tests - echo "=== Locating test result files ===" - find "$TEST_DIR/test_results" -type f -name "tests_*.xml" || true - - if ls "$TEST_DIR/test_results/tests_*.xml" 1>/dev/null 2>&1; then - tar czf /tmp/test_results.tar -C "$TEST_DIR/test_results" tests_*.xml - echo ">>> Created /tmp/test_results.tar" - else - echo ">>> No test results found — skipping tar creation" - fi + echo "=== Listing test results ===" + find "${TEST_DIR}/test_results" -type f -name "tests_*.xml" || true EOF chmod +x run.sh - # Run inside Docker - docker run --cidfile docker.cid \ + # Run inside Docker, mounting merged_results as test results directory + docker run --rm \ -v "${PWD}:/src:ro" \ - -v /tmp_dir_test:/tmp_dir_test \ - --user root \ + -v "${PWD}/merged_results:/tmp_dir_test/test_results" \ ${{ inputs.image }} \ bash /src/run.sh || true - CONTAINER_ID=$(cat docker.cid | tr -d '\n') - echo "Container ID: ${CONTAINER_ID}" + - name: Merge JUnit XML results + shell: python + run: | + import junitparser + import glob - echo "=== Copying test_results.tar from container ===" - if docker cp "${CONTAINER_ID}":/tmp/test_results.tar ./; then - echo "Successfully copied test_results.tar" - tar tzf test_results.tar || true - echo "with_report=true" >> "$GITHUB_OUTPUT" - else - echo "No test_results.tar found in container" - echo "with_report=false" >> "$GITHUB_OUTPUT" - fi + merged = junitparser.JUnitXml() - docker rm "${CONTAINER_ID}" || true + for xml_file in glob.glob("merged_results/tests_*.xml"): + print(f"Merging {xml_file}") + merged.add_junitxml(junitparser.JUnitXml.fromfile(xml_file)) - - name: Extract merged tests - shell: bash - run: | - if [ -f test_results.tar ]; then - mkdir -p merged_results - tar -xzf test_results.tar -C merged_results - echo '' > tests.xml - echo '' >> tests.xml - for f in merged_results/tests_*.xml; do - echo "Merging $f" - sed -n '//p' "$f" >> tests.xml - done - echo '' >> tests.xml - ls -lh tests.xml - else - echo "No test_results.tar to extract — skipping merge" - fi + merged.write("tests.xml") + print("Merged XML written to tests.xml") diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a3a6e0c9b..34134ce1d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -86,4 +86,3 @@ jobs: uses: mikepenz/action-junit-report@v4 with: report_paths: 'tests.xml' - diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index 5eac370cf..c8d03b34e 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -32,10 +32,6 @@ #!/usr/bin/env bash set -xe -# ----------------------- -# Setup work directories -# ----------------------- - SRCDIR="${PWD}" TEST_DIR="${TEST_DIR:-${PWD}}" @@ -43,41 +39,19 @@ cd "${TEST_DIR}" cd "$(mktemp -d pdibuild.XXXXX)" TEST_DIR="${PWD}" -TEST_DIR_WITH_PDI="${TEST_DIR}/with_pdi" -mkdir -p "${TEST_DIR_WITH_PDI}" - -TEST_DIR_NO_PDI="${TEST_DIR}/no_pdi" -mkdir -p "${TEST_DIR_NO_PDI}" - -TEST_DIR_API="${TEST_DIR}/api" -mkdir -p "${TEST_DIR_API}" +mkdir -p "${TEST_DIR}/with_pdi" "${TEST_DIR}/no_pdi" "${TEST_DIR}/api" "${TEST_DIR}/test_results" -TEST_OUTPUT_DIR="${TEST_DIR}/test_results" -mkdir -p "$TEST_OUTPUT_DIR" - -cd "$SRCDIR" -cd "$(dirname "$0")/.." +cd "${SRCDIR}" SRCDIR="${PWD}" -# ----------------------- -# Gather options -# ----------------------- - MAKEFLAGS="${MAKEFLAGS:--j}" EXCLUDED_PDI_TESTS="" -# Initialize CMAKE_FLAGS safely -: "${CMAKE_FLAGS:=}" - -if [[ -n "${PDI_PLUGIN_PATH}" ]]; then - CMAKE_FLAGS="${CMAKE_FLAGS} -DINSTALL_PDIPLUGINDIR=${PDI_PLUGIN_PATH}" -fi - -if [[ "x${PDI_LIBS}" = "xprovided" ]]; then - CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_DEFAULT=SYSTEM" -else - CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_DEFAULT=EMBEDDED" -fi +# Set CMAKE_FLAGS depending on environment variables +CMAKE_FLAGS="${CMAKE_FLAGS:-}" +[[ -n "${PDI_PLUGIN_PATH}" ]] && CMAKE_FLAGS="${CMAKE_FLAGS} -DINSTALL_PDIPLUGINDIR=${PDI_PLUGIN_PATH}" +[[ "x${PDI_LIBS}" = "xprovided" ]] && CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_DEFAULT=SYSTEM" || CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_DEFAULT=EMBEDDED" +[[ "x${PDI_SYSTEM}" =~ ^x(ubuntu|debian) && "x${PDI_LIBS}" = "xprovided" ]] && CMAKE_FLAGS="${CMAKE_FLAGS} -DBUILD_NETCDF_PARALLEL=OFF" # ----------------------- # Workarounds for Debian/Ubuntu @@ -106,44 +80,28 @@ fi # Configure, build & run tests # ----------------------- -run_ctest() { - local build_dir="$1" - local cmake_opts="$2" - local regex="$3" - - mkdir -p "$build_dir" - cd "$build_dir" - cmake $cmake_opts "$SRCDIR" - make $MAKEFLAGS - CTEST_FILE="${TEST_OUTPUT_DIR}/tests_$(basename "$build_dir").xml" - ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" ${regex:+-R $regex} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -} +# Run tests with PDI +cd "${TEST_DIR}/with_pdi" +cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" +make ${MAKEFLAGS} +CTEST_FILE="${TEST_DIR}/test_results/tests_1.xml" +ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} -# Run PDI tests -run_ctest "$TEST_DIR_WITH_PDI" "-DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel $CMAKE_FLAGS" - -# Run example tests if PDI_LIBS=provided +# Run tests without PDI if provided if [[ "x${PDI_LIBS}" = "xprovided" ]]; then - run_ctest "$TEST_DIR_NO_PDI" "-DCMAKE_PREFIX_PATH=${SRCDIR}/no-pdi ${SRCDIR}/example" "PDI_example_trace_C" + cd "${TEST_DIR}/no_pdi" + cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/example" + make ${MAKEFLAGS} + CTEST_FILE="${TEST_DIR}/test_results/tests_2.xml" + ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" -R PDI_example_trace_C -E ${EXCLUDED_PDI_TESTS} fi -# Run API-specific tests -run_ctest "$TEST_DIR_API" "-DCMAKE_PREFIX_PATH=${SRCDIR}/no-pdi ${SRCDIR}/test_api" +# API tests +cd "${TEST_DIR}/api" +cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/test_api" +make ${MAKEFLAGS} +CTEST_FILE="${TEST_DIR}/test_results/tests_3.xml" +ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" -E ${EXCLUDED_PDI_TESTS} -# ----------------------- -# Package results -# ----------------------- - -echo ">>> Current TEST_OUTPUT_DIR: $TEST_OUTPUT_DIR" -echo ">>> Listing test results directory:" -find "$TEST_OUTPUT_DIR" -type f -maxdepth 1 || true - -cd "$TEST_OUTPUT_DIR" -if ls tests_*.xml 1>/dev/null 2>&1; then - echo ">>> Creating test_results.tar from:" - ls -l tests_*.xml - tar czf /tmp/test_results.tar tests_*.xml - echo ">>> Test results tarball created at /tmp/test_results.tar" -else - echo ">>> No XML test results found — skipping tar creation" -fi +echo ">>> Listing test results:" +find "${TEST_DIR}/test_results" -type f From 122b4266ea51221e53ee7988e0b8513f2eda7eaf Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 3 Nov 2025 15:54:40 +0100 Subject: [PATCH 371/372] Revert to state of first ctest junit merge attempt, then attempt to enable multiple ctest junit output files for the CI, without merge --- .github/actions/test/action.yml | 72 ++++++------------ .github/workflows/tests.yml | 51 ++++--------- bin/build_and_run_all_tests | 125 ++++++++++++++++++++++---------- 3 files changed, 125 insertions(+), 123 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index bdd8e56b0..96772819c 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -27,63 +27,39 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -name: "Run PDI tests in Docker" -description: "Build, run, and extract test results using junitparser" +name: Test PDI +description: 'Test PDI' inputs: image: - description: "Docker image to use for testing" required: true - + description: "docker image in which to run the test" runs: using: "composite" steps: - - name: Prepare directories - shell: bash - run: | - mkdir -p merged_results - - - name: Run tests inside Docker + - id: test shell: bash run: | - set -xe - - # Write the run.sh script to be executed inside the container - cat <<'EOF' > run.sh + cat<<-'EOF' > run.sh set -xe - - echo "=== Inside container ===" + JOBID="$(echo "${{github.run_id}}"|md5sum|cut -b 1)" + if [[ "01234567" == *"${JOBID}"* ]]; then export PDI_PLUGIN_PATH=/tmp/pdi_plugins; fi export MAKEFLAGS='-j 4' - export CTEST_FLAGS='--output-junit /tmp_dir_test/test_results' - export TEST_DIR='/tmp_dir_test' - - mkdir -p "${TEST_DIR}/test_results" - + export CTEST_FLAGS="--output-junit /tmp/tests.xml" + export CTEST_OUTPUT_JUNIT="/tmp/tests.xml" + export TEST_DIR="/tmp_dir_test" /src/bin/build_and_run_all_tests - - echo "=== Listing test results ===" - find "${TEST_DIR}/test_results" -type f -name "tests_*.xml" || true EOF - - chmod +x run.sh - - # Run inside Docker, mounting merged_results as test results directory - docker run --rm \ - -v "${PWD}:/src:ro" \ - -v "${PWD}/merged_results:/tmp_dir_test/test_results" \ - ${{ inputs.image }} \ - bash /src/run.sh || true - - - name: Merge JUnit XML results - shell: python - run: | - import junitparser - import glob - - merged = junitparser.JUnitXml() - - for xml_file in glob.glob("merged_results/tests_*.xml"): - print(f"Merging {xml_file}") - merged.add_junitxml(junitparser.JUnitXml.fromfile(xml_file)) - - merged.write("tests.xml") - print("Merged XML written to tests.xml") + docker run \ + --cidfile='docker.cid' \ + -v ${PWD}:/src:ro \ + --tmpfs /tmp_dir_test:exec \ + ${{inputs.image}} \ + bash /src/run.sh + if docker cp "$(cat docker.cid)":/tmp/. ./ + then echo "with_report=true" >> "$GITHUB_OUTPUT" + else echo "with_report=false" >> "$GITHUB_OUTPUT" + fi + - id: Publish + uses: mikepenz/action-junit-report@v4 + if: always() && steps.test.outputs.with_report == 'true' # always run even if the previous step fails + with: { report_paths: 'tests*.xml' } diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 34134ce1d..fe615162f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,10 +29,8 @@ name: tests on: - push: - branches: [ main, 'v[0-9]+.[0-9]+' ] + push: { branches: [ main, 'v[0-9]+.[0-9]+' ] } pull_request: - jobs: spack: strategy: @@ -44,23 +42,13 @@ jobs: variant: ['mini', 'all'] runs-on: ubuntu-24.04 steps: - - name: Checkout branch - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Test Spack - id: testSpack - uses: ./.github/actions/test/ - with: - image: ghcr.io/pdidev/spack/${{matrix.version}}/${{matrix.compiler}}/${{matrix.mpi}}/${{matrix.variant}}:v3 - - - name: Publish JUnit report (Spack) - if: always() && steps.testSpack.outputs.with_report == 'true' - uses: mikepenz/action-junit-report@v4 - with: - report_paths: 'tests.xml' - + - name: Checkout branch + uses: actions/checkout@v4 + with: { submodules: recursive } + - name: Test + uses: ./.github/actions/test/ + with: + image: 'ghcr.io/pdidev/spack/${{matrix.version}}/${{matrix.compiler}}/${{matrix.mpi}}/${{matrix.variant}}:v3' debuntu: strategy: fail-fast: false @@ -70,19 +58,10 @@ jobs: variant: ['mini', 'all'] runs-on: ubuntu-24.04 steps: - - name: Checkout branch - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Test Debuntu - id: testDebuntu - uses: ./.github/actions/test/ - with: - image: ghcr.io/pdidev/${{matrix.base}}/${{matrix.mpi}}/${{matrix.variant}}:v3 - - - name: Publish JUnit report (Debuntu) - if: always() && steps.testDebuntu.outputs.with_report == 'true' - uses: mikepenz/action-junit-report@v4 - with: - report_paths: 'tests.xml' + - name: Checkout branch + uses: actions/checkout@v4 + with: { submodules: recursive } + - name: Test + uses: ./.github/actions/test/ + with: + image: 'ghcr.io/pdidev/${{matrix.base}}/${{matrix.mpi}}/${{matrix.variant}}:v3' diff --git a/bin/build_and_run_all_tests b/bin/build_and_run_all_tests index c8d03b34e..24894a6de 100755 --- a/bin/build_and_run_all_tests +++ b/bin/build_and_run_all_tests @@ -29,9 +29,12 @@ # POSSIBILITY OF SUCH DAMAGE. #============================================================================= -#!/usr/bin/env bash set -xe + + +# Make work directories + SRCDIR="${PWD}" TEST_DIR="${TEST_DIR:-${PWD}}" @@ -39,69 +42,113 @@ cd "${TEST_DIR}" cd "$(mktemp -d pdibuild.XXXXX)" TEST_DIR="${PWD}" -mkdir -p "${TEST_DIR}/with_pdi" "${TEST_DIR}/no_pdi" "${TEST_DIR}/api" "${TEST_DIR}/test_results" +TEST_DIR_WITH_PDI="${TEST_DIR}/with_pdi" +mkdir "${TEST_DIR_WITH_PDI}" + +TEST_DIR_NO_PDI="${TEST_DIR}/no_pdi" +mkdir "${TEST_DIR_NO_PDI}" + +TEST_DIR_API="${TEST_DIR}/api" +mkdir "${TEST_DIR_API}" cd "${SRCDIR}" +cd "$(dirname "$0")/.." SRCDIR="${PWD}" + + +# Gather options + MAKEFLAGS="${MAKEFLAGS:--j}" EXCLUDED_PDI_TESTS="" -# Set CMAKE_FLAGS depending on environment variables -CMAKE_FLAGS="${CMAKE_FLAGS:-}" -[[ -n "${PDI_PLUGIN_PATH}" ]] && CMAKE_FLAGS="${CMAKE_FLAGS} -DINSTALL_PDIPLUGINDIR=${PDI_PLUGIN_PATH}" -[[ "x${PDI_LIBS}" = "xprovided" ]] && CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_DEFAULT=SYSTEM" || CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_DEFAULT=EMBEDDED" -[[ "x${PDI_SYSTEM}" =~ ^x(ubuntu|debian) && "x${PDI_LIBS}" = "xprovided" ]] && CMAKE_FLAGS="${CMAKE_FLAGS} -DBUILD_NETCDF_PARALLEL=OFF" +if [[ -n "${PDI_PLUGIN_PATH}" ]] +then + CMAKE_FLAGS="${CMAKE_FLAGS} -DINSTALL_PDIPLUGINDIR=${PDI_PLUGIN_PATH}" +fi + +if [[ "x${PDI_LIBS}" = "xprovided" ]] +then + CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_DEFAULT=SYSTEM" +else + CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_DEFAULT=EMBEDDED" +fi + + -# ----------------------- -# Workarounds for Debian/Ubuntu -# ----------------------- +# Various workarounds NC_VERSION_MAJOR="$(nc-config --version | sed 's/^[a-zA-Z ]*\([0-9]*\)\.\([0-9]*\).*$/\1/')" NC_VERSION_MINOR="$(nc-config --version | sed 's/^[a-zA-Z ]*\([0-9]*\)\.\([0-9]*\).*$/\2/')" +if (( NC_VERSION_MAJOR > 4 || ( NC_VERSION_MAJOR == 4 && NC_VERSION_MINOR > 8 ) )) || [[ "x${PDI_LIBS}" != "xprovided" ]] +then + #TODO: NetCDF error https://gitlab.maisondelasimulation.fr/pdidev/pdi/-/issues/433 + EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}test_05_C" +fi -if (( NC_VERSION_MAJOR > 4 || ( NC_VERSION_MAJOR == 4 && NC_VERSION_MINOR > 8 ) )) || [[ "x${PDI_LIBS}" != "xprovided" ]]; then - EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}test_05_C" +if [[ "x${PDI_SYSTEM}" =~ ^x(ubuntu|debian) && "x${PDI_MPI}" = "xmpich" ]] +then + #Workaround: mpi4py in debuntu is packaged for openmpi only + EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}PDI_example_trace_P|PDI_example_decl_hdf5_P" fi -if [[ "x${PDI_SYSTEM}" =~ ^x(ubuntu|debian) && "x${PDI_MPI}" = "xmpich" ]]; then - EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}PDI_example_trace_P|PDI_example_decl_hdf5_P" +if [[ "x${PDI_SYSTEM}" =~ ^xubuntu && "x${PDI_MPI}" = "xmpich" ]] && dpkg -s mpich | grep -q 4.2.0-5 +then + #Workaround: mpich is broken in ubuntu noble and launches independent processes + #Due to https://bugs.launchpad.net/ubuntu/+source/mpich/+bug/2072338 + EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}mpi|decl_hdf5_02_F|decl_hdf5_03_F|decl_hdf5_04_F|PDI_example" fi -if [[ "x${PDI_SYSTEM}" =~ ^xubuntu && "x${PDI_MPI}" = "xmpich" ]] && dpkg -s mpich | grep -q 4.2.0-5; then - EXCLUDED_PDI_TESTS="${EXCLUDED_PDI_TESTS:+$EXCLUDED_PDI_TESTS|}mpi|decl_hdf5_02_F|decl_hdf5_03_F|decl_hdf5_04_F|PDI_example" +if [[ "x${PDI_SYSTEM}" =~ ^x(ubuntu|debian) && "x${PDI_LIBS}" = "xprovided" ]] +then + #Workaround: parallel NetCDF detection broken in debuntu (and absent in mpich case) + CMAKE_FLAGS="${CMAKE_FLAGS} -DBUILD_NETCDF_PARALLEL=OFF" fi -if [[ "x${PDI_SYSTEM}" =~ ^x(ubuntu|debian) && "x${PDI_LIBS}" = "xprovided" ]]; then - CMAKE_FLAGS="${CMAKE_FLAGS} -DBUILD_NETCDF_PARALLEL=OFF" +if [[ "x${PDI_SYSTEM}" =~ ^xmacos ]] +then + #Workaround: not all plugins work on OSX yet (https://github.com/pdidev/pdi/issues/580) + CMAKE_FLAGS="${CMAKE_FLAGS} \ +-DBUILD_BENCHMARKING=OFF \ +-DBUILD_DECL_HDF5_PLUGIN=ON \ +-DBUILD_DECL_NETCDF_PLUGIN=OFF \ +-DBUILD_DEISA_PLUGIN=OFF \ +-DBUILD_DOCUMENTATION=OFF \ +-DBUILD_HDF5_PARALLEL=ON \ +-DBUILD_FORTRAN=OFF \ +-DBUILD_PYTHON=OFF \ +-DBUILD_MPI_PLUGIN=ON \ +-DBUILD_NETCDF_PARALLEL=ON \ +-DBUILD_PYCALL_PLUGIN=OFF \ +-DBUILD_SERIALIZE_PLUGIN=ON \ +-DBUILD_SET_VALUE_PLUGIN=ON \ +-DBUILD_TESTING=ON \ +-DBUILD_TRACE_PLUGIN=ON \ +-DBUILD_USER_CODE_PLUGIN=ON" fi -# ----------------------- -# Configure, build & run tests -# ----------------------- -# Run tests with PDI -cd "${TEST_DIR}/with_pdi" -cmake -DBUILD_BENCHMARKING=OFF -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" + +# Configure, build & test for pdi, including example and test_api + +cd "${TEST_DIR_WITH_PDI}" +cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" make ${MAKEFLAGS} -CTEST_FILE="${TEST_DIR}/test_results/tests_1.xml" -ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} +ctest --output-on-failure --timeout 90 --output-junit /tmp/tests_pdi.xml ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} + +# Configure, build & test for pdi's example with CMAKE_PREFIX_PATH (find_package) for no-pdi, only with Paraconf -# Run tests without PDI if provided if [[ "x${PDI_LIBS}" = "xprovided" ]]; then - cd "${TEST_DIR}/no_pdi" - cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/example" - make ${MAKEFLAGS} - CTEST_FILE="${TEST_DIR}/test_results/tests_2.xml" - ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" -R PDI_example_trace_C -E ${EXCLUDED_PDI_TESTS} + + cd "${TEST_DIR_NO_PDI}" + cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/example" + make ${MAKEFLAGS} + ctest --output-on-failure --timeout 90 --output-junit /tmp/tests_no-pdi_example.xml -R PDI_example_trace_C fi -# API tests -cd "${TEST_DIR}/api" +# Configure, build & test for pdi's API specific tests with CMAKE_PREFIX_PATH (find_package) for no-pdi, with or without Paraconf + +cd "${TEST_DIR_API}" cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/test_api" make ${MAKEFLAGS} -CTEST_FILE="${TEST_DIR}/test_results/tests_3.xml" -ctest --output-on-failure --timeout 90 --output-junit "$CTEST_FILE" -E ${EXCLUDED_PDI_TESTS} - -echo ">>> Listing test results:" -find "${TEST_DIR}/test_results" -type f +ctest --output-on-failure --timeout 90 --output-junit /tmp/tests_no-pdi_api.xml From 5a743f0d8abcc737344ff43c402bb68fb9ceadca Mon Sep 17 00:00:00 2001 From: Julian Auriac Date: Mon, 3 Nov 2025 16:24:52 +0100 Subject: [PATCH 372/372] Ready for PR, cleaning --- .github/actions/test/action.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 96772819c..b76563db9 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -38,14 +38,12 @@ runs: steps: - id: test shell: bash - run: | + run: | # not using ' export CTEST_FLAGS="--output-junit /tmp/tests.xml" ' anymore because of paths appending error for ubuntu/focal, for multiples junit output files cat<<-'EOF' > run.sh set -xe JOBID="$(echo "${{github.run_id}}"|md5sum|cut -b 1)" if [[ "01234567" == *"${JOBID}"* ]]; then export PDI_PLUGIN_PATH=/tmp/pdi_plugins; fi export MAKEFLAGS='-j 4' - export CTEST_FLAGS="--output-junit /tmp/tests.xml" - export CTEST_OUTPUT_JUNIT="/tmp/tests.xml" export TEST_DIR="/tmp_dir_test" /src/bin/build_and_run_all_tests EOF