From fd08d3bd04f555491c4dc00f9a9ce71519b62ef2 Mon Sep 17 00:00:00 2001
From: d74ksy <aidan.chalk@durham.ac.uk>
Date: Wed, 4 Nov 2015 10:07:26 +0000
Subject: [PATCH] Fixed a bug in the dependencies in the QR. Task plots now
 look like the correct task ordering is followed, scaling is still good

---
 examples/test_qr_mpi.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/examples/test_qr_mpi.c b/examples/test_qr_mpi.c
index 7fed164..90af771 100644
--- a/examples/test_qr_mpi.c
+++ b/examples/test_qr_mpi.c
@@ -40,7 +40,7 @@
 #include "quicksched.h"
 #include "res.h"
 
-#define TASK_TIMERS
+#define NO_TASK_TIMERS
 
 #ifdef WITH_CBLAS
 /**
@@ -516,7 +516,9 @@ if(MpiThreadLevel != MPI_THREAD_MULTIPLE)
     long long int* idata = (long long int*)data;
 //    int i = idata[0], j = idata[1], k = idata[2];
     long long int i, j , a , t;
+#ifdef TASK_TIMERS
     long long int tid = -1;
+#endif
     /* Need to pull the resources.*/
 
     /* Decode and execute the task. */
@@ -577,6 +579,18 @@ if(MpiThreadLevel != MPI_THREAD_MULTIPLE)
     }
     #ifdef TASK_TIMERS
     if(type > 0){
+
+        /*if(kk == 0)
+        {
+            if(type == task_DGEQRF)
+                printf("Ran DGEQRF with k = %lli\n", kk);
+            else if (type == task_DLARFT)
+                printf("Ran DLARFT with k = %lli, j = %lli, i = %lli\n", kk ,jj ,ii);
+            else if (type == task_DTSQRF)
+                printf("Ran DTSQRF with k = %lli, j = %lli, i = %lli\n", kk, jj, ii);
+            else if (type == task_DSSRFT)
+                printf("Ran DSSRFT with k = %lli, j = %lli, i = %lli\n", kk, jj, ii);
+        }*/
         toc_run = getticks();
         task_start[tid] = tic;
         task_finish[tid] = toc_run;
@@ -748,7 +762,8 @@ if(s.rank == 0) {
         qsched_adduse(&s, tid_new, rid[k * m + i]);
         qsched_addlock(&s, tid_new, rid[j * m + k]);
         qsched_adduse(&s, tid_new, tau_id[k*m+i]);
-        // qsched_addunlock(&s, tid[k * m + i], tid_new);
+        
+        qsched_addunlock(&s, tid[k * m + i], tid_new);
         qsched_addunlock(&s, tid[j * m + i - 1], tid_new);
         if (tid[j * m + i] != -1) qsched_addunlock(&s, tid[j * m + i], tid_new);
 
-- 
GitLab