diff --git a/src/engine_maketasks.c b/src/engine_maketasks.c index 35f161f92c1d15d835a78bfae83f7e64da974f57..54a73513935cbd73db7362711bd992e669cbe7ca 100644 --- a/src/engine_maketasks.c +++ b/src/engine_maketasks.c @@ -486,7 +486,7 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) { } else { scheduler_addunlock(s, c->kick2, c->timestep); } - + scheduler_addunlock(s, c->timestep, c->kick1); #if defined(WITH_LOGGER) @@ -498,8 +498,8 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) { /* Recurse. */ if (c->split) for (int k = 0; k < 8; k++) - if (c->progeny[k] != NULL) - engine_make_hierarchical_tasks_common(e, c->progeny[k]); + if (c->progeny[k] != NULL) + engine_make_hierarchical_tasks_common(e, c->progeny[k]); } } @@ -572,7 +572,7 @@ void engine_make_hierarchical_tasks_gravity(struct engine *e, struct cell *c) { } /* We are below the super-cell but not below the maximal splitting depth */ - else if ((c->grav.super != NULL) && + else if ((c->grav.super != NULL) && ((c->maxdepth - c->depth) >= space_subdepth_diff_grav)) { /* Local tasks only... */ @@ -581,7 +581,7 @@ void engine_make_hierarchical_tasks_gravity(struct engine *e, struct cell *c) { if (is_self_gravity) { c->grav.drift_out = scheduler_addtask(s, task_type_drift_gpart_out, - task_subtype_none, 0, 1, c, NULL); + task_subtype_none, 0, 1, c, NULL); c->grav.init_out = scheduler_addtask(s, task_type_init_grav_out, task_subtype_none, 0, 1, c, NULL); @@ -1169,9 +1169,8 @@ void engine_link_gravity_tasks(struct engine *e) { /* drift ---+-> gravity --> grav_down */ /* init --/ */ - if (ci_parent != cj_parent) { /* Avoid double unlock */ - scheduler_addunlock(sched, cj_parent->grav.drift_out, t); + scheduler_addunlock(sched, cj_parent->grav.drift_out, t); scheduler_addunlock(sched, cj_parent->grav.init_out, t); scheduler_addunlock(sched, t, cj_parent->grav.down_in); } @@ -1219,9 +1218,8 @@ void engine_link_gravity_tasks(struct engine *e) { /* drift ---+-> gravity --> grav_down */ /* init --/ */ - if (ci_parent != cj_parent) { /* Avoid double unlock */ - scheduler_addunlock(sched, cj_parent->grav.drift_out, t); + scheduler_addunlock(sched, cj_parent->grav.drift_out, t); scheduler_addunlock(sched, cj_parent->grav.init_out, t); scheduler_addunlock(sched, t, cj_parent->grav.down_in); } diff --git a/src/space.c b/src/space.c index 19cf1e40801c804e33594a688aa99b9d77200cfc..983e1d2a933f717ca446300ae04b94e53c092262 100644 --- a/src/space.c +++ b/src/space.c @@ -505,14 +505,14 @@ void space_regrid(struct space *s, int verbose) { c->grav.ti_old_multipole = ti_current; #ifdef WITH_MPI c->mpi.tag = -1; - c->mpi.hydro.recv_xv = NULL; - c->mpi.hydro.recv_rho = NULL; - c->mpi.hydro.recv_gradient = NULL; - c->mpi.hydro.send_xv = NULL; - c->mpi.hydro.send_rho = NULL; - c->mpi.hydro.send_gradient = NULL; - c->mpi.grav.recv = NULL; - c->mpi.grav.send = NULL; + c->mpi.hydro.recv_xv = NULL; + c->mpi.hydro.recv_rho = NULL; + c->mpi.hydro.recv_gradient = NULL; + c->mpi.hydro.send_xv = NULL; + c->mpi.hydro.send_rho = NULL; + c->mpi.hydro.send_gradient = NULL; + c->mpi.grav.recv = NULL; + c->mpi.grav.send = NULL; #endif // WITH_MPI if (s->gravity) c->grav.multipole = &s->multipoles_top[cid]; #ifdef SWIFT_DEBUG_CHECKS diff --git a/src/task.c b/src/task.c index 1665672febef17cf052d1e68317c5a47599509d7..9d4be3aaa5aaa074b19f7a22bddab99629ef9085 100644 --- a/src/task.c +++ b/src/task.c @@ -411,8 +411,10 @@ int task_lock(struct task *t) { char buff[MPI_MAX_ERROR_STRING]; int len; MPI_Error_string(err, buff, &len); - error("Failed to test request on send/recv task (type=%s/%s tag=%lld, %s).", - taskID_names[t->type], subtaskID_names[t->subtype], t->flags, buff); + error( + "Failed to test request on send/recv task (type=%s/%s tag=%lld, " + "%s).", + taskID_names[t->type], subtaskID_names[t->subtype], t->flags, buff); } return res; #else