Commit bb3321a2 authored by James Willis's avatar James Willis Committed by Matthieu Schaller
Browse files

Remove duplicate gpart communication

parent 3fc307d8
......@@ -6510,14 +6510,6 @@ void engine_fof(struct engine *e, const int dump_results,
/* Perform local FOF tasks. */
engine_launch(e);
#ifdef WITH_MPI
/* Exchange the gparts that now contain all their local group information */
engine_activate_gpart_comms(e);
/* Perform the communications */
engine_launch(e);
#endif
/* Perform FOF search over foreign particles and
* find groups which require black hole seeding. */
fof_search_tree(e->fof_properties, e->black_holes_properties,
......
......@@ -538,6 +538,7 @@ int engine_estimate_nr_tasks(const struct engine *e);
void engine_print_task_counts(const struct engine *e);
void engine_fof(struct engine *e, const int dump_results,
const int seed_black_holes);
void engine_activate_gpart_comms(struct engine *e);
/* Function prototypes, engine_maketasks.c. */
void engine_maketasks(struct engine *e);
......
......@@ -2105,30 +2105,10 @@ void fof_search_foreign_cells(struct fof_props *props, const struct space *s) {
if (verbose)
message(
"Finding local/foreign cell pairs and initialising particle roots "
"took: "
"%.3f %s.",
"took: %.3f %s.",
clocks_from_ticks(getticks() - tic), clocks_getunit());
tic = getticks();
struct scheduler *sched = &e->sched;
struct task *tasks = sched->tasks;
/* Activate the send and receive tasks for the gparts. */
for (int i = 0; i < sched->nr_tasks; i++) {
struct task *t = &tasks[i];
if ((t->type == task_type_send && t->subtype == task_subtype_gpart) ||
(t->type == task_type_recv && t->subtype == task_subtype_gpart)) {
scheduler_activate(sched, t);
} else
t->skip = 1;
}
if (verbose)
message("MPI send/recv task activation took: %.3f %s.",
clocks_from_ticks(getticks() - tic), clocks_getunit());
engine_activate_gpart_comms(e);
ticks local_fof_tic = getticks();
......
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