From 6244a77627e9610dfc7a29b649fb47ee58ce04e8 Mon Sep 17 00:00:00 2001 From: Pedro Gonnet <gonnet@google.com> Date: Tue, 25 Oct 2016 23:01:32 +0200 Subject: [PATCH] only dump tasks if SWIFT_DEBUG_TASKS is set. --- examples/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/main.c b/examples/main.c index 06efe75b32..912621dac0 100644 --- a/examples/main.c +++ b/examples/main.c @@ -549,6 +549,7 @@ int main(int argc, char *argv[]) { /* Take a step. */ engine_step(&e); +#ifdef SWIFT_DEBUG_TASKS /* Dump the task data using the given frequency. */ if (dump_tasks && (dump_tasks == 1 || j % dump_tasks == 1)) { #ifdef WITH_MPI @@ -604,7 +605,7 @@ int main(int argc, char *argv[]) { MPI_Barrier(MPI_COMM_WORLD); } -#else +#elif char dumpfile[30]; snprintf(dumpfile, 30, "thread_info-step%d.dat", j + 1); FILE *file_thread; @@ -626,8 +627,9 @@ int main(int argc, char *argv[]) { } } fclose(file_thread); -#endif +#endif // WITH_MPI } +#endif // SWIFT_DEBUG_TASKS } /* Print the values of the runner histogram. */ -- GitLab