From 2e610e7a251bdf6955a85ee5ef9df03994e343c3 Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Wed, 31 Jan 2024 10:48:58 -0600 Subject: [PATCH] Enable testing of new scheduler in CI - flyby: fixing buffer allocation --- .jenkins/lsu/env-clang-12.sh | 1 + .jenkins/lsu/env-gcc-10.sh | 1 + .../include/hpx/schedulers/local_workrequesting_scheduler.hpp | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.jenkins/lsu/env-clang-12.sh b/.jenkins/lsu/env-clang-12.sh index c9b5e4a5ee10..4c24999ca78d 100644 --- a/.jenkins/lsu/env-clang-12.sh +++ b/.jenkins/lsu/env-clang-12.sh @@ -37,3 +37,4 @@ configure_extra_options+=" -DHPX_WITH_LOGGING=OFF" configure_extra_options+=" -DHPX_TOPOLOGY_WITH_ADDITIONAL_HWLOC_TESTING=ON" configure_extra_options+=" -DHPX_COROUTINES_WITH_THREAD_SCHEDULE_HINT_RUNS_AS_CHILD=ON" +configure_extra_options+=" -DHPX_WITH_TESTS_COMMAND_LINE=--hpx:queuing=local-workrequesting-mc" diff --git a/.jenkins/lsu/env-gcc-10.sh b/.jenkins/lsu/env-gcc-10.sh index 9c4064825a0a..a1fab92d356c 100644 --- a/.jenkins/lsu/env-gcc-10.sh +++ b/.jenkins/lsu/env-gcc-10.sh @@ -32,3 +32,4 @@ configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" # configure_extra_options+=" -DHPX_WITH_POWER_COUNTER=ON" configure_extra_options+=" -DHPX_COROUTINES_WITH_THREAD_SCHEDULE_HINT_RUNS_AS_CHILD=ON" +configure_extra_options+=" -DHPX_WITH_TESTS_COMMAND_LINE=--hpx:queuing=local-workrequesting-mc" diff --git a/libs/core/schedulers/include/hpx/schedulers/local_workrequesting_scheduler.hpp b/libs/core/schedulers/include/hpx/schedulers/local_workrequesting_scheduler.hpp index a740cffde3a6..7e3d283d0f57 100644 --- a/libs/core/schedulers/include/hpx/schedulers/local_workrequesting_scheduler.hpp +++ b/libs/core/schedulers/include/hpx/schedulers/local_workrequesting_scheduler.hpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -875,9 +874,9 @@ namespace hpx::threads::policies { if (max_num_to_steal != 0) { task_data thrds(d.num_thread_); - thrds.tasks_.reserve(max_num_to_steal); #ifdef HPX_HAVE_THREAD_STEALING_COUNTS + thrds.tasks_.reserve(max_num_to_steal); thread_id_ref_type thrd; while (max_num_to_steal-- != 0 && d.queue_->get_next_thread(thrd, false, true)) @@ -887,6 +886,7 @@ namespace hpx::threads::policies { thrd = thread_id_ref_type{}; } #else + thrds.tasks_.resize(max_num_to_steal); d.queue_->get_next_threads( thrds.tasks_.begin(), thrds.tasks_.size(), false, true); #endif