From: jzhou Date: Thu, 21 Jul 2011 02:38:06 +0000 (+0000) Subject: fix benchmarks X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b5acfc762d54f59345a31c777027da4dde67f638;p=IRC.git fix benchmarks --- diff --git a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/Fibheaps/TestRunner.p b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/Fibheaps/TestRunner.p index d5edbeea..fb7562b5 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/Fibheaps/TestRunner.p +++ b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/Fibheaps/TestRunner.p @@ -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(); } } } diff --git a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/GCBench/TestRunner.p b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/GCBench/TestRunner.p index d9028ea9..5b43e1af 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/GCBench/TestRunner.p +++ b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/GCBench/TestRunner.p @@ -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 diff --git a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/JGFMonteCarlo/AppDemoRunner.p b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/JGFMonteCarlo/AppDemoRunner.p index e761afab..da81cfe0 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/JGFMonteCarlo/AppDemoRunner.p +++ b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/JGFMonteCarlo/AppDemoRunner.p @@ -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(); } } } diff --git a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/MTree/TestRunner.p b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/MTree/TestRunner.p index be5f2d4b..49953c6c 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/MTree/TestRunner.p +++ b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/MTree/TestRunner.p @@ -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(); } } } diff --git a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/bh/TestRunner.p b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/bh/TestRunner.p index 9db00d0e..8aaf72b1 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/bh/TestRunner.p +++ b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/bh/TestRunner.p @@ -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(); } } } diff --git a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/lcss/TestRunner.p b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/lcss/TestRunner.p index 894b9117..fd741711 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/lcss/TestRunner.p +++ b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/lcss/TestRunner.p @@ -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(); } } } diff --git a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/tsp/TestRunner.p b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/tsp/TestRunner.p index 7f0bff1d..3bfcac9a 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/tsp/TestRunner.p +++ b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/tsp/TestRunner.p @@ -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(); } } } diff --git a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/voronoi/TestRunner.p b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/voronoi/TestRunner.p index 8d2f3871..e3b00c4f 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/voronoi/TestRunner.p +++ b/Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/voronoi/TestRunner.p @@ -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(); } } }