From 9a070281b81e974a53f99fa17992583caff9f0a3 Mon Sep 17 00:00:00 2001 From: Jacob Kegerreis <jacob.kegerreis@durham.ac.uk> Date: Fri, 3 Jul 2020 11:22:45 +0100 Subject: [PATCH] Revert "Do the same change for the kick1/time-step/kick2 combo" This reverts commit ca2a471ffa452516b7c6d50568ff0b6c555f6846. --- src/cell.c | 72 +++----------- src/cell.h | 18 ---- src/engine.h | 1 - src/engine_maketasks.c | 160 +++++++++--------------------- src/engine_marktasks.c | 7 +- src/space.c | 16 +-- src/task.c | 6 -- src/task.h | 6 -- tools/task_plots/analyse_tasks.py | 6 -- tools/task_plots/iplot_tasks.py | 8 -- tools/task_plots/plot_tasks.py | 6 -- 11 files changed, 63 insertions(+), 243 deletions(-) diff --git a/src/cell.c b/src/cell.c index b233cd565c..641bf0db1b 100644 --- a/src/cell.c +++ b/src/cell.c @@ -2657,62 +2657,6 @@ void cell_activate_cooling(struct cell *c, struct scheduler *s, 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 * reached and activate the spart drift at that level. @@ -3818,7 +3762,9 @@ int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s) { if (c->hydro.extra_ghost != NULL) scheduler_activate(s, c->hydro.extra_ghost); 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.cooling_in != NULL) cell_activate_cooling(c, s, e); #ifdef WITH_LOGGER @@ -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->grav.init != NULL) scheduler_activate(s, c->grav.init); 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_in != NULL) scheduler_activate(s, c->grav.down_in); 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, 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_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 if (c->logger != NULL) scheduler_activate(s, c->logger); #endif @@ -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); if (c->black_holes.black_holes_out != NULL) 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 if (c->logger != NULL) scheduler_activate(s, c->logger); #endif diff --git a/src/cell.h b/src/cell.h index 08921e57e1..766f3e2071 100644 --- a/src/cell.h +++ b/src/cell.h @@ -779,30 +779,12 @@ struct cell { } mpi; #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 */ 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 */ 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 */ struct task *timestep; diff --git a/src/engine.h b/src/engine.h index 95775e8389..2adbd4a218 100644 --- a/src/engine.h +++ b/src/engine.h @@ -115,7 +115,6 @@ enum engine_step_properties { #define engine_max_parts_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_kick_default 10000 #define engine_star_resort_task_depth_default 2 #define engine_tasks_per_cell_margin 1.2 #define engine_default_stf_subdir_per_output "." diff --git a/src/engine_maketasks.c b/src/engine_maketasks.c index 409548bb38..c2fa9eef4c 100644 --- a/src/engine_maketasks.c +++ b/src/engine_maketasks.c @@ -57,7 +57,6 @@ extern int engine_max_parts_per_ghost; extern int engine_max_sparts_per_ghost; extern int engine_star_resort_task_depth; 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. @@ -107,7 +106,7 @@ void engine_addtasks_send_gravity(struct engine *e, struct cell *ci, /* Drift before you send */ 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. */ @@ -220,9 +219,8 @@ void engine_addtasks_send_hydro(struct engine *e, struct cell *ci, /* Drift before you send */ scheduler_addunlock(s, ci->hydro.super->hydro.drift, t_xv); - scheduler_addunlock(s, ci->super->timestep_out, t_ti); - if (with_limiter) - scheduler_addunlock(s, ci->super->timestep_out, t_limiter); + scheduler_addunlock(s, ci->super->timestep, t_ti); + if (with_limiter) scheduler_addunlock(s, ci->super->timestep, t_limiter); } /* Add them to the local cell. */ @@ -317,7 +315,7 @@ void engine_addtasks_send_stars(struct engine *e, struct cell *ci, /* Drift before you send */ 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); @@ -424,7 +422,7 @@ void engine_addtasks_send_black_holes(struct engine *e, struct cell *ci, scheduler_addunlock(s, t_gas_swallow, 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); @@ -815,48 +813,6 @@ void engine_addtasks_recv_gravity(struct engine *e, struct cell *c, #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 - * 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) { /* Local tasks only... */ if (c->nodeID == e->nodeID) { - /* Add the two half kicks dependency tasks */ - c->kick1_in = - scheduler_addtask(s, task_type_kick1_in, task_subtype_none, 0, - /*implicit=*/1, c, NULL); - - c->kick1_out = - scheduler_addtask(s, task_type_kick1_out, task_subtype_none, 0, - /*implicit=*/1, c, NULL); + /* Add the two half kicks */ + c->kick1 = scheduler_addtask(s, task_type_kick1, task_subtype_none, 0, 0, + c, NULL); - c->kick2_in = - scheduler_addtask(s, task_type_kick2_in, task_subtype_none, 0, - /*implicit=*/1, c, NULL); + c->kick2 = scheduler_addtask(s, task_type_kick2, task_subtype_none, 0, 0, + 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) struct task *kick2_or_logger; if (with_logger) { @@ -934,23 +866,28 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) { 0, c, NULL); /* 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 */ kick2_or_logger = c->logger; } else { - kick2_or_logger = c->kick2_out; + kick2_or_logger = c->kick2; } #else - struct task *kick2_or_logger = c->kick2_out; + struct task *kick2_or_logger = c->kick2; #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 */ if (with_star_formation && c->hydro.count > 0) { 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 */ @@ -959,8 +896,8 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) { c->timestep_limiter = scheduler_addtask( 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_limiter, c->kick1_in); + scheduler_addunlock(s, c->timestep, c->timestep_limiter); + scheduler_addunlock(s, c->timestep_limiter, c->kick1); } /* Time-step synchronization */ @@ -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, task_subtype_none, 0, 0, c, NULL); - scheduler_addunlock(s, c->timestep_out, c->timestep_sync); - scheduler_addunlock(s, c->timestep_sync, c->kick1_in); + scheduler_addunlock(s, c->timestep, c->timestep_sync); + scheduler_addunlock(s, c->timestep_sync, c->kick1); } if (with_timestep_limiter && with_timestep_sync) { @@ -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, 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) { @@ -1241,14 +1178,14 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c, if (with_stars) { c->stars.drift = scheduler_addtask(s, task_type_drift_spart, 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 */ if (with_black_holes) { c->black_holes.drift = scheduler_addtask( 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 */ @@ -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); 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 { - scheduler_addunlock(s, c->hydro.end_force, c->super->kick2_in); + scheduler_addunlock(s, c->hydro.end_force, c->super->kick2); } /* Subgrid tasks: feedback */ @@ -1288,12 +1225,12 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c, if (with_logger) { scheduler_addunlock(s, c->super->logger, c->stars.stars_in); } else { - scheduler_addunlock(s, c->super->kick2_out, c->stars.stars_in); + scheduler_addunlock(s, c->super->kick2, c->stars.stars_in); } #else - scheduler_addunlock(s, c->super->kick2_out, c->stars.stars_in); + scheduler_addunlock(s, c->super->kick2, c->stars.stars_in); #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) { 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, scheduler_addunlock(s, c->super->logger, c->black_holes.black_holes_in); } else { - scheduler_addunlock(s, c->super->kick2_out, + scheduler_addunlock(s, c->super->kick2, c->black_holes.black_holes_in); } #else - scheduler_addunlock(s, c->super->kick2_out, - c->black_holes.black_holes_in); + scheduler_addunlock(s, c->super->kick2, c->black_holes.black_holes_in); #endif scheduler_addunlock(s, c->black_holes.black_holes_out, - c->super->timestep_in); + c->super->timestep); } if (with_black_holes && with_feedback) { @@ -2129,9 +2065,9 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, } 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, t_limiter, ci->super->kick1_in); + scheduler_addunlock(sched, t_limiter, ci->super->kick1); 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, if (with_timestep_limiter) { scheduler_addunlock(sched, ci->hydro.super->hydro.drift, t_limiter); - scheduler_addunlock(sched, ci->super->timestep_out, t_limiter); - scheduler_addunlock(sched, t_limiter, ci->super->kick1_in); + scheduler_addunlock(sched, ci->super->timestep, t_limiter); + scheduler_addunlock(sched, t_limiter, ci->super->kick1); 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, if (ci->super != cj->super) { if (with_timestep_limiter) { - scheduler_addunlock(sched, cj->super->timestep_out, t_limiter); - scheduler_addunlock(sched, t_limiter, cj->super->kick1_in); + scheduler_addunlock(sched, cj->super->timestep, t_limiter); + scheduler_addunlock(sched, t_limiter, cj->super->kick1); 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, if (with_timestep_limiter) { scheduler_addunlock(sched, ci->hydro.super->hydro.drift, t_limiter); - scheduler_addunlock(sched, ci->super->timestep_out, t_limiter); - scheduler_addunlock(sched, t_limiter, ci->super->kick1_in); + scheduler_addunlock(sched, ci->super->timestep, t_limiter); + scheduler_addunlock(sched, t_limiter, ci->super->kick1); 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, if (with_timestep_limiter) { scheduler_addunlock(sched, ci->hydro.super->hydro.drift, t_limiter); - scheduler_addunlock(sched, ci->super->timestep_out, t_limiter); - scheduler_addunlock(sched, t_limiter, ci->super->kick1_in); + scheduler_addunlock(sched, ci->super->timestep, t_limiter); + scheduler_addunlock(sched, t_limiter, ci->super->kick1); scheduler_addunlock(sched, t_limiter, ci->super->timestep_limiter); } @@ -2899,8 +2835,8 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, if (ci->super != cj->super) { if (with_timestep_limiter) { - scheduler_addunlock(sched, cj->super->timestep_out, t_limiter); - scheduler_addunlock(sched, t_limiter, cj->super->kick1_in); + scheduler_addunlock(sched, cj->super->timestep, t_limiter); + scheduler_addunlock(sched, t_limiter, cj->super->kick1); scheduler_addunlock(sched, t_limiter, cj->super->timestep_limiter); } diff --git a/src/engine_marktasks.c b/src/engine_marktasks.c index 799e366f3d..21e85010e3 100644 --- a/src/engine_marktasks.c +++ b/src/engine_marktasks.c @@ -886,9 +886,7 @@ void engine_marktasks_mapper(void *map_data, int num_elements, } /* Kick ? */ - else if (t_type == task_type_kick1 || t_type == task_type_kick2 || - t_type == task_type_kick1_in || t_type == task_type_kick2_in || - t_type == task_type_kick1_out || t_type == task_type_kick2_out) { + else if (t_type == task_type_kick1 || t_type == task_type_kick2) { if (cell_is_active_hydro(t->ci, e) || cell_is_active_gravity(t->ci, e) || cell_is_active_stars(t->ci, e) || @@ -968,8 +966,7 @@ void engine_marktasks_mapper(void *map_data, int num_elements, } /* Time-step? */ - else if (t_type == task_type_timestep || t_type == task_type_timestep_in || - t_type == task_type_timestep_out) { + else if (t_type == task_type_timestep) { t->ci->hydro.updated = 0; t->ci->grav.updated = 0; t->ci->stars.updated = 0; diff --git a/src/space.c b/src/space.c index 2eb9cd7c9b..60b3c3975c 100644 --- a/src/space.c +++ b/src/space.c @@ -95,7 +95,6 @@ int space_extra_gparts = space_extra_gparts_default; int engine_max_parts_per_ghost = engine_max_parts_per_ghost_default; int engine_max_sparts_per_ghost = engine_max_sparts_per_ghost_default; int engine_max_parts_per_cooling = engine_max_parts_per_cooling_default; -int engine_max_parts_per_kick = engine_max_parts_per_kick_default; /*! Maximal depth at which the stars resort task can be pushed */ int engine_star_resort_task_depth = engine_star_resort_task_depth_default; @@ -239,14 +238,8 @@ void space_rebuild_recycle_mapper(void *map_data, int num_elements, c->black_holes.do_gas_swallow = NULL; c->black_holes.do_bh_swallow = NULL; c->black_holes.feedback = NULL; - c->kick1_in = NULL; - c->kick1_out = NULL; c->kick1 = NULL; - c->kick2_in = NULL; - c->kick2_out = NULL; c->kick2 = NULL; - c->timestep_in = NULL; - c->timestep_out = NULL; c->timestep = NULL; c->timestep_limiter = NULL; c->timestep_sync = NULL; @@ -4995,12 +4988,10 @@ void space_init(struct space *s, struct swift_params *params, engine_max_sparts_per_ghost = parser_get_opt_param_int(params, "Scheduler:engine_max_sparts_per_ghost", engine_max_sparts_per_ghost_default); + engine_max_parts_per_cooling = parser_get_opt_param_int(params, "Scheduler:engine_max_parts_per_cooling", engine_max_parts_per_cooling_default); - engine_max_parts_per_kick = - parser_get_opt_param_int(params, "Scheduler:engine_max_parts_per_kick", - engine_max_parts_per_kick_default); if (verbose) { message("max_size set to %d split_size set to %d", space_maxsize, @@ -5872,9 +5863,6 @@ void space_struct_dump(struct space *s, FILE *stream) { restart_write_blocks(&engine_max_parts_per_cooling, sizeof(int), 1, stream, "engine_max_parts_per_cooling", "engine_max_parts_per_cooling"); - restart_write_blocks(&engine_max_parts_per_kick, sizeof(int), 1, stream, - "engine_max_parts_per_kick", - "engine_max_parts_per_kick"); restart_write_blocks(&engine_star_resort_task_depth, sizeof(int), 1, stream, "engine_star_resort_task_depth", "engine_star_resort_task_depth"); @@ -5944,8 +5932,6 @@ void space_struct_restore(struct space *s, FILE *stream) { NULL, "engine_max_sparts_per_ghost"); restart_read_blocks(&engine_max_parts_per_cooling, sizeof(int), 1, stream, NULL, "engine_max_parts_per_cooling"); - restart_read_blocks(&engine_max_parts_per_kick, sizeof(int), 1, stream, NULL, - "engine_max_parts_per_kick"); restart_read_blocks(&engine_star_resort_task_depth, sizeof(int), 1, stream, NULL, "engine_star_resort_task_depth"); diff --git a/src/task.c b/src/task.c index bfa58523fc..09721bcd88 100644 --- a/src/task.c +++ b/src/task.c @@ -67,15 +67,9 @@ const char *taskID_names[task_type_count] = {"none", "drift_gpart", "drift_gpart_out", "end_hydro_force", - "kick1_in", "kick1", - "kick1_out", - "kick2_in", "kick2", - "kick2_out", - "timestep_in", "timestep", - "timestep_out", "timestep_limiter", "timestep_sync", "send", diff --git a/src/task.h b/src/task.h index ee08183fbc..c8b7e587c8 100644 --- a/src/task.h +++ b/src/task.h @@ -61,15 +61,9 @@ enum task_types { task_type_drift_gpart, task_type_drift_gpart_out, /* Implicit */ task_type_end_hydro_force, - task_type_kick1_in, /* Implicit */ task_type_kick1, - task_type_kick1_out, /* Implicit */ - task_type_kick2_in, /* Implicit */ task_type_kick2, - task_type_kick2_out, /* Implicit */ - task_type_timestep_in, /* Implicit */ task_type_timestep, - task_type_timestep_out, /* Implicit */ task_type_timestep_limiter, task_type_timestep_sync, task_type_send, diff --git a/tools/task_plots/analyse_tasks.py b/tools/task_plots/analyse_tasks.py index cb88f0cbef..ffa0f6d5e5 100755 --- a/tools/task_plots/analyse_tasks.py +++ b/tools/task_plots/analyse_tasks.py @@ -89,15 +89,9 @@ TASKTYPES = [ "drift_gpart", "drift_gpart_out", "hydro_end_force", - "kick1_in", "kick1", - "kick1_out", - "kick2_in", "kick2", - "kick2_out", - "timestep_in", "timestep", - "timestep_out", "timestep_limiter", "timestep_sync", "send", diff --git a/tools/task_plots/iplot_tasks.py b/tools/task_plots/iplot_tasks.py index 1776c9ae3c..1a6b501fba 100755 --- a/tools/task_plots/iplot_tasks.py +++ b/tools/task_plots/iplot_tasks.py @@ -143,15 +143,9 @@ TASKTYPES = [ "drift_gpart", "drift_gpart_out", "hydro_end_force", - "kick1_in", "kick1", - "kick1_out", - "kick2_in", "kick2", - "kick2_out", - "timestep_in", "timestep", - "timestep_out", "timestep_limiter", "timestep_sync", "send", @@ -163,8 +157,6 @@ TASKTYPES = [ "grav_mesh", "grav_end_force", "cooling", - "cooling_in", - "cooling_out", "star_formation", "star_formation_in", "star_formation_out", diff --git a/tools/task_plots/plot_tasks.py b/tools/task_plots/plot_tasks.py index bf73ed617c..a0eb356cac 100755 --- a/tools/task_plots/plot_tasks.py +++ b/tools/task_plots/plot_tasks.py @@ -166,15 +166,9 @@ TASKTYPES = [ "drift_gpart", "drift_gpart_out", "hydro_end_force", - "kick1_in", "kick1", - "kick1_out", - "kick2_in", "kick2", - "kick2_out", - "timestep_in", "timestep", - "timestep_out", "timestep_limiter", "timestep_sync", "send", -- GitLab