fix benchmarks
authorjzhou <jzhou>
Thu, 21 Jul 2011 02:38:06 +0000 (02:38 +0000)
committerjzhou <jzhou>
Thu, 21 Jul 2011 02:38:06 +0000 (02:38 +0000)
Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/Fibheaps/TestRunner.p
Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/GCBench/TestRunner.p
Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/JGFMonteCarlo/AppDemoRunner.p
Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/MTree/TestRunner.p
Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/bh/TestRunner.p
Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/lcss/TestRunner.p
Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/tsp/TestRunner.p
Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/voronoi/TestRunner.p

index d5edbeea0b4f944797aeb60c2a3d05296ba31ef2..fb7562b5159a27eb52836fd697dda4d430c8000d 100644 (file)
@@ -61,9 +61,16 @@ public class TestRunner extends Thread {
   public static void main(String[] args) {
     int threadnum = THREADNUM;
     System.setgcprofileflag();
-    for(int i = 0; i < threadnum; ++i) {
+    TestRunner trarray[]=new TestRunner[threadnum];
+    for(int i = 1; i < threadnum; ++i) {
       TestRunner tr = new TestRunner();
       tr.start();
+      trarray[i]=tr;
+    }
+    TestRunner tr0 = new TestRunner();
+    tr0.run();
+    for(int i = 1; i < threadnum; ++i) {
+      trarray[i].join();
     }
   }
 }
index d9028ea9cf1cfce2d0f5bf7b93c5aff9416072d5..5b43e1afee977bed14f7af98f7fc3e2e6f43363b 100644 (file)
@@ -150,9 +150,16 @@ public class TestRunner extends Thread {
   public static void main(String[] args) {
     int threadnum = THREADNUM;
     System.setgcprofileflag();
-    for(int i = 0; i < threadnum; ++i) {
+    TestRunner trarray[]=new TestRunner[threadnum];
+    for(int i = 1; i < threadnum; ++i) {
       TestRunner tr = new TestRunner();
       tr.start();
+      trarray[i]=tr;
+    }
+    TestRunner tr0 = new TestRunner();
+    tr0.run();
+    for(int i = 1; i < threadnum; ++i) {
+      trarray[i].join();
     }
   }
 } // class JavaGC
index e761afab1e5edd15934d7ce8031f8c18a8ba427c..da81cfe0b3239dc69354d0b26bc9434d2a0501c2 100644 (file)
@@ -74,9 +74,16 @@ public class AppDemoRunner extends Thread {
     AppDemo ad = new AppDemo(datasize, nruns, group);
     ad.initSerial();
 
-    for(int i = 0; i < group; i++) {
+    TestRunner adrarray[]=new AppDemoRunner[group];
+    for(int i = 1; i < group; ++i) {
       AppDemoRunner adr = new AppDemoRunner(i, nruns, group, ad);
       adr.start();
+      trarray[i]=adr;
+    }
+    AppDemoRunner adr0 = new AppDemoRunner(i, nruns, group, ad);
+    adr0.start();
+    for(int i = 1; i < group; ++i) {
+      adrarray[i].join();
     }
   }
 }
index be5f2d4b2f8fc12694758bfce92163ac3d0ed227..49953c6c314b512a39467a70ff26e04d4c3cca11 100644 (file)
@@ -39,9 +39,16 @@ public class TestRunner extends Thread {
     int size = 40000;
     int nodenum = size*10;
     System.setgcprofileflag();
-    for(int i = 0; i < threadnum; ++i) {
+    TestRunner trarray[]=new TestRunner[threadnum];
+    for(int i = 1; i < threadnum; ++i) {
       TestRunner tr = new TestRunner(i, size, nodenum);
       tr.start();
+      trarray[i]=tr;
+    }
+    TestRunner tr0 = new TestRunner(0, size, nodenum);
+    tr0.run();
+    for(int i = 1; i < threadnum; ++i) {
+      trarray[i].join();
     }
   }
 }
index 9db00d0ed20fa7435c0bb50c64cb695da7fe428b..8aaf72b1ad5b0008cbdf5704a95096c7ae623d49 100644 (file)
@@ -118,9 +118,16 @@ public class TestRunner extends Thread
     int threadnum = THREADNUM;
     int nbody = 700;
     System.setgcprofileflag();
-    for(int i = 0; i < threadnum; ++i) {
+    TestRunner trarray[]=new TestRunner[threadnum];
+    for(int i = 1; i < threadnum; ++i) {
       TestRunner tr = new TestRunner(nbody);
       tr.start();
+      trarray[i]=tr;
+    }
+    TestRunner tr0 = new TestRunner(nbody);
+    tr0.run();
+    for(int i = 1; i < threadnum; ++i) {
+      trarray[i].join();
     }
   }
 }
index 894b9117a971a5b68063a3b755589c6c0f5abd97..fd74171140b2ed9cb7950eea2ec5970a585232a9 100644 (file)
@@ -241,9 +241,16 @@ public class TestRunner extends Thread {
     args[4] = 81;
     args[5] = 240;
     System.setgcprofileflag();
-    for(int i = 0; i < threadnum; ++i) {
+    TestRunner trarray[]=new TestRunner[threadnum];
+    for(int i = 1; i < threadnum; ++i) {
       TestRunner tr = new TestRunner(args);
       tr.start();
+      trarray[i]=tr;
+    }
+    TestRunner tr0 = new TestRunner(args);
+    tr0.run();
+    for(int i = 1; i < threadnum; ++i) {
+      trarray[i].join();
     }
   }
 }
index 7f0bff1d122fa0fcd3f4def9727ab72781495d9a..3bfcac9a19030f1054d206be6ebed66001a10521 100644 (file)
@@ -107,9 +107,16 @@ public class TestRunner extends Thread
     int threadnum = THREADNUM;
     int ncities = 4080*4;
     System.setgcprofileflag();
-    for(int i = 0; i < threadnum; ++i) {
+    TestRunner trarray[]=new TestRunner[threadnum];
+    for(int i = 1; i < threadnum; ++i) {
       TestRunner tr = new TestRunner(ncities);
       tr.start();
+      trarray[i]=tr;
+    }
+    TestRunner tr0 = new TestRunner(ncities);
+    tr0.run();
+    for(int i = 1; i < threadnum; ++i) {
+      trarray[i].join();
     }
   }
 }
index 8d2f3871558d9fbd71944129a0081832b8a5cea9..e3b00c4f19f81f6664228f345893748fa7f69aba 100644 (file)
@@ -47,9 +47,16 @@ public class TestRunner extends Thread
     int threadnum = THREADNUM;
     int npoints = 32000;
     System.setgcprofileflag();
-    for(int i = 0; i < threadnum; ++i) {
+    TestRunner trarray[]=new TestRunner[threadnum];
+    for(int i = 1; i < threadnum; ++i) {
       TestRunner tr = new TestRunner(npoints);
       tr.start();
+      trarray[i]=tr;
+    }
+    TestRunner tr0 = new TestRunner(npoints);
+    tr0.run();
+    for(int i = 1; i < threadnum; ++i) {
+      trarray[i].join();
     }
   }
 }