From d8667edcde1ef35309af97aa76cac15e361708e8 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Sun, 31 Mar 2019 17:54:58 +0200 Subject: [PATCH] When debugging checks are on, clear the task_executed counters at all levels, not just at the top. --- src/cell.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cell.c b/src/cell.c index f8722eccc5..f95c802e5f 100644 --- a/src/cell.c +++ b/src/cell.c @@ -1600,6 +1600,8 @@ void cell_reset_task_counters(struct cell *c) { #ifdef SWIFT_DEBUG_CHECKS for (int t = 0; t < task_type_count; ++t) c->tasks_executed[t] = 0; for (int t = 0; t < task_subtype_count; ++t) c->subtasks_executed[t] = 0; + for (int k = 0; k < 8; ++k) + if (c->progeny[k] != NULL) cell_reset_task_counters(c->progeny[k]); #else error("Calling debugging code without debugging flag activated."); #endif -- GitLab