diff --git a/src/engine_maketasks.c b/src/engine_maketasks.c index 630486710c4f2189d9facfdb75ae91bb170abbc8..38e9a0275f610f2c6ab5065cfac35a1e5ba758da 100644 --- a/src/engine_maketasks.c +++ b/src/engine_maketasks.c @@ -1436,8 +1436,10 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, t_limiter, t->ci, with_cooling, with_limiter); scheduler_addunlock(sched, t_force, t->ci->super->end_force); - if (with_limiter) scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); + if (with_limiter) + scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); #else /* Start by constructing the task for the second hydro loop */ @@ -1457,8 +1459,10 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, engine_make_hydro_loops_dependencies(sched, t, t_force, t_limiter, t->ci, with_cooling, with_limiter); scheduler_addunlock(sched, t_force, t->ci->super->end_force); - if (with_limiter) scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); + if (with_limiter) + scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); #endif } @@ -1502,9 +1506,12 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, t_limiter, t->ci, with_cooling, with_limiter); scheduler_addunlock(sched, t_force, t->ci->super->end_force); - if (with_limiter) scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->ci->super->timestep_limiter); + if (with_limiter) + scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->ci->super->timestep_limiter); } if (t->cj->nodeID == nodeID) { if (t->ci->hydro.super != t->cj->hydro.super) { @@ -1515,9 +1522,13 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, if (t->ci->super != t->cj->super) { scheduler_addunlock(sched, t_force, t->cj->super->end_force); - if (with_limiter) scheduler_addunlock(sched, t->cj->super->kick2, t_limiter); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->cj->super->timestep); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->cj->super->timestep_limiter); + if (with_limiter) + scheduler_addunlock(sched, t->cj->super->kick2, t_limiter); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->cj->super->timestep); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, + t->cj->super->timestep_limiter); } } @@ -1544,9 +1555,12 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, engine_make_hydro_loops_dependencies(sched, t, t_force, t_limiter, t->ci, with_cooling, with_limiter); scheduler_addunlock(sched, t_force, t->ci->super->end_force); - if (with_limiter) scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->ci->super->timestep_limiter); + if (with_limiter) + scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->ci->super->timestep_limiter); } if (t->cj->nodeID == nodeID) { if (t->ci->hydro.super != t->cj->hydro.super) { @@ -1556,9 +1570,13 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, if (t->ci->super != t->cj->super) { scheduler_addunlock(sched, t_force, t->cj->super->end_force); - if (with_limiter) scheduler_addunlock(sched, t->cj->super->kick2, t_limiter); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->cj->super->timestep); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->cj->super->timestep_limiter); + if (with_limiter) + scheduler_addunlock(sched, t->cj->super->kick2, t_limiter); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->cj->super->timestep); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, + t->cj->super->timestep_limiter); } } @@ -1601,9 +1619,12 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, t_limiter, t->ci, with_cooling, with_limiter); scheduler_addunlock(sched, t_force, t->ci->super->end_force); - if (with_limiter) scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->ci->super->timestep_limiter); + if (with_limiter) + scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->ci->super->timestep_limiter); } #else @@ -1627,9 +1648,12 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, engine_make_hydro_loops_dependencies(sched, t, t_force, t_limiter, t->ci, with_cooling, with_limiter); scheduler_addunlock(sched, t_force, t->ci->super->end_force); - if (with_limiter) scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->ci->super->timestep_limiter); + if (with_limiter) + scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->ci->super->timestep_limiter); } #endif } @@ -1678,9 +1702,12 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, t_limiter, t->ci, with_cooling, with_limiter); scheduler_addunlock(sched, t_force, t->ci->super->end_force); - if (with_limiter) scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->ci->super->timestep_limiter); + if (with_limiter) + scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->ci->super->timestep_limiter); } if (t->cj->nodeID == nodeID) { if (t->ci->hydro.super != t->cj->hydro.super) { @@ -1691,9 +1718,13 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, if (t->ci->super != t->cj->super) { scheduler_addunlock(sched, t_force, t->cj->super->end_force); - if (with_limiter) scheduler_addunlock(sched, t->cj->super->kick2, t_limiter); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->cj->super->timestep); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->cj->super->timestep_limiter); + if (with_limiter) + scheduler_addunlock(sched, t->cj->super->kick2, t_limiter); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->cj->super->timestep); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, + t->cj->super->timestep_limiter); } } @@ -1721,9 +1752,12 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, t->ci, with_cooling, with_limiter); scheduler_addunlock(sched, t_force, t->ci->super->end_force); - if (with_limiter) scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->ci->super->timestep_limiter); + if (with_limiter) + scheduler_addunlock(sched, t->ci->super->kick2, t_limiter); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->ci->super->timestep); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->ci->super->timestep_limiter); } if (t->cj->nodeID == nodeID) { if (t->ci->hydro.super != t->cj->hydro.super) { @@ -1733,9 +1767,13 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, if (t->ci->super != t->cj->super) { scheduler_addunlock(sched, t_force, t->cj->super->end_force); - if (with_limiter) scheduler_addunlock(sched, t->cj->super->kick2, t_limiter); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->cj->super->timestep); - if (with_limiter) scheduler_addunlock(sched, t_limiter, t->cj->super->timestep_limiter); + if (with_limiter) + scheduler_addunlock(sched, t->cj->super->kick2, t_limiter); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, t->cj->super->timestep); + if (with_limiter) + scheduler_addunlock(sched, t_limiter, + t->cj->super->timestep_limiter); } } #endif diff --git a/src/runner.c b/src/runner.c index 8bd8fa32528ec8426780657cbf5e6178dc422c9a..1fb616bc8f434132f745f4e411f99c21b2cc941f 100644 --- a/src/runner.c +++ b/src/runner.c @@ -2403,7 +2403,7 @@ void runner_do_limiter(struct runner *r, struct cell *c, int force, int timer) { /* Avoid inhibited particles */ if (part_is_inhibited(p, e)) continue; - + /* If the particle will be active no need to wake it up */ if (part_is_active(p, e) && p->wakeup != time_bin_not_awake) p->wakeup = time_bin_not_awake; diff --git a/src/space.c b/src/space.c index 8b2b9b500820a36f4e63c5c8633ce692118121e8..69d8fe95bda2b4f1a34c8192389a00fe1b5c1b56 100644 --- a/src/space.c +++ b/src/space.c @@ -4288,7 +4288,7 @@ void space_check_limiter_mapper(void *map_data, int nr_parts, for (int k = 0; k < nr_parts; k++) { if (parts[k].time_bin == time_bin_inhibited) continue; - + if (parts[k].wakeup == time_bin_awake) error("Particle still woken up! id=%lld", parts[k].id);