Commit bac1b1dd authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'fix_scheduler_steal_policy' into 'master'

Fix scheduler steal policy

Set `scheduler` steal policy from `engine` policy. 

Solves #347.

See merge request !399
parents 23710c75 a8aedc1f
......@@ -4505,7 +4505,7 @@ void engine_init(struct engine *e, struct space *s,
/* Init the scheduler with enough tasks for the initial sorting tasks. */
const int nr_tasks = 2 * s->tot_cells + 2 * e->nr_threads;
scheduler_init(&e->sched, e->s, nr_tasks, nr_queues, scheduler_flag_steal,
scheduler_init(&e->sched, e->s, nr_tasks, nr_queues, (policy & scheduler_flag_steal),
e->nodeID, &e->threadpool);
/* Allocate and init the threads. */
......
......@@ -52,7 +52,7 @@
/* Flags . */
#define scheduler_flag_none 0
#define scheduler_flag_steal 1
#define scheduler_flag_steal (1 << 1)
/* Data of a scheduler. */
struct scheduler {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment