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();
}
}
}
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
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();
}
}
}
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();
}
}
}
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();
}
}
}
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();
}
}
}
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();
}
}
}
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();
}
}
}