Commit 7ee5f906 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

No need for the 'end_force_in' task.

parent 3d1124c7
......@@ -53,7 +53,7 @@ infile = args.input
# Tasks and subtypes. Indexed as in tasks.h.
TASKTYPES = ["none", "sort", "self", "pair", "sub_self", "sub_pair",
"init_grav", "init_grav_out", "ghost_in", "ghost", "ghost_out", "extra_ghost", "drift_part", "drift_gpart", "drift_gpart_out",
"end_force", "end_force_in", "kick1", "kick2", "timestep", "send", "recv", "grav_long_range", "grav_mm", "grav_down_in",
"end_force", "kick1", "kick2", "timestep", "send", "recv", "grav_long_range", "grav_mm", "grav_down_in",
"grav_down", "grav_mesh", "cooling", "star_formation", "sourceterms",
"stars_ghost_in", "stars_ghost", "stars_ghost_out",
"count"]
......
......@@ -111,7 +111,7 @@ pl.rcParams.update(PLOT_PARAMS)
# Tasks and subtypes. Indexed as in tasks.h.
TASKTYPES = ["none", "sort", "self", "pair", "sub_self", "sub_pair",
"init_grav", "init_grav_out", "ghost_in", "ghost", "ghost_out", "extra_ghost", "drift_part", "drift_gpart", "drift_gpart_out",
"end_force", "end_force_in", "kick1", "kick2", "timestep", "send", "recv", "grav_long_range", "grav_mm", "grav_down_in",
"end_force", "kick1", "kick2", "timestep", "send", "recv", "grav_long_range", "grav_mm", "grav_down_in",
"grav_down", "grav_mesh", "cooling", "star_formation", "sourceterms",
"stars_ghost_in", "stars_ghost", "stars_ghost_out",
"count"]
......
......@@ -2770,7 +2770,6 @@ int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s) {
if (c->kick2 != NULL) scheduler_activate(s, c->kick2);
if (c->timestep != NULL) scheduler_activate(s, c->timestep);
if (c->end_force != NULL) scheduler_activate(s, c->end_force);
if (c->end_force_in != NULL) scheduler_activate(s, c->end_force_in);
if (c->hydro.cooling != NULL) scheduler_activate(s, c->hydro.cooling);
if (c->hydro.star_formation != NULL)
scheduler_activate(s, c->hydro.star_formation);
......@@ -2920,7 +2919,6 @@ int cell_unskip_gravity_tasks(struct cell *c, struct scheduler *s) {
if (c->kick2 != NULL) scheduler_activate(s, c->kick2);
if (c->timestep != NULL) scheduler_activate(s, c->timestep);
if (c->end_force != NULL) scheduler_activate(s, c->end_force);
if (c->end_force_in != NULL) scheduler_activate(s, c->end_force_in);
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);
......
......@@ -544,9 +544,6 @@ struct cell {
/*! The task to end the force calculation */
struct task *end_force;
/*! Implicit task (going up- and down the tree) for the end force */
struct task *end_force_in;
/*! The first kick task */
struct task *kick1;
......
......@@ -462,10 +462,6 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) {
c->end_force = scheduler_addtask(s, task_type_end_force,
task_subtype_none, 0, 0, c, NULL);
/* Implicit task for the up pass */
c->end_force_in = scheduler_addtask(s, task_type_end_force_in,
task_subtype_none, 0, 1, c, NULL);
/* Subgrid tasks */
if (is_with_cooling) {
......@@ -491,33 +487,20 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) {
scheduler_addunlock(s, c->kick2, c->timestep);
}
//scheduler_addunlock(s, c->end_force_in, c->end_force);
scheduler_addunlock(s, c->timestep, c->kick1);
#if defined(WITH_LOGGER)
scheduler_addunlock(s, c->kick1, c->logger);
#endif
}
}
/* We are below the super-cell but not below the maximal splitting depth */
else if (c->super != NULL) {
/* Local tasks only... */
if (c->nodeID == e->nodeID) {
c->end_force_in = scheduler_addtask(s, task_type_end_force_in,
task_subtype_none, 0, 1, c, NULL);
} else { /* We are above the super-cell so need to go deeper */
scheduler_addunlock(s, c->end_force_in, c->parent->end_force_in);
}
/* Recurse. */
if (c->split)
for (int k = 0; k < 8; k++)
if (c->progeny[k] != NULL)
engine_make_hierarchical_tasks_common(e, c->progeny[k]);
}
/* Recurse. */
if (c->split)
for (int k = 0; k < 8; k++)
if (c->progeny[k] != NULL)
engine_make_hierarchical_tasks_common(e, c->progeny[k]);
}
/**
......
......@@ -444,8 +444,7 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
}
/* End force ? */
else if (t_type == task_type_end_force ||
t_type == task_type_end_force_in) {
else if (t_type == task_type_end_force) {
if (cell_is_active_hydro(t->ci, e) || cell_is_active_gravity(t->ci, e))
scheduler_activate(s, t);
......
......@@ -63,7 +63,6 @@ const char *taskID_names[task_type_count] = {"none",
"drift_gpart",
"drift_gpart_out",
"end_force",
"end_force_in",
"kick1",
"kick2",
"timestep",
......
......@@ -55,7 +55,6 @@ enum task_types {
task_type_drift_gpart,
task_type_drift_gpart_out, /* Implicit */
task_type_end_force,
task_type_end_force_in, /* Implicit */
task_type_kick1,
task_type_kick2,
task_type_timestep,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment