Skip to content
Snippets Groups Projects
Commit 59bcc092 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

Merge branch 'test-laws' into 'master'

Add meson option for scheduling strategy and according CI jobs

See merge request i4/manycore/emper!53
parents def6885c 0b360982
No related branches found
No related tags found
1 merge request!53Add meson option for scheduling strategy and according CI jobs
Pipeline #54453 passed
...@@ -50,6 +50,14 @@ variables: ...@@ -50,6 +50,14 @@ variables:
CC: clang CC: clang
CXX: clang++ CXX: clang++
.emper-ws-scheduling:
variables:
EMPER_DEFAULT_SCHEDULING_STRATEGY: "work_stealing"
.emper-laws-scheduling:
variables:
EMPER_DEFAULT_SCHEDULING_STRATEGY: "locality_aware_work_stealing"
.emper-worker-no-sleep: .emper-worker-no-sleep:
variables: variables:
EMPER_WORKER_SLEEP: 'false' EMPER_WORKER_SLEEP: 'false'
...@@ -157,3 +165,13 @@ test-clang-sanitizer-undefined: ...@@ -157,3 +165,13 @@ test-clang-sanitizer-undefined:
# - .test # - .test
# - .clang # - .clang
# - .sanitizer-address # - .sanitizer-address
test-laws:
extends:
- .test
- .emper-laws-scheduling
test-laws-release:
extends:
- test-laws
- .release-build
...@@ -23,7 +23,14 @@ ...@@ -23,7 +23,14 @@
#include "RuntimeStrategyStats.hpp" // for RuntimeStrategyStats #include "RuntimeStrategyStats.hpp" // for RuntimeStrategyStats
#include "emper-config.h" // IWYU pragma: keep #include "emper-config.h" // IWYU pragma: keep
#include "lib/DebugUtil.hpp" #include "lib/DebugUtil.hpp"
#ifdef EMPER_DEFAULT_SCHEDULING_STRATEGY_WORK_STEALING
#include "strategies/ws/WsStrategy.hpp" // for WsStrategy, WsStrategy::INST... #include "strategies/ws/WsStrategy.hpp" // for WsStrategy, WsStrategy::INST...
#elif defined EMPER_DEFAULT_SCHEDULING_STRATEGY_LOCALITY_AWARE_WORK_STEALING
#include "strategies/laws/LawsStrategy.hpp"
#else
#error "Unknown default scheduling strategy"
#endif
#ifdef EMPER_LIBURCU #ifdef EMPER_LIBURCU
#include <urcu.h> // for rcu_register_thread #include <urcu.h> // for rcu_register_thread
...@@ -38,7 +45,16 @@ ...@@ -38,7 +45,16 @@
std::mutex Runtime::currentRuntimeMutex; std::mutex Runtime::currentRuntimeMutex;
Runtime* Runtime::currentRuntime; Runtime* Runtime::currentRuntime;
RuntimeStrategy& Runtime::DEFAULT_STRATEGY = WsStrategy::INSTANCE;
RuntimeStrategy& Runtime::DEFAULT_STRATEGY =
#ifdef EMPER_DEFAULT_SCHEDULING_STRATEGY_WORK_STEALING
WsStrategy::INSTANCE
#elif defined EMPER_DEFAULT_SCHEDULING_STRATEGY_LOCALITY_AWARE_WORK_STEALING
LawsStrategy::INSTANCE
#else
#error "Unknown default scheduling strategy"
#endif
;
Runtime::Runtime(workerid_t workerCount, RuntimeStrategy& strategy, unsigned int seed) Runtime::Runtime(workerid_t workerCount, RuntimeStrategy& strategy, unsigned int seed)
: workerCount(workerCount), : workerCount(workerCount),
......
...@@ -31,6 +31,9 @@ conf_data.set('EMPER_OVERFLOW_QUEUE', get_option('overflow_queue')) ...@@ -31,6 +31,9 @@ conf_data.set('EMPER_OVERFLOW_QUEUE', get_option('overflow_queue'))
conf_data.set('EMPER_LOCKED_MPSC_QUEUE', get_option('locked_mpsc_queue')) conf_data.set('EMPER_LOCKED_MPSC_QUEUE', get_option('locked_mpsc_queue'))
conf_data.set('EMPER_STATS', get_option('stats')) conf_data.set('EMPER_STATS', get_option('stats'))
default_scheduling_strategy = get_option('default_scheduling_strategy')
conf_data.set('EMPER_DEFAULT_SCHEDULING_STRATEGY_' + default_scheduling_strategy.to_upper(), true)
log_level = get_option('log_level') log_level = get_option('log_level')
if log_level == 'automatic' if log_level == 'automatic'
# output only error messages in release builds # output only error messages in release builds
......
...@@ -40,3 +40,12 @@ option( ...@@ -40,3 +40,12 @@ option(
value: false, value: false,
description: 'Collect stats and print them at the end of the execution' description: 'Collect stats and print them at the end of the execution'
) )
option(
'default_scheduling_strategy',
type: 'combo',
choices: [
'work_stealing',
'locality_aware_work_stealing',
],
value: 'work_stealing',
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment