Commit b5567d65 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

replace the cell's mpi.hydro.recv_ti task pointer with the new linked recv...

replace the cell's mpi.hydro.recv_ti task pointer with the new linked recv pointers. goodbye, mpi.hydro!
parent 8c7c065a
......@@ -3275,7 +3275,7 @@ int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s) {
/* If the foreign cell is active, we want its ti_end values. */
if (ci_active || with_limiter)
scheduler_activate(s, ci->mpi.hydro.recv_ti);
scheduler_activate_recv(s, ci->mpi.recv, task_subtype_tend_part);
if (with_limiter) scheduler_activate(s, ci->mpi.limiter.recv);
if (with_limiter)
......@@ -3325,7 +3325,7 @@ int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s) {
/* If the foreign cell is active, we want its ti_end values. */
if (cj_active || with_limiter)
scheduler_activate(s, cj->mpi.hydro.recv_ti);
scheduler_activate_recv(s, cj->mpi.recv, task_subtype_tend_part);
if (with_limiter) scheduler_activate(s, cj->mpi.limiter.recv);
if (with_limiter)
......@@ -3902,7 +3902,7 @@ void cell_set_super_mapper(void *map_data, int num_elements, void *extra_data) {
int cell_has_tasks(struct cell *c) {
#ifdef WITH_MPI
if (c->timestep != NULL || c->mpi.hydro.recv_ti != NULL ||
if (c->timestep != NULL || c->mpi.recv != NULL ||
c->mpi.grav.recv_ti != NULL || c->mpi.stars.recv_ti != NULL)
return 1;
#else
......
......@@ -580,11 +580,6 @@ struct cell {
struct link *recv;
};
struct {
/* Task receiving data (time-step). */
struct task *recv_ti;
} hydro;
struct {
/* Task receiving gpart data. */
struct task *recv;
......
......@@ -2385,11 +2385,13 @@ void engine_barrier(struct engine *e) {
void engine_collect_end_of_step_recurse_hydro(struct cell *c,
const struct engine *e) {
/* Skip super-cells (Their values are already set) */
/* Skip super-cells (Their values are already set) */
if (c->timestep != NULL) return;
#ifdef WITH_MPI
if (c->timestep != NULL || c->mpi.hydro.recv_ti != NULL) return;
struct link *l = c->mpi.recv;
while (l != NULL && l->t->subtype != task_subtype_tend_part) l = l->next;
if (l != NULL) return;
#else
if (c->timestep != NULL) return;
#endif /* WITH_MPI */
#ifdef SWIFT_DEBUG_CHECKS
......
......@@ -331,7 +331,7 @@ void engine_addtasks_recv_hydro(struct engine *e, struct cell *c,
engine_addlink(e, &c->mpi.recv, t_xv);
engine_addlink(e, &c->mpi.recv, t_rho);
engine_addlink(e, &c->mpi.recv, t_gradient);
c->mpi.hydro.recv_ti = t_ti;
engine_addlink(e, &c->mpi.recv, t_ti);
/* Add dependencies. */
if (c->hydro.sorts != NULL) {
......
......@@ -372,7 +372,8 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
}
/* If the foreign cell is active, we want its ti_end values. */
if (ci_active_hydro) scheduler_activate(s, ci->mpi.hydro.recv_ti);
if (ci_active_hydro)
scheduler_activate_recv(s, ci->mpi.recv, task_subtype_tend_part);
/* Is the foreign cell active and will need stuff from us? */
if (ci_active_hydro) {
......@@ -416,7 +417,8 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
}
/* If the foreign cell is active, we want its ti_end values. */
if (cj_active_hydro) scheduler_activate(s, cj->mpi.hydro.recv_ti);
if (cj_active_hydro)
scheduler_activate_recv(s, cj->mpi.recv, task_subtype_tend_part);
/* Is the foreign cell active and will need stuff from us? */
if (cj_active_hydro) {
......
......@@ -269,7 +269,6 @@ void space_rebuild_recycle_mapper(void *map_data, int num_elements,
c->mpi.tag = -1;
c->mpi.recv = NULL;
c->mpi.hydro.recv_ti = NULL;
c->mpi.grav.recv = NULL;
c->mpi.grav.recv_ti = NULL;
c->mpi.stars.recv = NULL;
......
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