From 96b6ff2feffcbeeedda476916959f813580df3d0 Mon Sep 17 00:00:00 2001 From: "Peter W. Draper" <p.w.draper@durham.ac.uk> Date: Sun, 2 Apr 2023 22:11:14 +0000 Subject: [PATCH] Remove use of the unused subtypes task_type_bpart_swallow and task_subtype_multipole --- src/engine.c | 1 - src/runner_main.c | 5 ----- src/scheduler.c | 17 ----------------- src/task.c | 2 -- src/task.h | 2 -- tools/task_plots/swift_hardcoded_data.py | 2 -- 6 files changed, 29 deletions(-) diff --git a/src/engine.c b/src/engine.c index c18b5eca56..3670dee9b6 100644 --- a/src/engine.c +++ b/src/engine.c @@ -1639,7 +1639,6 @@ void engine_skip_force_and_kick(struct engine *e) { t->subtype == task_subtype_bpart_rho || t->subtype == task_subtype_part_swallow || t->subtype == task_subtype_bpart_merger || - t->subtype == task_subtype_bpart_swallow || t->subtype == task_subtype_bpart_feedback || t->subtype == task_subtype_sink_swallow || t->subtype == task_subtype_sink_do_sink_swallow || diff --git a/src/runner_main.c b/src/runner_main.c index d925a71e64..8c32c7d709 100644 --- a/src/runner_main.c +++ b/src/runner_main.c @@ -528,13 +528,8 @@ void *runner_main(void *data) { runner_do_recv_spart(r, ci, 0, 1); } else if (t->subtype == task_subtype_bpart_rho) { runner_do_recv_bpart(r, ci, 1, 1); - } else if (t->subtype == task_subtype_bpart_swallow) { - runner_do_recv_bpart(r, ci, 0, 1); } else if (t->subtype == task_subtype_bpart_feedback) { runner_do_recv_bpart(r, ci, 0, 1); - } else if (t->subtype == task_subtype_multipole) { - cell_unpack_multipoles(ci, (struct gravity_tensors *)t->buff); - free(t->buff); } else { error("Unknown/invalid task subtype (%d).", t->subtype); } diff --git a/src/scheduler.c b/src/scheduler.c index c210b9f207..4f468d935a 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -2572,7 +2572,6 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) { buff = t->ci->stars.parts; } else if (t->subtype == task_subtype_bpart_rho || - t->subtype == task_subtype_bpart_swallow || t->subtype == task_subtype_bpart_feedback) { count = t->ci->black_holes.count; @@ -2580,13 +2579,6 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) { type = bpart_mpi_type; buff = t->ci->black_holes.parts; - } else if (t->subtype == task_subtype_multipole) { - - count = t->ci->mpi.pcell_size; - size = count * sizeof(struct gravity_tensors); - type = multipole_mpi_type; - buff = t->buff = malloc(size); - } else if (t->subtype == task_subtype_sf_counts) { count = size = t->ci->mpi.pcell_size * sizeof(struct pcell_sf); @@ -2676,7 +2668,6 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) { buff = t->ci->stars.parts; } else if (t->subtype == task_subtype_bpart_rho || - t->subtype == task_subtype_bpart_swallow || t->subtype == task_subtype_bpart_feedback) { count = t->ci->black_holes.count; @@ -2684,14 +2675,6 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) { type = bpart_mpi_type; buff = t->ci->black_holes.parts; - } else if (t->subtype == task_subtype_multipole) { - - count = t->ci->mpi.pcell_size; - size = count * sizeof(struct gravity_tensors); - type = multipole_mpi_type; - buff = t->buff = malloc(size); - cell_pack_multipoles(t->ci, (struct gravity_tensors *)buff); - } else if (t->subtype == task_subtype_sf_counts) { size = count = t->ci->mpi.pcell_size * sizeof(struct pcell_sf); diff --git a/src/task.c b/src/task.c index 333f648769..0fff5fd03b 100644 --- a/src/task.c +++ b/src/task.c @@ -142,7 +142,6 @@ const char *subtaskID_names[task_subtype_count] = { "part_swallow", "bpart_merger", "gpart", - "multipole", "spart_density", "part_prep1", "spart_prep2", @@ -152,7 +151,6 @@ const char *subtaskID_names[task_subtype_count] = { "stars_feedback", "sf_counts", "bpart_rho", - "bpart_swallow", "bpart_feedback", "bh_density", "bh_swallow", diff --git a/src/task.h b/src/task.h index 60d51ba706..54f968b7d9 100644 --- a/src/task.h +++ b/src/task.h @@ -138,7 +138,6 @@ enum task_subtypes { task_subtype_part_swallow, task_subtype_bpart_merger, task_subtype_gpart, - task_subtype_multipole, task_subtype_spart_density, task_subtype_part_prep1, task_subtype_spart_prep2, @@ -148,7 +147,6 @@ enum task_subtypes { task_subtype_stars_feedback, task_subtype_sf_counts, task_subtype_bpart_rho, - task_subtype_bpart_swallow, task_subtype_bpart_feedback, task_subtype_bh_density, task_subtype_bh_swallow, diff --git a/tools/task_plots/swift_hardcoded_data.py b/tools/task_plots/swift_hardcoded_data.py index 104c43f28c..76277d49b2 100644 --- a/tools/task_plots/swift_hardcoded_data.py +++ b/tools/task_plots/swift_hardcoded_data.py @@ -99,7 +99,6 @@ SUBTYPES = [ "part_swallow", "bpart_merger", "gpart", - "multipole", "spart_density", "part_prep1", "spart_prep2", @@ -109,7 +108,6 @@ SUBTYPES = [ "stars_feedback", "sf_counts", "bpart_rho", - "bpart_swallow", "bpart_feedback", "bh_density", "bh_swallow", -- GitLab