bug fix: Was never starting a transaction in the run method but now it does
authoradash <adash>
Wed, 8 Apr 2009 22:33:15 +0000 (22:33 +0000)
committeradash <adash>
Wed, 8 Apr 2009 22:33:15 +0000 (22:33 +0000)
Robust/src/Benchmarks/SingleTM/LeeRouting/LeeRouter.java
Robust/src/Benchmarks/SingleTM/LeeRouting/LeeThread.java
Robust/src/Benchmarks/SingleTM/LeeRouting/WorkQueue.java
Robust/src/Benchmarks/SingleTM/LeeRouting/makefile

index d4a2f44f8d191542720b9a8e23f03debf0b319ee..e29263d5ba1c3b0fa9d5cef160181c62f2242773 100644 (file)
@@ -116,7 +116,6 @@ public class LeeRouter {
     if (TEST) GRID_SIZE = 10;
     else GRID_SIZE = 600;
     if(DEBUG) System.out.println("Creating grid...");
-    //grid = new Grid(GRID_SIZE, GRID_SIZE, 2, rel, DEBUG, OCC, EMPTY, MAX_WEIGHT); //the Lee 3D Grid;
     grid = new Grid(GRID_SIZE, GRID_SIZE, 2, rel, this); //the Lee 3D Grid;
     if(DEBUG) System.out.println("Done creating grid");
     work = new WorkQueue(); // empty
@@ -211,7 +210,6 @@ public class LeeRouter {
 
   }
 
-  //FIXME
   public WorkQueue getNextTrack() {
     //synchronized(queueLock) {
       if(work.next != null) {
@@ -221,7 +219,6 @@ public class LeeRouter {
     return null;
   }
 
-  //FIXME
   public boolean layNextTrack(WorkQueue q, int [][][]tempg) {
     // start transaction
     boolean done = false;
@@ -616,7 +613,6 @@ public class LeeRouter {
       }
       System.out.println("DEBUG: found "+found+" missing "+missing);
     }
-
   }
 
   public static void main(String [] args) {
index 59f488b6a2efeff4acdfaa27cf25e71d588dc81b..6ae1d0cb1c36dedbfbe4b55d82ff6b4cb88a9c03 100644 (file)
@@ -51,16 +51,6 @@ public class LeeThread extends Thread {
   boolean done;
   int[][][] tempg;
 
-  public LeeThread() {
-    stop = false;
-    finished = false;
-    sampleNow = false;
-    doneSample = true;
-    totalLaidTracks=0;
-    myLaidTracks=0;
-    done = true;
-  }
-
   /*
   protected static ThreadLocal<ThreadState> _threadState = new ThreadLocal<ThreadState>() {
     protected synchronized ThreadState initialValue() {
@@ -74,8 +64,15 @@ public class LeeThread extends Thread {
   };
   */
 
-
   LeeThread(LeeRouter lt) {
+    stop = false;
+    finished = false;
+    sampleNow = false;
+    doneSample = true;
+    totalLaidTracks=0;
+    myLaidTracks=0;
+    done = true;
+
     this.lt = lt;
     tempg = new int[lt.GRID_SIZE][lt.GRID_SIZE][2]; // Lee 2D Grid copy
   }
@@ -87,8 +84,8 @@ public class LeeThread extends Thread {
         doneSample = true;
         sampleNow = false;
       }
-      atomic {
-        if(done) {
+      if(done) {
+        atomic {
           t = lt.getNextTrack();
           done = false;
         }
index 616a3360763b1b95d78605c8679076a349df6460..516d39ee1e9426806c54c10643090b40e300aead 100644 (file)
@@ -83,7 +83,7 @@ public class WorkQueue {
                        ent = a;
                        a = b;
                        b = b.next;
-                       // System.out.print("#");
+            // System.out.print("#");
                }
                return done;
        }
index e4f0912f5e29b8b52d761e4c43d178e12c58e930..84b07394cb37e2ef4e8093e74e24d532a0434b62 100644 (file)
@@ -5,7 +5,7 @@ SRC=${MAINCLASS}.java \
        GridCell.java \
        LeeThread.java \
        WorkQueue.java 
-FLAGS=-singleTM -optimize -profile -mainclass ${MAINCLASS} -joptimize -debug -garbagestats -transstats
+FLAGS=-singleTM -nooptimize -profile -mainclass ${MAINCLASS} -joptimize -debug -garbagestats -transstats
 default:
        ../../../buildscript ${FLAGS} -o ${MAINCLASS} ${SRC}