From e10095033ee64ec08b0cd7728f20b75fbb1aba16 Mon Sep 17 00:00:00 2001 From: jihoonl Date: Thu, 15 Apr 2010 03:20:06 +0000 Subject: [PATCH] fixed --- .../Recovery/MatrixMultiply/recovery/MatrixMultiply.java | 4 +++- .../Benchmarks/Recovery/MatrixMultiply/recovery/Worker.java | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Robust/src/Benchmarks/Recovery/MatrixMultiply/recovery/MatrixMultiply.java b/Robust/src/Benchmarks/Recovery/MatrixMultiply/recovery/MatrixMultiply.java index 25c8d328..58f1e15f 100644 --- a/Robust/src/Benchmarks/Recovery/MatrixMultiply/recovery/MatrixMultiply.java +++ b/Robust/src/Benchmarks/Recovery/MatrixMultiply/recovery/MatrixMultiply.java @@ -115,7 +115,8 @@ public class MatrixMultiply extends Task { ts = global new TaskSet(NUM_THREADS); for( i = 0; i< NUM_THREADS; i++) { - ts.threads[i] = global new Worker(ts); +// ts.threads[i] = global new Worker(ts); + ts.threads[i] = global new Worker(ts,i); } } @@ -139,6 +140,7 @@ public class MatrixMultiply extends Task { //long st = System.currentTimeMillis(); //long fi; + System.out.println("Starting threads..."); Worker tmp; for (i = 0; i < NUM_THREADS; i++) { atomic { diff --git a/Robust/src/Benchmarks/Recovery/MatrixMultiply/recovery/Worker.java b/Robust/src/Benchmarks/Recovery/MatrixMultiply/recovery/Worker.java index 287704db..f021f3a3 100644 --- a/Robust/src/Benchmarks/Recovery/MatrixMultiply/recovery/Worker.java +++ b/Robust/src/Benchmarks/Recovery/MatrixMultiply/recovery/Worker.java @@ -2,8 +2,9 @@ public class Worker extends Thread { TaskSet tasks; Task workingtask; - Worker(TaskSet tasks) { + Worker(TaskSet tasks,int mid) { this.tasks = tasks; + this.mid = mid; } public void run() { @@ -11,6 +12,8 @@ public class Worker extends Thread { long fi = 0; boolean notdone=true; + System.out.println("Starts"); + while(notdone) { Task t=null; atomic { -- 2.34.1