Commit 9a070281 authored by Jacob Kegerreis's avatar Jacob Kegerreis
Browse files

Revert "Do the same change for the kick1/time-step/kick2 combo"

This reverts commit ca2a471f.
parent e5d4c0d1
...@@ -2657,62 +2657,6 @@ void cell_activate_cooling(struct cell *c, struct scheduler *s, ...@@ -2657,62 +2657,6 @@ void cell_activate_cooling(struct cell *c, struct scheduler *s,
cell_recursively_activate_cooling(c, s, e); cell_recursively_activate_cooling(c, s, e);
} }
/**
* @brief Recursively activate the kick and timestep tasks (and implicit links)
* in a cell hierarchy.
*
* @param c The #cell.
* @param s The #scheduler.
* @param e The #engine.
*/
void cell_recursively_activate_kicks(struct cell *c, struct scheduler *s,
const struct engine *e) {
/* Early abort? */
if ((c->hydro.count == 0) && (c->grav.count == 0) && (c->stars.count == 0) &&
c->black_holes.count == 0)
return;
if (!cell_is_active_hydro(c, e) && !cell_is_active_gravity(c, e) &&
!cell_is_active_stars(c, e) && !cell_is_active_black_holes(c, e))
return;
/* Is the ghost at this level? */
if (c->kick1 != NULL) {
scheduler_activate(s, c->kick1);
scheduler_activate(s, c->kick2);
scheduler_activate(s, c->timestep);
} else {
#ifdef SWIFT_DEBUG_CHECKS
if (!c->split) error("Reached the leaf level without finding a kick task!");
#endif
/* Keep recursing */
for (int k = 0; k < 8; k++)
if (c->progeny[k] != NULL)
cell_recursively_activate_kicks(c->progeny[k], s, e);
}
}
/**
* @brief Activate the kick and time-step tasks (and implicit links) in a cell
* hierarchy.
*
* @param c The #cell.
* @param s The #scheduler.
* @param e The #engine.
*/
void cell_activate_kicks(struct cell *c, struct scheduler *s,
const struct engine *e) {
scheduler_activate(s, c->kick1_in);
scheduler_activate(s, c->kick1_out);
scheduler_activate(s, c->kick2_in);
scheduler_activate(s, c->kick2_out);
scheduler_activate(s, c->timestep_in);
scheduler_activate(s, c->timestep_out);
cell_recursively_activate_kicks(c, s, e);
}
/** /**
* @brief Recurse down in a cell hierarchy until the hydro.super level is * @brief Recurse down in a cell hierarchy until the hydro.super level is
* reached and activate the spart drift at that level. * reached and activate the spart drift at that level.
...@@ -3818,7 +3762,9 @@ int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s) { ...@@ -3818,7 +3762,9 @@ int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s) {
if (c->hydro.extra_ghost != NULL) if (c->hydro.extra_ghost != NULL)
scheduler_activate(s, c->hydro.extra_ghost); scheduler_activate(s, c->hydro.extra_ghost);
if (c->hydro.ghost_in != NULL) cell_activate_hydro_ghosts(c, s, e); if (c->hydro.ghost_in != NULL) cell_activate_hydro_ghosts(c, s, e);
if (c->kick1_in != NULL) cell_activate_kicks(c, s, e); if (c->kick1 != NULL) scheduler_activate(s, c->kick1);
if (c->kick2 != NULL) scheduler_activate(s, c->kick2);
if (c->timestep != NULL) scheduler_activate(s, c->timestep);
if (c->hydro.end_force != NULL) scheduler_activate(s, c->hydro.end_force); if (c->hydro.end_force != NULL) scheduler_activate(s, c->hydro.end_force);
if (c->hydro.cooling_in != NULL) cell_activate_cooling(c, s, e); if (c->hydro.cooling_in != NULL) cell_activate_cooling(c, s, e);
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
...@@ -3970,7 +3916,9 @@ int cell_unskip_gravity_tasks(struct cell *c, struct scheduler *s) { ...@@ -3970,7 +3916,9 @@ int cell_unskip_gravity_tasks(struct cell *c, struct scheduler *s) {
if (c->nodeID == nodeID && cell_is_active_gravity(c, e)) { if (c->nodeID == nodeID && cell_is_active_gravity(c, e)) {
if (c->grav.init != NULL) scheduler_activate(s, c->grav.init); if (c->grav.init != NULL) scheduler_activate(s, c->grav.init);
if (c->grav.init_out != NULL) scheduler_activate(s, c->grav.init_out); if (c->grav.init_out != NULL) scheduler_activate(s, c->grav.init_out);
if (c->kick1_in != NULL) cell_activate_kicks(c, s, e); if (c->kick1 != NULL) scheduler_activate(s, c->kick1);
if (c->kick2 != NULL) scheduler_activate(s, c->kick2);
if (c->timestep != NULL) scheduler_activate(s, c->timestep);
if (c->grav.down != NULL) scheduler_activate(s, c->grav.down); if (c->grav.down != NULL) scheduler_activate(s, c->grav.down);
if (c->grav.down_in != NULL) scheduler_activate(s, c->grav.down_in); if (c->grav.down_in != NULL) scheduler_activate(s, c->grav.down_in);
if (c->grav.mesh != NULL) scheduler_activate(s, c->grav.mesh); if (c->grav.mesh != NULL) scheduler_activate(s, c->grav.mesh);
...@@ -4225,7 +4173,9 @@ int cell_unskip_stars_tasks(struct cell *c, struct scheduler *s, ...@@ -4225,7 +4173,9 @@ int cell_unskip_stars_tasks(struct cell *c, struct scheduler *s,
if (c->stars.ghost != NULL) scheduler_activate(s, c->stars.ghost); if (c->stars.ghost != NULL) scheduler_activate(s, c->stars.ghost);
if (c->stars.stars_in != NULL) scheduler_activate(s, c->stars.stars_in); if (c->stars.stars_in != NULL) scheduler_activate(s, c->stars.stars_in);
if (c->stars.stars_out != NULL) scheduler_activate(s, c->stars.stars_out); if (c->stars.stars_out != NULL) scheduler_activate(s, c->stars.stars_out);
if (c->kick1_in != NULL) cell_activate_kicks(c, s, e); if (c->kick1 != NULL) scheduler_activate(s, c->kick1);
if (c->kick2 != NULL) scheduler_activate(s, c->kick2);
if (c->timestep != NULL) scheduler_activate(s, c->timestep);
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
if (c->logger != NULL) scheduler_activate(s, c->logger); if (c->logger != NULL) scheduler_activate(s, c->logger);
#endif #endif
...@@ -4505,7 +4455,9 @@ int cell_unskip_black_holes_tasks(struct cell *c, struct scheduler *s) { ...@@ -4505,7 +4455,9 @@ int cell_unskip_black_holes_tasks(struct cell *c, struct scheduler *s) {
scheduler_activate(s, c->black_holes.black_holes_in); scheduler_activate(s, c->black_holes.black_holes_in);
if (c->black_holes.black_holes_out != NULL) if (c->black_holes.black_holes_out != NULL)
scheduler_activate(s, c->black_holes.black_holes_out); scheduler_activate(s, c->black_holes.black_holes_out);
if (c->kick1_in != NULL) cell_activate_kicks(c, s, e); if (c->kick1 != NULL) scheduler_activate(s, c->kick1);
if (c->kick2 != NULL) scheduler_activate(s, c->kick2);
if (c->timestep != NULL) scheduler_activate(s, c->timestep);
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
if (c->logger != NULL) scheduler_activate(s, c->logger); if (c->logger != NULL) scheduler_activate(s, c->logger);
#endif #endif
......
...@@ -779,30 +779,12 @@ struct cell { ...@@ -779,30 +779,12 @@ struct cell {
} mpi; } mpi;
#endif #endif
/*! Dependency implicit task for kick1 (in->kick1->out) */
struct task *kick1_in;
/*! Dependency implicit task for kick1 (in->kick1->out) */
struct task *kick1_out;
/*! The first kick task */ /*! The first kick task */
struct task *kick1; struct task *kick1;
/*! Dependency implicit task for kick2 (in->kick2->out) */
struct task *kick2_in;
/*! Dependency implicit task for kick2 (in->kick2->out) */
struct task *kick2_out;
/*! The second kick task */ /*! The second kick task */
struct task *kick2; struct task *kick2;
/*! Dependency implicit task for timestep (in->timestep->out) */
struct task *timestep_in;
/*! Dependency implicit task for timestep (in->timestep->out) */
struct task *timestep_out;
/*! The task to compute time-steps */ /*! The task to compute time-steps */
struct task *timestep; struct task *timestep;
......
...@@ -115,7 +115,6 @@ enum engine_step_properties { ...@@ -115,7 +115,6 @@ enum engine_step_properties {
#define engine_max_parts_per_ghost_default 1000 #define engine_max_parts_per_ghost_default 1000
#define engine_max_sparts_per_ghost_default 1000 #define engine_max_sparts_per_ghost_default 1000
#define engine_max_parts_per_cooling_default 200 #define engine_max_parts_per_cooling_default 200
#define engine_max_parts_per_kick_default 10000
#define engine_star_resort_task_depth_default 2 #define engine_star_resort_task_depth_default 2
#define engine_tasks_per_cell_margin 1.2 #define engine_tasks_per_cell_margin 1.2
#define engine_default_stf_subdir_per_output "." #define engine_default_stf_subdir_per_output "."
......
...@@ -57,7 +57,6 @@ extern int engine_max_parts_per_ghost; ...@@ -57,7 +57,6 @@ extern int engine_max_parts_per_ghost;
extern int engine_max_sparts_per_ghost; extern int engine_max_sparts_per_ghost;
extern int engine_star_resort_task_depth; extern int engine_star_resort_task_depth;
extern int engine_max_parts_per_cooling; extern int engine_max_parts_per_cooling;
extern int engine_max_parts_per_kick;
/** /**
* @brief Add send tasks for the gravity pairs to a hierarchy of cells. * @brief Add send tasks for the gravity pairs to a hierarchy of cells.
...@@ -107,7 +106,7 @@ void engine_addtasks_send_gravity(struct engine *e, struct cell *ci, ...@@ -107,7 +106,7 @@ void engine_addtasks_send_gravity(struct engine *e, struct cell *ci,
/* Drift before you send */ /* Drift before you send */
scheduler_addunlock(s, ci->grav.super->grav.drift, t_grav); scheduler_addunlock(s, ci->grav.super->grav.drift, t_grav);
scheduler_addunlock(s, ci->super->timestep_out, t_ti); scheduler_addunlock(s, ci->super->timestep, t_ti);
} }
/* Add them to the local cell. */ /* Add them to the local cell. */
...@@ -220,9 +219,8 @@ void engine_addtasks_send_hydro(struct engine *e, struct cell *ci, ...@@ -220,9 +219,8 @@ void engine_addtasks_send_hydro(struct engine *e, struct cell *ci,
/* Drift before you send */ /* Drift before you send */
scheduler_addunlock(s, ci->hydro.super->hydro.drift, t_xv); scheduler_addunlock(s, ci->hydro.super->hydro.drift, t_xv);
scheduler_addunlock(s, ci->super->timestep_out, t_ti); scheduler_addunlock(s, ci->super->timestep, t_ti);
if (with_limiter) if (with_limiter) scheduler_addunlock(s, ci->super->timestep, t_limiter);
scheduler_addunlock(s, ci->super->timestep_out, t_limiter);
} }
/* Add them to the local cell. */ /* Add them to the local cell. */
...@@ -317,7 +315,7 @@ void engine_addtasks_send_stars(struct engine *e, struct cell *ci, ...@@ -317,7 +315,7 @@ void engine_addtasks_send_stars(struct engine *e, struct cell *ci,
/* Drift before you send */ /* Drift before you send */
scheduler_addunlock(s, ci->hydro.super->stars.drift, t_feedback); scheduler_addunlock(s, ci->hydro.super->stars.drift, t_feedback);
scheduler_addunlock(s, ci->super->timestep_out, t_ti); scheduler_addunlock(s, ci->super->timestep, t_ti);
} }
engine_addlink(e, &ci->mpi.send, t_feedback); engine_addlink(e, &ci->mpi.send, t_feedback);
...@@ -424,7 +422,7 @@ void engine_addtasks_send_black_holes(struct engine *e, struct cell *ci, ...@@ -424,7 +422,7 @@ void engine_addtasks_send_black_holes(struct engine *e, struct cell *ci,
scheduler_addunlock(s, t_gas_swallow, scheduler_addunlock(s, t_gas_swallow,
ci->hydro.super->black_holes.swallow_ghost[1]); ci->hydro.super->black_holes.swallow_ghost[1]);
scheduler_addunlock(s, ci->super->timestep_out, t_ti); scheduler_addunlock(s, ci->super->timestep, t_ti);
} }
engine_addlink(e, &ci->mpi.send, t_rho); engine_addlink(e, &ci->mpi.send, t_rho);
...@@ -815,48 +813,6 @@ void engine_addtasks_recv_gravity(struct engine *e, struct cell *c, ...@@ -815,48 +813,6 @@ void engine_addtasks_recv_gravity(struct engine *e, struct cell *c,
#endif #endif
} }
/**
* @brief Recursively add non-implicit kick and time-step tasks to a cell
* hierarchy.
*/
void engine_add_kicks(struct engine *e, struct cell *c, struct task *kick1_in,
struct task *kick1_out, struct task *kick2_in,
struct task *kick2_out, struct task *timestep_in,
struct task *timestep_out) {
/* Abort as there are no hydro particles here? */
if (c->hydro.count_total == 0 && c->grav.count_total == 0) return;
/* If we have reached the leaf OR have to few particles to play with*/
if (!c->split ||
c->hydro.count_total + c->grav.count_total < engine_max_parts_per_kick) {
/* Add the cooling task and its dependencies */
struct scheduler *s = &e->sched;
c->kick1 =
scheduler_addtask(s, task_type_kick1, task_subtype_none, 0, 0, c, NULL);
scheduler_addunlock(s, kick1_in, c->kick1);
scheduler_addunlock(s, c->kick1, kick1_out);
c->kick2 =
scheduler_addtask(s, task_type_kick2, task_subtype_none, 0, 0, c, NULL);
scheduler_addunlock(s, kick2_in, c->kick2);
scheduler_addunlock(s, c->kick2, kick2_out);
c->timestep = scheduler_addtask(s, task_type_timestep, task_subtype_none, 0,
0, c, NULL);
scheduler_addunlock(s, timestep_in, c->timestep);
scheduler_addunlock(s, c->timestep, timestep_out);
} else {
/* Keep recursing */
for (int k = 0; k < 8; k++)
if (c->progeny[k] != NULL)
engine_add_kicks(e, c->progeny[k], kick1_in, kick1_out, kick2_in,
kick2_out, timestep_in, timestep_out);
}
}
/** /**
* @brief Generate the hydro hierarchical tasks for a hierarchy of cells - * @brief Generate the hydro hierarchical tasks for a hierarchy of cells -
* i.e. all the O(Npart) tasks -- timestep version * i.e. all the O(Npart) tasks -- timestep version
...@@ -895,37 +851,13 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) { ...@@ -895,37 +851,13 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) {
/* Local tasks only... */ /* Local tasks only... */
if (c->nodeID == e->nodeID) { if (c->nodeID == e->nodeID) {
/* Add the two half kicks dependency tasks */ /* Add the two half kicks */
c->kick1_in = c->kick1 = scheduler_addtask(s, task_type_kick1, task_subtype_none, 0, 0,
scheduler_addtask(s, task_type_kick1_in, task_subtype_none, 0, c, NULL);
/*implicit=*/1, c, NULL);
c->kick1_out =
scheduler_addtask(s, task_type_kick1_out, task_subtype_none, 0,
/*implicit=*/1, c, NULL);
c->kick2_in = c->kick2 = scheduler_addtask(s, task_type_kick2, task_subtype_none, 0, 0,
scheduler_addtask(s, task_type_kick2_in, task_subtype_none, 0, c, NULL);
/*implicit=*/1, c, NULL);
c->kick2_out =
scheduler_addtask(s, task_type_kick2_out, task_subtype_none, 0,
/*implicit=*/1, c, NULL);
/* Add the time-step dependency tasks */
c->timestep_in =
scheduler_addtask(s, task_type_timestep_in, task_subtype_none, 0,
/*implicit=*/1, c, NULL);
c->timestep_out =
scheduler_addtask(s, task_type_timestep_out, task_subtype_none, 0,
/*implicit=*/1, c, NULL);
/* Add the real tasks */
engine_add_kicks(e, c, c->kick1_in, c->kick1_out, c->kick2_in,
c->kick2_out, c->timestep_in, c->timestep_out);
/* Add the dependencies */
#if defined(WITH_LOGGER) #if defined(WITH_LOGGER)
struct task *kick2_or_logger; struct task *kick2_or_logger;
if (with_logger) { if (with_logger) {
...@@ -934,23 +866,28 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) { ...@@ -934,23 +866,28 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) {
0, c, NULL); 0, c, NULL);
/* Add the kick2 dependency */ /* Add the kick2 dependency */
scheduler_addunlock(s, c->kick2_out, c->logger); scheduler_addunlock(s, c->kick2, c->logger);
/* Create a variable in order to avoid to many ifdef */ /* Create a variable in order to avoid to many ifdef */
kick2_or_logger = c->logger; kick2_or_logger = c->logger;
} else { } else {
kick2_or_logger = c->kick2_out; kick2_or_logger = c->kick2;
} }
#else #else
struct task *kick2_or_logger = c->kick2_out; struct task *kick2_or_logger = c->kick2;
#endif #endif
scheduler_addunlock(s, kick2_or_logger, c->timestep_in);
scheduler_addunlock(s, c->timestep_out, c->kick1_in); /* Add the time-step calculation task and its dependency */
c->timestep = scheduler_addtask(s, task_type_timestep, task_subtype_none,
0, 0, c, NULL);
scheduler_addunlock(s, kick2_or_logger, c->timestep);
scheduler_addunlock(s, c->timestep, c->kick1);
/* Subgrid tasks: star formation */ /* Subgrid tasks: star formation */
if (with_star_formation && c->hydro.count > 0) { if (with_star_formation && c->hydro.count > 0) {
scheduler_addunlock(s, kick2_or_logger, c->top->hydro.star_formation); scheduler_addunlock(s, kick2_or_logger, c->top->hydro.star_formation);
scheduler_addunlock(s, c->top->hydro.star_formation, c->timestep_in); scheduler_addunlock(s, c->top->hydro.star_formation, c->timestep);
} }
/* Time-step limiter */ /* Time-step limiter */
...@@ -959,8 +896,8 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) { ...@@ -959,8 +896,8 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) {
c->timestep_limiter = scheduler_addtask( c->timestep_limiter = scheduler_addtask(
s, task_type_timestep_limiter, task_subtype_none, 0, 0, c, NULL); s, task_type_timestep_limiter, task_subtype_none, 0, 0, c, NULL);
scheduler_addunlock(s, c->timestep_out, c->timestep_limiter); scheduler_addunlock(s, c->timestep, c->timestep_limiter);
scheduler_addunlock(s, c->timestep_limiter, c->kick1_in); scheduler_addunlock(s, c->timestep_limiter, c->kick1);
} }
/* Time-step synchronization */ /* Time-step synchronization */
...@@ -969,8 +906,8 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) { ...@@ -969,8 +906,8 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) {
c->timestep_sync = scheduler_addtask(s, task_type_timestep_sync, c->timestep_sync = scheduler_addtask(s, task_type_timestep_sync,
task_subtype_none, 0, 0, c, NULL); task_subtype_none, 0, 0, c, NULL);
scheduler_addunlock(s, c->timestep_out, c->timestep_sync); scheduler_addunlock(s, c->timestep, c->timestep_sync);
scheduler_addunlock(s, c->timestep_sync, c->kick1_in); scheduler_addunlock(s, c->timestep_sync, c->kick1);
} }
if (with_timestep_limiter && with_timestep_sync) { if (with_timestep_limiter && with_timestep_sync) {
...@@ -1017,7 +954,7 @@ void engine_make_hierarchical_tasks_gravity(struct engine *e, struct cell *c) { ...@@ -1017,7 +954,7 @@ void engine_make_hierarchical_tasks_gravity(struct engine *e, struct cell *c) {
c->grav.end_force = scheduler_addtask(s, task_type_end_grav_force, c->grav.end_force = scheduler_addtask(s, task_type_end_grav_force,
task_subtype_none, 0, 0, c, NULL); task_subtype_none, 0, 0, c, NULL);
scheduler_addunlock(s, c->grav.end_force, c->super->kick2_in); scheduler_addunlock(s, c->grav.end_force, c->super->kick2);
if (is_self_gravity) { if (is_self_gravity) {
...@@ -1241,14 +1178,14 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c, ...@@ -1241,14 +1178,14 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c,
if (with_stars) { if (with_stars) {
c->stars.drift = scheduler_addtask(s, task_type_drift_spart, c->stars.drift = scheduler_addtask(s, task_type_drift_spart,
task_subtype_none, 0, 0, c, NULL); task_subtype_none, 0, 0, c, NULL);
scheduler_addunlock(s, c->stars.drift, c->super->kick2_in); scheduler_addunlock(s, c->stars.drift, c->super->kick2);
} }
/* Black holes */ /* Black holes */
if (with_black_holes) { if (with_black_holes) {
c->black_holes.drift = scheduler_addtask( c->black_holes.drift = scheduler_addtask(
s, task_type_drift_bpart, task_subtype_none, 0, 0, c, NULL); s, task_type_drift_bpart, task_subtype_none, 0, 0, c, NULL);
scheduler_addunlock(s, c->black_holes.drift, c->super->kick2_in); scheduler_addunlock(s, c->black_holes.drift, c->super->kick2);
} }
/* Subgrid tasks: cooling */ /* Subgrid tasks: cooling */
...@@ -1264,10 +1201,10 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c, ...@@ -1264,10 +1201,10 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c,
engine_add_cooling(e, c, c->hydro.cooling_in, c->hydro.cooling_out); engine_add_cooling(e, c, c->hydro.cooling_in, c->hydro.cooling_out);
scheduler_addunlock(s, c->hydro.end_force, c->hydro.cooling_in); scheduler_addunlock(s, c->hydro.end_force, c->hydro.cooling_in);
scheduler_addunlock(s, c->hydro.cooling_out, c->super->kick2_in); scheduler_addunlock(s, c->hydro.cooling_out, c->super->kick2);
} else { } else {
scheduler_addunlock(s, c->hydro.end_force, c->super->kick2_in); scheduler_addunlock(s, c->hydro.end_force, c->super->kick2);
} }
/* Subgrid tasks: feedback */ /* Subgrid tasks: feedback */
...@@ -1288,12 +1225,12 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c, ...@@ -1288,12 +1225,12 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c,
if (with_logger) { if (with_logger) {
scheduler_addunlock(s, c->super->logger, c->stars.stars_in); scheduler_addunlock(s, c->super->logger, c->stars.stars_in);
} else { } else {
scheduler_addunlock(s, c->super->kick2_out, c->stars.stars_in); scheduler_addunlock(s, c->super->kick2, c->stars.stars_in);
} }
#else #else
scheduler_addunlock(s, c->super->kick2_out, c->stars.stars_in); scheduler_addunlock(s, c->super->kick2, c->stars.stars_in);
#endif #endif
scheduler_addunlock(s, c->stars.stars_out, c->super->timestep_in); scheduler_addunlock(s, c->stars.stars_out, c->super->timestep);
if (with_feedback && with_star_formation && c->hydro.count > 0) { if (with_feedback && with_star_formation && c->hydro.count > 0) {
task_order_addunlock_star_formation_feedback(s, c, star_resort_cell); task_order_addunlock_star_formation_feedback(s, c, star_resort_cell);
...@@ -1326,15 +1263,14 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c, ...@@ -1326,15 +1263,14 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c,
scheduler_addunlock(s, c->super->logger, scheduler_addunlock(s, c->super->logger,
c->black_holes.black_holes_in); c->black_holes.black_holes_in);
} else { } else {
scheduler_addunlock(s, c->super->kick2_out, scheduler_addunlock(s, c->super->kick2,
c->black_holes.black_holes_in); c->black_holes.black_holes_in);
} }
#else #else
scheduler_addunlock(s, c->super->kick2_out, scheduler_addunlock(s, c->super->kick2, c->black_holes.black_holes_in);
c->black_holes.black_holes_in);
#endif #endif
scheduler_addunlock(s, c->black_holes.black_holes_out, scheduler_addunlock(s, c->black_holes.black_holes_out,
c->super->timestep_in); c->super->timestep);
} }
if (with_black_holes && with_feedback) { if (with_black_holes && with_feedback) {
...@@ -2129,9 +2065,9 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, ...@@ -2129,9 +2065,9 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements,
} }
if (with_timestep_limiter) { if (with_timestep_limiter) {
scheduler_addunlock(sched, ci->super->timestep_out, t_limiter); scheduler_addunlock(sched, ci->super->timestep, t_limiter);
scheduler_addunlock(sched, ci->hydro.super->hydro.drift, t_limiter); scheduler_addunlock(sched, ci->hydro.super->hydro.drift, t_limiter);
scheduler_addunlock(sched, t_limiter, ci->super->kick1_in); scheduler_addunlock(sched, t_limiter, ci->super->kick1);
scheduler_addunlock(sched, t_limiter, ci->super->timestep_limiter); scheduler_addunlock(sched, t_limiter, ci->super->timestep_limiter);
} }
...@@ -2330,8 +2266,8 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, ...@@ -2330,8 +2266,8 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements,
if (with_timestep_limiter) { if (with_timestep_limiter) {
scheduler_addunlock(sched, ci->hydro.super->hydro.drift, t_limiter); scheduler_addunlock(sched, ci->hydro.super->hydro.drift, t_limiter);
scheduler_addunlock(sched, ci->super->timestep_out, t_limiter); scheduler_addunlock(sched, ci->super->timestep, t_limiter);
scheduler_addunlock(sched, t_limiter, ci->super->kick1_in); scheduler_addunlock(sched, t_limiter, ci->super->kick1);
scheduler_addunlock(sched, t_limiter, ci->super->timestep_limiter); scheduler_addunlock(sched, t_limiter, ci->super->timestep_limiter);
} }
...@@ -2423,8 +2359,8 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, ...@@ -2423,8 +2359,8 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements,
if (ci->super != cj->super) { if (ci->super != cj->super) {
if (with_timestep_limiter) { if (with_timestep_limiter) {
scheduler_addunlock(sched, cj->super->timestep_out, t_limiter); scheduler_addunlock(sched, cj->super->timestep, t_limiter);
scheduler_addunlock(sched, t_limiter, cj->super->kick1_in); scheduler_addunlock(sched, t_limiter, cj->super->kick1);
scheduler_addunlock(sched, t_limiter, cj->super->timestep_limiter); scheduler_addunlock(sched, t_limiter, cj->super->timestep_limiter);
} }
...@@ -2602,8 +2538,8 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, ...@@ -2602,8 +2538,8 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements,
if (with_timestep_limiter) { if (with_timestep_limiter) {
scheduler_addunlock(sched, ci->hydro.super->hydro.drift, t_limiter); scheduler_addunlock(sched, ci->hydro.super->hydro.drift, t_limiter);
scheduler_addunlock(sched, ci->super->timestep_out, t_limiter); scheduler_addunlock(sched, ci->super->timestep, t_limiter);
scheduler_addunlock(sched, t_limiter, ci->super->kick1_in); scheduler_addunlock(sched, t_limiter, ci->super->kick1);
scheduler_addunlock(sched, t_limiter, ci->super->timestep_limiter); scheduler_addunlock(sched, t_limiter, ci->super->timestep_limiter);
} }
...@@ -2805,8 +2741,8 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, ...@@ -2805,8 +2741,8 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements,
if (with_timestep_limiter) { if (with_timestep_limiter) {