From adc691838c776e5eea39100f68e41d2c974bfbe0 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Wed, 24 Jun 2020 17:26:20 +0200 Subject: [PATCH] Prevent the user (me) from being stupid by forbidding negative ranges for the task plots --- tools/task_plots/plot_tasks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/task_plots/plot_tasks.py b/tools/task_plots/plot_tasks.py index b0b9f0e511..6458b238bf 100755 --- a/tools/task_plots/plot_tasks.py +++ b/tools/task_plots/plot_tasks.py @@ -410,6 +410,9 @@ print(("# Number of threads:", nthread)) sdata = data[data[:, ticcol] != 0] sdata = sdata[sdata[:, toccol] != 0] +if delta_t < 0.: + print("The time-range must be >=0!") + return 1 # Each rank can have different clocks (compute node), but we want to use the # same delta times range for comparisons, so we suck it up and take the hit of # precalculating this, unless the user knows better. -- GitLab