diff --git a/configure.ac b/configure.ac index f6e2ea0db8e9829b719a0190eea7a1d891bfbbd6..8cb7fd1b3f09819b7c8b57ce5d70e3b38e32a637 100644 --- a/configure.ac +++ b/configure.ac @@ -170,6 +170,18 @@ if test "x$enable_debug" = "xyes"; then fi fi +# Check if task debugging is on. +AC_ARG_ENABLE([task-debugging], + [AS_HELP_STRING([--enable-task-debugging], + [Store task timing information and generate task dump files @<:@yes/no@:>@] + )], + [enable_task_debugging="$enableval"], + [enable_task_debugging="no"] +) +if test "$enable_task_debugging" = "yes"; then + AC_DEFINE([SWIFT_DEBUG_TASKS],1,[Enable task debugging]) +fi + # Define HAVE_POSIX_MEMALIGN if it works. AX_FUNC_POSIX_MEMALIGN @@ -533,6 +545,7 @@ AC_MSG_RESULT([ libNUMA enabled : $have_numa Using tcmalloc : $have_tcmalloc CPU profiler : $have_profiler + Task debugging : $enable_task_debugging ]) # Generate output. diff --git a/examples/main.c b/examples/main.c index 912621dac0676bef1dde4880b0bcb897a1337906..a9cfbe5feb1c00abf32f08e40647dbf1a660af8b 100644 --- a/examples/main.c +++ b/examples/main.c @@ -605,7 +605,7 @@ int main(int argc, char *argv[]) { MPI_Barrier(MPI_COMM_WORLD); } -#elif +#else char dumpfile[30]; snprintf(dumpfile, 30, "thread_info-step%d.dat", j + 1); FILE *file_thread;