Commit 44ba3356 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Made the ghost_in and ghost_out a separate task type to stop the confusion of...

Made the ghost_in and ghost_out a separate task type to stop the confusion of the ghost being sometimes implicit.
parent 085a9886
...@@ -2159,6 +2159,8 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) { ...@@ -2159,6 +2159,8 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
if (c->ghost_out != NULL) scheduler_activate(s, c->ghost_out); if (c->ghost_out != NULL) scheduler_activate(s, c->ghost_out);
if (c->ghost != NULL) scheduler_activate(s, c->ghost); if (c->ghost != NULL) scheduler_activate(s, c->ghost);
if (c->init_grav != NULL) scheduler_activate(s, c->init_grav); if (c->init_grav != NULL) scheduler_activate(s, c->init_grav);
if (c->grav_ghost_in != NULL) scheduler_activate(s, c->grav_ghost_in);
if (c->grav_ghost_out != NULL) scheduler_activate(s, c->grav_ghost_out);
if (c->kick1 != NULL) scheduler_activate(s, c->kick1); if (c->kick1 != NULL) scheduler_activate(s, c->kick1);
if (c->kick2 != NULL) scheduler_activate(s, c->kick2); if (c->kick2 != NULL) scheduler_activate(s, c->kick2);
if (c->timestep != NULL) scheduler_activate(s, c->timestep); if (c->timestep != NULL) scheduler_activate(s, c->timestep);
......
...@@ -244,10 +244,10 @@ void engine_make_hierarchical_tasks(struct engine *e, struct cell *c) { ...@@ -244,10 +244,10 @@ void engine_make_hierarchical_tasks(struct engine *e, struct cell *c) {
/* Generate the ghost tasks. */ /* Generate the ghost tasks. */
c->ghost_in = c->ghost_in =
scheduler_addtask(s, task_type_ghost, task_subtype_none, 0, scheduler_addtask(s, task_type_ghost_in, task_subtype_none, 0,
/* implicit = */ 1, c, NULL); /* implicit = */ 1, c, NULL);
c->ghost_out = c->ghost_out =
scheduler_addtask(s, task_type_ghost, task_subtype_none, 0, scheduler_addtask(s, task_type_ghost_out, task_subtype_none, 0,
/* implicit = */ 1, c, NULL); /* implicit = */ 1, c, NULL);
engine_add_ghosts(e, c, c->ghost_in, c->ghost_out); engine_add_ghosts(e, c, c->ghost_in, c->ghost_out);
...@@ -3274,7 +3274,8 @@ void engine_marktasks_mapper(void *map_data, int num_elements, ...@@ -3274,7 +3274,8 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
} }
/* Hydro ghost tasks ? */ /* Hydro ghost tasks ? */
else if (t->type == task_type_ghost || t->type == task_type_extra_ghost) { else if (t->type == task_type_ghost || t->type == task_type_extra_ghost ||
t->type == task_type_ghost_in || t->type == task_type_ghost_out) {
if (cell_is_active(t->ci, e)) scheduler_activate(s, t); if (cell_is_active(t->ci, e)) scheduler_activate(s, t);
} }
...@@ -3285,7 +3286,9 @@ void engine_marktasks_mapper(void *map_data, int num_elements, ...@@ -3285,7 +3286,9 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
} }
/* Periodic gravity stuff (Note this is not linked to a cell) ? */ /* Periodic gravity stuff (Note this is not linked to a cell) ? */
else if (t->type == task_type_grav_top_level) { else if (t->type == task_type_grav_top_level ||
t->type == task_type_grav_ghost_in ||
t->type == task_type_grav_ghost_out) {
scheduler_activate(s, t); scheduler_activate(s, t);
} }
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
const char *taskID_names[task_type_count] = { const char *taskID_names[task_type_count] = {
"none", "sort", "self", "none", "sort", "self",
"pair", "sub_self", "sub_pair", "pair", "sub_self", "sub_pair",
"init_grav", "ghost", "extra_ghost", "init_grav", "ghost_in", "ghost", "ghost_out", "extra_ghost",
"drift_part", "drift_gpart", "kick1", "drift_part", "drift_gpart", "kick1",
"kick2", "timestep", "send", "kick2", "timestep", "send",
"recv", "grav_top_level", "grav_long_range", "recv", "grav_top_level", "grav_long_range",
......
...@@ -46,7 +46,9 @@ enum task_types { ...@@ -46,7 +46,9 @@ enum task_types {
task_type_sub_self, task_type_sub_self,
task_type_sub_pair, task_type_sub_pair,
task_type_init_grav, task_type_init_grav,
task_type_ghost_in,
task_type_ghost, task_type_ghost,
task_type_ghost_out,
task_type_extra_ghost, task_type_extra_ghost,
task_type_drift_part, task_type_drift_part,
task_type_drift_gpart, task_type_drift_gpart,
......
Markdown is supported
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