From 3b4fe40789015c998688e7a88588691926f623dd Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Tue, 23 Jun 2020 17:48:29 +0200 Subject: [PATCH] Make the code abort if --dump-tasks-threshold is used without --enable-task-debugging passed at configure time --- examples/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/main.c b/examples/main.c index 4ac3b55aa8..dac0786e8d 100644 --- a/examples/main.c +++ b/examples/main.c @@ -406,6 +406,16 @@ int main(int argc, char *argv[]) { } #endif + if (dump_tasks_threshold > 0.f) { +#ifndef SWIFT_DEBUG_TASKS + if (myrank == 0) { + error( + "Error: Dumping task plot data above a fixed time threshold is only " + "valid when the code is configured with --enable-task-debugging."); + } +#endif + } + #ifndef SWIFT_CELL_GRAPH if (dump_cells) { if (myrank == 0) { -- GitLab