diff --git a/src/engine_maketasks.c b/src/engine_maketasks.c index 49cccb21adf09b12bebd431389893df0695a066c..8e095acde2ac15c25d664ef105e4d43968b3ec5b 100644 --- a/src/engine_maketasks.c +++ b/src/engine_maketasks.c @@ -807,11 +807,6 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) { if (with_star_formation && c->hydro.count > 0) { scheduler_addunlock(s, c->kick2, c->top->hydro.star_formation); scheduler_addunlock(s, c->top->hydro.star_formation, c->timestep); - - c->hydro.stars_resort = scheduler_addtask( - s, task_type_stars_resort, task_subtype_none, 0, 0, c, NULL); - scheduler_addunlock(s, c->top->hydro.star_formation, - c->hydro.stars_resort); } /* Time-step limiting */ @@ -1080,8 +1075,13 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c) { scheduler_addunlock(s, c->stars.stars_out, c->super->timestep); if (with_star_formation && c->hydro.count > 0) { - scheduler_addunlock(s, c->super->hydro.stars_resort, - c->stars.stars_in); + + c->hydro.stars_resort = scheduler_addtask( + s, task_type_stars_resort, task_subtype_none, 0, 0, c, NULL); + scheduler_addunlock(s, c->top->hydro.star_formation, + c->hydro.stars_resort); + + scheduler_addunlock(s, c->hydro.stars_resort, c->stars.stars_in); } }