From 003d5849dc0d9cdf8974db1099f5c2e3b806f660 Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Mon, 25 Nov 2024 10:25:39 -0600 Subject: [PATCH 1/2] Accommodate for CircleCI reduce available number of cores to two --- .circleci/config.yml | 3 ++- .../compute_local/tests/regressions/parallel_fill_4132.cpp | 2 +- libs/core/concurrency/tests/unit/contiguous_index_queue.cpp | 6 ++++-- .../concurrency/tests/unit/non_contiguous_index_queue.cpp | 4 ++-- .../regressions/future_hang_on_wait_with_callback_629.cpp | 4 ++-- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a16f9e14a814..b55732074951 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -249,7 +249,8 @@ jobs: -DCMAKE_EXPORT_COMPILE_COMMANDS=On \ -DHPX_WITH_DOCUMENTATION=On \ -DHPX_WITH_DOCUMENTATION_OUTPUT_FORMATS="${DOCUMENTATION_OUTPUT_FORMATS}" \ - -DHPX_WITH_TESTS_COMMAND_LINE=--hpx:queuing=local-workrequesting-fifo + -DHPX_WITH_TESTS_COMMAND_LINE=--hpx:queuing=local-workrequesting-fifo \ + -DHPX_WITH_TESTS_MAX_THREADS_PER_LOCALITY=2 - persist_to_workspace: root: /hpx paths: diff --git a/libs/core/compute_local/tests/regressions/parallel_fill_4132.cpp b/libs/core/compute_local/tests/regressions/parallel_fill_4132.cpp index 215d1332201d..69eb1ddd74cf 100644 --- a/libs/core/compute_local/tests/regressions/parallel_fill_4132.cpp +++ b/libs/core/compute_local/tests/regressions/parallel_fill_4132.cpp @@ -17,7 +17,7 @@ int hpx_main() { std::size_t const max_targets = - (std::min)(hpx::get_num_worker_threads(), std::size_t(10)); + (std::min)(2 * hpx::get_num_worker_threads(), std::size_t(10)); ; auto targets = hpx::compute::host::get_local_targets(); diff --git a/libs/core/concurrency/tests/unit/contiguous_index_queue.cpp b/libs/core/concurrency/tests/unit/contiguous_index_queue.cpp index 3bda97b432e5..5e44a4a44937 100644 --- a/libs/core/concurrency/tests/unit/contiguous_index_queue.cpp +++ b/libs/core/concurrency/tests/unit/contiguous_index_queue.cpp @@ -143,9 +143,11 @@ void test_concurrent(pop_mode m) std::uint32_t last = 732100; hpx::concurrency::detail::contiguous_index_queue<> q{first, last}; - std::size_t const num_threads = hpx::get_num_worker_threads(); + std::size_t const num_threads = 2 * hpx::get_num_worker_threads(); + // This test should be run on at least two worker threads. - HPX_TEST_LTE(std::size_t(2), num_threads); + HPX_TEST_LTE(std::size_t(4), num_threads); + std::vector> fs; std::vector> popped_indices(num_threads); fs.reserve(num_threads); diff --git a/libs/core/concurrency/tests/unit/non_contiguous_index_queue.cpp b/libs/core/concurrency/tests/unit/non_contiguous_index_queue.cpp index 0f3280bca64e..0566c5516129 100644 --- a/libs/core/concurrency/tests/unit/non_contiguous_index_queue.cpp +++ b/libs/core/concurrency/tests/unit/non_contiguous_index_queue.cpp @@ -153,10 +153,10 @@ void test_concurrent(pop_mode m) std::uint32_t step = 7; hpx::concurrency::detail::non_contiguous_index_queue<> q{first, last, step}; - std::size_t const num_threads = hpx::get_num_worker_threads(); + std::size_t const num_threads = 2 * hpx::get_num_worker_threads(); // This test should be run on at least two worker threads. - HPX_TEST_LTE(std::size_t(2), num_threads); + HPX_TEST_LTE(std::size_t(4), num_threads); std::vector> fs; std::vector> popped_indices(num_threads); diff --git a/libs/full/async_distributed/tests/regressions/future_hang_on_wait_with_callback_629.cpp b/libs/full/async_distributed/tests/regressions/future_hang_on_wait_with_callback_629.cpp index ca6605e31ef2..d593b97cb2d2 100644 --- a/libs/full/async_distributed/tests/regressions/future_hang_on_wait_with_callback_629.cpp +++ b/libs/full/async_distributed/tests/regressions/future_hang_on_wait_with_callback_629.cpp @@ -159,7 +159,7 @@ int main(int argc, char* argv[]) // clang-format off cmdline.add_options() ("test-runs" - , value()->default_value(1000) + , value()->default_value(100) , "number of times to repeat the test (0 == infinite)") ("verbose" @@ -174,7 +174,7 @@ int main(int argc, char* argv[]) , "depth of the tree structure") ("delay-iterations" - , value()->default_value(1000) + , value()->default_value(100) , "number of iterations in the delay loop"); // clang-format on From d905f4bb0065b4f2dfb327a0f15930dc2f8af2e0 Mon Sep 17 00:00:00 2001 From: Pansysk75 Date: Thu, 12 Dec 2024 09:46:32 -0600 Subject: [PATCH 2/2] Fix unbound variable on CI --- .jenkins/lsu/env-clang-17.sh | 2 +- .jenkins/lsu/env-gcc-13.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.jenkins/lsu/env-clang-17.sh b/.jenkins/lsu/env-clang-17.sh index ac4ab8e51d97..07db8d953f99 100644 --- a/.jenkins/lsu/env-clang-17.sh +++ b/.jenkins/lsu/env-clang-17.sh @@ -15,7 +15,7 @@ module load openmpi export HPXRUN_RUNWRAPPER=srun export CXX_STD="20" export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH -export CXXFLAGS="-fopenmp -Wno-pass-failed ${CXXFLAGS}" +export CXXFLAGS="-fopenmp -Wno-pass-failed ${CXXFLAGS:-}" configure_extra_options+=" -DCMAKE_BUILD_TYPE=${build_type}" configure_extra_options+=" -DHPX_WITH_CXX_STANDARD=${CXX_STD}" diff --git a/.jenkins/lsu/env-gcc-13.sh b/.jenkins/lsu/env-gcc-13.sh index 42a783a8d212..160b7aa9b8ee 100644 --- a/.jenkins/lsu/env-gcc-13.sh +++ b/.jenkins/lsu/env-gcc-13.sh @@ -15,7 +15,7 @@ module load openmpi export HPXRUN_RUNWRAPPER=srun export CXX_STD="20" export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH -export CXXFLAGS="-fopenmp ${CXXFLAGS}" +export CXXFLAGS="-fopenmp ${CXXFLAGS:-}" configure_extra_options+=" -DHPX_WITH_CXX_STANDARD=${CXX_STD}" configure_extra_options+=" -DHPX_WITH_MALLOC=system"