From d416b0e3a1c70a8038211daede4ca79c13c78cb6 Mon Sep 17 00:00:00 2001 From: Pierre Marchand Date: Fri, 6 Feb 2026 15:12:35 +0100 Subject: [PATCH] fix execution policy api --- .github/workflows/CI.yml | 5 ++-- CHANGELOG.md | 1 + include/htool/hmatrix/execution_policies.hpp | 5 ++-- .../functional_tests/geometry/CMakeLists.txt | 8 ----- .../geometry/test_geometry_file.cpp | 29 ------------------- tests/functional_tests/solvers/CMakeLists.txt | 4 +-- 6 files changed, 9 insertions(+), 43 deletions(-) delete mode 100755 tests/functional_tests/geometry/CMakeLists.txt delete mode 100644 tests/functional_tests/geometry/test_geometry_file.cpp diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 18c4d945..e01913e3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -155,8 +155,9 @@ jobs: - name: Run tests run: | cd htool/build - export OMP_NUM_THREADS=2 - ${{ matrix.ASAN_OPTIONS }} ctest -j 4 --output-on-failure + # export OMP_NUM_THREADS=2 + ${{ matrix.ASAN_OPTIONS }} ctest -j 4 -LE "mpi" --output-on-failure + ${{ matrix.ASAN_OPTIONS }} ctest -L "mpi" --output-on-failure - name: Build examples run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index b343e3bc..f7679318 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ All notable changes to this project will be documented in this file. ### Fixed +- Fix execution header include, PR #77 - Fix wrong ordering of eigenvalues in solve_EVP_3 in some specific cases, PR #76 ## [1.0.1] - 2026-01-02 diff --git a/include/htool/hmatrix/execution_policies.hpp b/include/htool/hmatrix/execution_policies.hpp index 41ee4979..c2f7fd57 100644 --- a/include/htool/hmatrix/execution_policies.hpp +++ b/include/htool/hmatrix/execution_policies.hpp @@ -3,9 +3,10 @@ #include "hmatrix.hpp" #include - -#if defined(__cpp_lib_execution) && __cplusplus >= 201703L +#if __has_include() # include +#endif +#if defined(__cpp_lib_execution) && __cplusplus >= 201703L namespace exec_compat { using parallel_policy = std::execution::parallel_policy; inline constexpr auto par = std::execution::par; diff --git a/tests/functional_tests/geometry/CMakeLists.txt b/tests/functional_tests/geometry/CMakeLists.txt deleted file mode 100755 index bca57fd3..00000000 --- a/tests/functional_tests/geometry/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -#=============================================================================# -#=========================== Executables =====================================# -#=============================================================================# - -add_executable(Test_geometry_file test_geometry_file.cpp) -target_link_libraries(Test_geometry_file htool) -add_dependencies(build-tests Test_geometry_file) -add_test(NAME Test_geometry_file COMMAND Test_geometry_file ${CMAKE_SOURCE_DIR}/data/data_test/gmsh_test.msh) diff --git a/tests/functional_tests/geometry/test_geometry_file.cpp b/tests/functional_tests/geometry/test_geometry_file.cpp deleted file mode 100644 index b5e55cb0..00000000 --- a/tests/functional_tests/geometry/test_geometry_file.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -#include -#include -using namespace std; -using namespace htool; - -int main(int argc, char const *argv[]) { - - // Input file - if (argc != 2) { // argc should be 2 for correct execution - // We print argv[0] assuming it is the program name - cout << "usage: " << argv[0] << " \n"; - return 1; - } - - bool test = 0; - std::vector points; - std::vector r; - - test = test || (Load_GMSH_nodes(points, argv[1])); - test = test || !(norm2(points[0] - R3{1, 0, 0}) < 1e-16); - test = test || !(norm2(points[1] - R3{0, 1, 0}) < 1e-16); - test = test || !(norm2(points[2] - R3{-1, 0, 0}) < 1e-16); - test = test || !(norm2(points[3] - R3{0, -1, 0}) < 1e-16); - - cout << test << endl; - return test; -} diff --git a/tests/functional_tests/solvers/CMakeLists.txt b/tests/functional_tests/solvers/CMakeLists.txt index 2e15efd3..bd8d083c 100644 --- a/tests/functional_tests/solvers/CMakeLists.txt +++ b/tests/functional_tests/solvers/CMakeLists.txt @@ -29,9 +29,9 @@ set_tests_properties(Test_solver_double_1 PROPERTIES LABELS "mpi") add_test(NAME Test_solver_double_2 COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS} ${CMAKE_CURRENT_BINARY_DIR}/Test_solver_double ${Test_solver_ARGS}) set_tests_properties(Test_solver_double_2 PROPERTIES LABELS "mpi") add_test(NAME Test_solver_double_3 COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 3 ${MPIEXEC_PREFLAGS} ${CMAKE_CURRENT_BINARY_DIR}/Test_solver_double ${Test_solver_ARGS}) -set_tests_properties(Test_solver_double_3 PROPERTIES LABELS "mpi") +set_tests_properties(Test_solver_double_3 PROPERTIES LABELS "mpi" TIMEOUT 3000) add_test(NAME Test_solver_double_4 COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ${MPIEXEC_PREFLAGS} ${CMAKE_CURRENT_BINARY_DIR}/Test_solver_double ${Test_solver_ARGS}) -set_tests_properties(Test_solver_double_4 PROPERTIES LABELS "mpi") +set_tests_properties(Test_solver_double_4 PROPERTIES LABELS "mpi" TIMEOUT 3000) add_test(NAME Test_solver_complex_double_1 COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 1 ${MPIEXEC_PREFLAGS} ${CMAKE_CURRENT_BINARY_DIR}/Test_solver_complex_double ${Test_solver_ARGS}) set_tests_properties(Test_solver_complex_double_1 PROPERTIES LABELS "mpi")