diff --git a/src/cell.c b/src/cell.c index 640a87cc64d76993859be589a6bc5e5032556029..f6ac46083bd7d12dbf0ae45d24b11a116c541379 100644 --- a/src/cell.c +++ b/src/cell.c @@ -756,16 +756,9 @@ void cell_convert_hydro(struct cell *c, void *data) { */ void cell_clean_links(struct cell *c, void *data) { c->density = NULL; - c->nr_density = 0; - c->gradient = NULL; - c->nr_gradient = 0; - c->force = NULL; - c->nr_force = 0; - c->grav = NULL; - c->nr_grav = 0; } /** diff --git a/src/cell.h b/src/cell.h index 104b74312890e2fd7e2f31c5bae85deb893da0d2..b84243d457ccb05407797360f5c79780348a8773 100644 --- a/src/cell.h +++ b/src/cell.h @@ -139,7 +139,6 @@ struct cell { /* The tasks computing this cell's density. */ struct link *density, *gradient, *force, *grav; - int nr_density, nr_gradient, nr_force, nr_grav; /* The hierarchical tasks. */ struct task *extra_ghost, *ghost, *init, *kick; diff --git a/src/engine.c b/src/engine.c index d61dcd0b97de87d4102f1e658c42b03e2b9b6a21..67e4feeeeebc0bf76740f419145d812aca3f5cc9 100644 --- a/src/engine.c +++ b/src/engine.c @@ -1361,15 +1361,12 @@ void engine_count_and_link_tasks(struct engine *e) { atomic_inc(&ci->nr_tasks); if (t->subtype == task_subtype_density) { engine_addlink(e, &ci->density, t); - atomic_inc(&ci->nr_density); } if (t->subtype == task_subtype_grav) { engine_addlink(e, &ci->grav, t); - atomic_inc(&ci->nr_grav); } if (t->subtype == task_subtype_external_grav) { engine_addlink(e, &ci->grav, t); - atomic_inc(&ci->nr_grav); } /* Link pair tasks to cells. */ @@ -1378,15 +1375,11 @@ void engine_count_and_link_tasks(struct engine *e) { atomic_inc(&cj->nr_tasks); if (t->subtype == task_subtype_density) { engine_addlink(e, &ci->density, t); - atomic_inc(&ci->nr_density); engine_addlink(e, &cj->density, t); - atomic_inc(&cj->nr_density); } if (t->subtype == task_subtype_grav) { engine_addlink(e, &ci->grav, t); - atomic_inc(&ci->nr_grav); engine_addlink(e, &cj->grav, t); - atomic_inc(&cj->nr_grav); } /* Link sub-self tasks to cells. */ @@ -1394,15 +1387,12 @@ void engine_count_and_link_tasks(struct engine *e) { atomic_inc(&ci->nr_tasks); if (t->subtype == task_subtype_density) { engine_addlink(e, &ci->density, t); - atomic_inc(&ci->nr_density); } if (t->subtype == task_subtype_grav) { engine_addlink(e, &ci->grav, t); - atomic_inc(&ci->nr_grav); } if (t->subtype == task_subtype_external_grav) { engine_addlink(e, &ci->grav, t); - atomic_inc(&ci->nr_grav); } /* Link sub-pair tasks to cells. */ @@ -1411,22 +1401,16 @@ void engine_count_and_link_tasks(struct engine *e) { atomic_inc(&cj->nr_tasks); if (t->subtype == task_subtype_density) { engine_addlink(e, &ci->density, t); - atomic_inc(&ci->nr_density); engine_addlink(e, &cj->density, t); - atomic_inc(&cj->nr_density); } if (t->subtype == task_subtype_grav) { engine_addlink(e, &ci->grav, t); - atomic_inc(&ci->nr_grav); engine_addlink(e, &cj->grav, t); - atomic_inc(&cj->nr_grav); } if (t->subtype == task_subtype_external_grav) { error("Found a sub-pair/external-gravity task..."); engine_addlink(e, &ci->grav, t); - atomic_inc(&ci->nr_grav); engine_addlink(e, &cj->grav, t); - atomic_inc(&cj->nr_grav); } } } @@ -1658,9 +1642,7 @@ void engine_make_extra_hydroloop_tasks(struct engine *e) { /* Add the link between the new loops and the cell */ engine_addlink(e, &t->ci->gradient, t2); - atomic_inc(&t->ci->nr_gradient); engine_addlink(e, &t->ci->force, t3); - atomic_inc(&t->ci->nr_force); /* Now, build all the dependencies for the hydro */ engine_make_hydro_loops_dependencies(sched, t, t2, t3, t->ci); @@ -1673,7 +1655,6 @@ void engine_make_extra_hydroloop_tasks(struct engine *e) { /* Add the link between the new loop and the cell */ engine_addlink(e, &t->ci->force, t2); - atomic_inc(&t->ci->nr_force); /* Now, build all the dependencies for the hydro */ engine_make_hydro_loops_dependencies(sched, t, t2, t->ci); @@ -1692,13 +1673,9 @@ void engine_make_extra_hydroloop_tasks(struct engine *e) { /* Add the link between the new loop and both cells */ engine_addlink(e, &t->ci->gradient, t2); - atomic_inc(&t->ci->nr_gradient); engine_addlink(e, &t->cj->gradient, t2); - atomic_inc(&t->cj->nr_gradient); engine_addlink(e, &t->ci->force, t3); - atomic_inc(&t->ci->nr_force); engine_addlink(e, &t->cj->force, t3); - atomic_inc(&t->cj->nr_force); /* Now, build all the dependencies for the hydro for the cells */ /* that are local and are not descendant of the same super-cells */ @@ -1717,9 +1694,7 @@ void engine_make_extra_hydroloop_tasks(struct engine *e) { /* Add the link between the new loop and both cells */ engine_addlink(e, &t->ci->force, t2); - atomic_inc(&t->ci->nr_force); engine_addlink(e, &t->cj->force, t2); - atomic_inc(&t->cj->nr_force); /* Now, build all the dependencies for the hydro for the cells */ /* that are local and are not descendant of the same super-cells */ @@ -1750,9 +1725,7 @@ void engine_make_extra_hydroloop_tasks(struct engine *e) { /* Add the link between the new loop and the cell */ engine_addlink(e, &t->ci->gradient, t2); - atomic_inc(&t->ci->nr_gradient); engine_addlink(e, &t->ci->force, t3); - atomic_inc(&t->ci->nr_force); /* Now, build all the dependencies for the hydro for the cells */ /* that are local and are not descendant of the same super-cells */ @@ -1768,7 +1741,6 @@ void engine_make_extra_hydroloop_tasks(struct engine *e) { /* Add the link between the new loop and the cell */ engine_addlink(e, &t->ci->force, t2); - atomic_inc(&t->ci->nr_force); /* Now, build all the dependencies for the hydro for the cells */ /* that are local and are not descendant of the same super-cells */ @@ -1794,13 +1766,9 @@ void engine_make_extra_hydroloop_tasks(struct engine *e) { /* Add the link between the new loop and both cells */ engine_addlink(e, &t->ci->gradient, t2); - atomic_inc(&t->ci->nr_gradient); engine_addlink(e, &t->cj->gradient, t2); - atomic_inc(&t->cj->nr_gradient); engine_addlink(e, &t->ci->force, t3); - atomic_inc(&t->ci->nr_force); engine_addlink(e, &t->cj->force, t3); - atomic_inc(&t->cj->nr_force); /* Now, build all the dependencies for the hydro for the cells */ /* that are local and are not descendant of the same super-cells */ @@ -1819,9 +1787,7 @@ void engine_make_extra_hydroloop_tasks(struct engine *e) { /* Add the link between the new loop and both cells */ engine_addlink(e, &t->ci->force, t2); - atomic_inc(&t->ci->nr_force); engine_addlink(e, &t->cj->force, t2); - atomic_inc(&t->cj->nr_force); /* Now, build all the dependencies for the hydro for the cells */ /* that are local and are not descendant of the same super-cells */ diff --git a/src/space.c b/src/space.c index b7cf7b0b552682ce8f3370a4d85f647302817199..0701c4a797fc3890fd0134ece6eb87ec41aab96e 100644 --- a/src/space.c +++ b/src/space.c @@ -392,10 +392,6 @@ void space_regrid(struct space *s, double cell_max, int verbose) { space_rebuild_recycle(s, &s->cells_top[k]); s->cells_top[k].sorts = NULL; s->cells_top[k].nr_tasks = 0; - s->cells_top[k].nr_density = 0; - s->cells_top[k].nr_gradient = 0; - s->cells_top[k].nr_force = 0; - s->cells_top[k].nr_grav = 0; s->cells_top[k].density = NULL; s->cells_top[k].gradient = NULL; s->cells_top[k].force = NULL;