diff --git a/src/cell.c b/src/cell.c index 47ae7ffa2b5c141ef5d021b2ac74123ad88474cc..c92ca44460659c6f0684cd07805a9ad3309ae42c 100644 --- a/src/cell.c +++ b/src/cell.c @@ -2917,6 +2917,10 @@ int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s) { struct engine *e = s->space->e; const int nodeID = e->nodeID; const int with_limiter = (e->policy & engine_policy_limiter); +#ifdef WITH_MPI + const int with_star_formation = e->policy & engine_policy_star_formation; + const int with_feedback = e->policy & engine_policy_feedback; +#endif int rebuild = 0; /* Un-skip the density tasks involved with this cell. */ @@ -3023,6 +3027,18 @@ int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s) { if (cj_active || with_limiter) scheduler_activate_send(s, cj->mpi.hydro.send_ti, ci_nodeID); + /* Propagating new star counts? */ + if (with_star_formation && with_feedback) { + if (ci_active && ci->hydro.count > 0) { + scheduler_activate_recv(s, ci->mpi.recv, task_subtype_sf_counts); + scheduler_activate_recv(s, ci->mpi.recv, task_subtype_ti); + } + if (cj_active && cj->hydro.count > 0) { + scheduler_activate_send(s, cj->mpi.send, task_subtype_sf_counts, ci_nodeID); + scheduler_activate_send(s, cj->mpi.send, task_subtype_ti, ci_nodeID); + } + } + } else if (cj_nodeID != nodeID) { /* If the local cell is active, receive data from the foreign cell. */ if (ci_active) { @@ -3066,6 +3082,18 @@ int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s) { /* If the local cell is active, send its ti_end values. */ if (ci_active || with_limiter) scheduler_activate_send(s, ci->mpi.hydro.send_ti, cj_nodeID); + + /* Propagating new star counts? */ + if (with_star_formation && with_feedback) { + if (cj_active && cj->hydro.count > 0) { + scheduler_activate_recv(s, cj->mpi.recv, task_subtype_sf_counts); + scheduler_activate_recv(s, cj->mpi.recv, task_subtype_ti); + } + if (ci_active && ci->hydro.count > 0) { + scheduler_activate_send(s, ci->mpi.send, task_subtype_sf_counts, cj_nodeID); + scheduler_activate_send(s, ci->mpi.send, task_subtype_ti, cj_nodeID); + } + } } #endif } diff --git a/src/engine_marktasks.c b/src/engine_marktasks.c index 1d44796c4e8dd4b5c6abced5142645153a819373..e38e2efc4175c4ea281634b238f39010a7d3153b 100644 --- a/src/engine_marktasks.c +++ b/src/engine_marktasks.c @@ -500,10 +500,13 @@ void engine_marktasks_mapper(void *map_data, int num_elements, if (with_star_formation && with_feedback) { if (ci_active_hydro && ci->hydro.count > 0) { scheduler_activate_recv(s, ci->mpi.recv, task_subtype_sf_counts); + scheduler_activate_recv(s, ci->mpi.recv, task_subtype_tend_spart); } if (cj_active_hydro && cj->hydro.count > 0) { scheduler_activate_send(s, cj->mpi.send, task_subtype_sf_counts, ci_nodeID); + scheduler_activate_send(s, cj->mpi.send, task_subtype_tend_spart, + ci_nodeID); } } @@ -558,10 +561,13 @@ void engine_marktasks_mapper(void *map_data, int num_elements, if (with_star_formation && with_feedback) { if (cj_active_hydro && cj->hydro.count > 0) { scheduler_activate_recv(s, cj->mpi.recv, task_subtype_sf_counts); + scheduler_activate_recv(s, cj->mpi.recv, task_subtype_tend_spart); } if (ci_active_hydro && ci->hydro.count > 0) { scheduler_activate_send(s, ci->mpi.send, task_subtype_sf_counts, cj_nodeID); + scheduler_activate_send(s, ci->mpi.send, task_subtype_tend_spart, + cj_nodeID); } } }