diff --git a/src/engine_maketasks.c b/src/engine_maketasks.c index d1858f87ff0bfdfee878f2e53b81e100812fd0a5..5339e2c582b9598818c25ce57bdbda363bff5972 100644 --- a/src/engine_maketasks.c +++ b/src/engine_maketasks.c @@ -2044,6 +2044,7 @@ void engine_make_hydroloop_tasks_mapper(void *map_data, int num_elements, struct engine *e = (struct engine *)extra_data; const int periodic = e->s->periodic; const int with_feedback = (e->policy & engine_policy_feedback); + const int with_stars = (e->policy & engine_policy_stars); struct space *s = e->s; struct scheduler *sched = &e->sched; @@ -2066,7 +2067,7 @@ void engine_make_hydroloop_tasks_mapper(void *map_data, int num_elements, struct cell *ci = &cells[cid]; /* Skip cells without hydro or star particles */ - if ((ci->hydro.count == 0) && (!with_feedback || ci->stars.count == 0)) + if ((ci->hydro.count == 0) && (!with_stars || ci->stars.count == 0)) continue; /* If the cell is local build a self-interaction */ diff --git a/src/scheduler.c b/src/scheduler.c index 729b566e3be7d20bc5a73fc1692b0911885b0efe..f7fbd578a40d76e750a6a47c5f8268a27c5436b2 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -545,6 +545,7 @@ static void scheduler_splittask_hydro(struct task *t, struct scheduler *s) { /* Note this is not very clean as the scheduler should not really access the engine... */ const int with_feedback = (s->space->e->policy & engine_policy_feedback); + const int with_stars = (s->space->e->policy & engine_policy_stars); /* Iterate on this task until we're done with it. */ int redo = 1; @@ -556,7 +557,7 @@ static void scheduler_splittask_hydro(struct task *t, struct scheduler *s) { /* Is this a non-empty self-task? */ const int is_self = (t->type == task_type_self) && (t->ci != NULL) && - ((t->ci->hydro.count > 0) || (with_feedback && t->ci->stars.count > 0)); + ((t->ci->hydro.count > 0) || (with_stars && t->ci->stars.count > 0)); /* Is this a non-empty pair-task? */ const int is_pair =