From aab0b0fd590c97e6387150b7e26c83d3a80e8dd2 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Wed, 14 Feb 2018 12:11:40 +0100
Subject: [PATCH] Be more verbose about task types when the number of unlocks
 overflows.

---
 src/scheduler.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/scheduler.c b/src/scheduler.c
index 0d96368e57..a0d44cfecf 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -996,9 +996,10 @@ void scheduler_set_unlocks(struct scheduler *s) {
 #ifdef SWIFT_DEBUG_CHECKS
     /* Check that we are not overflowing */
     if (counts[s->unlock_ind[k]] < 0)
-      error("Task unlocking more than %d other tasks!",
-            (1 << (8 * sizeof(short int) - 1)) - 1);
-
+      error("Task (type=%s/%s) unlocking more than %d other tasks!",
+	    taskID_names[s->tasks[s->unlock_ind[k]].type],
+	    subtaskID_names[s->tasks[s->unlock_ind[k]].subtype],
+	    (1 << (8 * sizeof(short int) - 1)) - 1);
 #endif
   }
 
-- 
GitLab