Changes of benchmarks regarding tilera version
authorjzhou <jzhou>
Thu, 2 Jul 2009 23:35:24 +0000 (23:35 +0000)
committerjzhou <jzhou>
Thu, 2 Jul 2009 23:35:24 +0000 (23:35 +0000)
Robust/src/Benchmarks/Scheduling/FilterBank/FilterBank.java
Robust/src/Benchmarks/Scheduling/Fractal/Fractal.java
Robust/src/Benchmarks/Scheduling/JGFMonteCarlo/JGFMonteCarloBench.java
Robust/src/Benchmarks/Scheduling/JGFMonteCarlo/RatePath.java
Robust/src/Benchmarks/Scheduling/JGFSeries/JGFSeriesBench.java
Robust/src/Benchmarks/Scheduling/JGFSeries/SeriesRunner.java
Robust/src/Benchmarks/Scheduling/workload.txt [new file with mode: 0644]

index 5c08c45f80bb26a1fe6aef3a2969d289449d19be..d8d0a14d0e87fd59aad65012c4b8f62455ac039c 100644 (file)
@@ -1,10 +1,10 @@
 task t1(StartupObject s{initialstate}) {
        //System.printString("task t1\n");
 
-       int N_sim=1200;
+       int N_sim=1200 * 6;
        int N_samp=8;
-       int N_ch=16;
-       int N_col=128;
+       int N_ch=62 * 2; //16;
+       int N_col=128 * 6;
        int i,j;
        
        for(j = 0; j < N_ch; j++) {
index 744fdbcdc9db05616703a3a3bd21d6ce2ee9e03e..75f406ebe6e34e45a2205300591cd30bc2b7fd7d 100644 (file)
@@ -3,16 +3,24 @@
 task t1(StartupObject s{initialstate}) {
     //System.printString("task t1\n");
     
-    int width = 160
-    int height = 160;
-    int group = 16;
+    int width = 62 * 15 * 2
+    int height = 62 * 16;
+    int group = 62 * 2;
 
-    int h = height / group;
+    //int h = height / group;
+       //Random rnd = new Random();
+       //int maxint = (~0x1) + 1;
+       int red   = 255;  //(int)(((float)rnd.nextInt()/maxint)*255);
+       int green = 237;  //(int)(((float)rnd.nextInt()/maxint)*255);
+       int blue  = 100;  //(int)(((float)rnd.nextInt()/maxint)*255);
     for(int i = 0; i < group; i++) {
        Fractal fratal = new Fractal(i,
                                     group,
                                     width,
-                                    height){run};
+                                    height,
+                                                        red,
+                                                        green,
+                                                        blue){run};
     }
     Image image = new Image(group){!finish};
     
@@ -62,7 +70,10 @@ public class Fractal {
     public Fractal(int index,
                   int group,
                   int width, 
-                  int height) {
+                  int height,
+                          int red,
+                          int green,
+                          int blue) {
        this.id = index;
        this.group = group;
        this.AppletWidth = width;
@@ -74,9 +85,9 @@ public class Fractal {
        this.alen = (float)3.0;//this.amax - this.amin;
        this.blen = (float)3.0;//this.bmax - this.bmin;
        this.alpha = 0xff;
-       this.red = 0xff;
-       this.green = 0xff;
-       this.blue = 0xff;
+       this.red = red;
+       this.green = green;
+       this.blue = blue;
        this.times = 255;
        int length = this.AppletWidth * this.AppletHeight / this.group;
        this.pixels = new int[length];
@@ -85,11 +96,6 @@ public class Fractal {
        while (incr < length) {
            ps[incr++] = this.alpha<<24 | 0x00<<16 | 0x00<<8 | 0xff;
        }
-       Random rnd = new Random();
-       int maxint = (1<<32) - 1;
-       red   = (int)(((float)rnd.nextInt()/maxint)*255);
-       green = (int)(((float)rnd.nextInt()/maxint)*255);
-       blue  = (int)(((float)rnd.nextInt()/maxint)*255);
     }
 
     public void run () {
@@ -136,10 +142,10 @@ public class Fractal {
                if(iteration<=times & iteration>0) {
                    scaleda=(int)((a - amin)*appletWidth/(amax - amin));
                    scaledb=(int)((b - bmin)*appletHeight/(bmax - bmin));
-                   int index = (scaledb * appletWidth + scaleda - id) / group;
-                   if(index < length) {
+                   int index = ((scaledb - id) / group) * appletWidth + scaleda;  //(scaledb * appletWidth + scaleda - id) / group;
+                   //if(index < length) {
                        ps[index] = alpha<<24 | red<<16 | iteration<<8 | blue;
-                   }
+                   //}
                }
            }
        }
index b4d71b64111748b07d9901acde0bd12b9f65562e..1d6cb0de67fc5c1adc6a428a666a5c4f4c1ebd11 100644 (file)
@@ -24,8 +24,8 @@ task t1(StartupObject s{initialstate}) {
     //System.printString("task t1\n");
     
     int datasize = 1000;  //should be times of 2
-    int nruns = 16 * 16;
-    int group = 16;
+    int nruns = 62 * 7 * 2;  //16 * 16;
+    int group = 62 * 2; // 16;
     
     AppDemo ad = new AppDemo(datasize, nruns, group){merge};
     
index cad1bd6a145f0122086b51b1aeb4c937da0cba39..a18046fdeb8e3ad8ae7ce882dbdb479f39a16b06 100644 (file)
@@ -30,7 +30,7 @@
  * </ol>
  *
  * @author H W Yau
- * @version $Revision: 1.2 $ $Date: 2009/02/13 21:37:19 $
+ * @version $Revision: 1.3 $ $Date: 2009/07/02 23:35:24 $
  */
 public class RatePath extends PathId {
 
@@ -365,7 +365,7 @@ public class RatePath extends PathId {
        // Now create an array to store the rates data.
        int minimumdate = MINIMUMDATE;
        float epsilon = EPSILON;
-       int nLines = 200;
+       int nLines = 1000; //200;
        int year = 88;
        int month = 10;
        int day = 3;
@@ -389,8 +389,8 @@ public class RatePath extends PathId {
        /*for(int di = 0; di < 9; di++) {
            aDate = aDate * 10 + (int)date[di];
        }*/
-       for(int k = 0; k < 40; k++ ) {
-           for(int j = 0; j < 5; j++) {
+       for(int k = 0; k < 20; /*40;*/ k++ ) {
+           for(int j = 0; j < 50; /*5;*/ j++) {
                /*String date = "19"+String.valueOf(year);
                if(month < 10) {
                    date += "0";
index adb5e0cec0f932ad312cc0fe2ebcd6f541223c8b..ff6941c13d90b4281924283d2e1291b29af20b95 100644 (file)
 task t1(StartupObject s{initialstate}) {
     //System.printString("task t1\n");
     
-    int datasize = 16;
-    for(int i = 0; i < datasize; ++i) {
-       SeriesRunner sr = new SeriesRunner(i){!finish};
+    int datasize = 62 * 2000;
+       int threadnum = 62;
+       int range = datasize / threadnum;
+    for(int i = 0; i < threadnum; ++i) {
+       SeriesRunner sr = new SeriesRunner(i, range){!finish};
     }
-    
+
     taskexit(s{!initialstate});
 }
 
index ec8513b61c42b5e2ba76b110c227764248524e3a..84fa5036ce3a62b74806d0c22ef1e4167fafe4df 100644 (file)
@@ -38,46 +38,53 @@ public class SeriesRunner {
     flag finish;
 
     int id;
+       int range;
 
-    public SeriesRunner(int id){
+    public SeriesRunner(int id, int range){
        this.id=id;
+       this.range = range;
     }
 
     public void run() {
-       float pair[] = new float[2];
+       float pair[][] = new float[2][range];
        // Calculate the fourier series. Begin by calculating A[0].
        if (id==0) {
-           pair[0] = TrapezoidIntegrate((float)0.0, //Lower bound.
+           pair[0][0] = TrapezoidIntegrate((float)0.0, //Lower bound.
                                         (float)2.0, // Upper bound.
                                         1000,        // # of steps.
                                         (float)0.0, // No omega*n needed.
                                         0) / (float)2.0; // 0 = term A[0].
-           pair[1] = 0;
-       } else {
-           // Calculate the fundamental frequency.
-           // ( 2 * pi ) / period...and since the period
-           // is 2, omega is simply pi.
-           float omega = (float) 3.1415926535897932; // Fundamental frequency.
-
+           pair[1][0] = 0;
+       } 
+       // Calculate the fundamental frequency.
+       // ( 2 * pi ) / period...and since the period
+       // is 2, omega is simply pi.
+       float omega = (float) 3.1415926535897932; // Fundamental frequency.
+
+       int ilow = id*range;
+       if(id==0) ilow += 1;
+       int iupper = (id+1)*range;
+       for(int i = ilow; i < iupper; i++) {
+               int j = i-id*range;
            // Calculate A[i] terms. Note, once again, that we
            // can ignore the 2/period term outside the integral
            // since the period is 2 and the term cancels itself
            // out.
-           pair[0] = TrapezoidIntegrate((float)0.0,
+           pair[0][j] = TrapezoidIntegrate((float)0.0,
                                         (float)2.0,
                                         1000,
-                                        omega * (float)id
+                                        omega * (float)i, 
                                         1);                       // 1 = cosine term.
            // Calculate the B[i] terms.
-           pair[1] = TrapezoidIntegrate((float)0.0,
+           pair[1][j] = TrapezoidIntegrate((float)0.0,
                                         (float)2.0,
                                         1000,
-                                        omega * (float)id,
+                                        omega * (float)i,
                                         2);                       // 2 = sine term.
        }
 
        // validate
-       if(id < 4) {
+       if(id == 0) {
            float ref[][] = new float[4][2];
            ref[0][0] = (float)2.87290112;
            ref[0][1] = (float)0.0;
@@ -87,19 +94,21 @@ public class SeriesRunner {
            ref[2][1] = (float)-1.16458096;
            ref[3][0] = (float)0.15222694;
            ref[3][1] = (float)-0.81435320;
-           for (int j = 0; j < 2; j++){
-               float error = Math.abs(pair[j] - ref[id][j]);
-               if (error > 1.0e-7 ){
-                       //System.printI(0xa7);
-                   //System.printString("Validation failed for coefficient " + j + "," + id + "\n");
-                   //System.printString("Computed value = " + (int)(pair[j]*100000000) + "\n");
-                   //System.printString("Reference value = " + (int)(ref[id][j]*100000000) + "\n");
-                       //System.printI((int)(pair[j]*10000));
-                       //System.printI((int)(ref[id][j]*10000));
+               for(int i = 0; i < 4; i++) {
+                       for (int j = 0; j < 2; j++){
+                               float error = Math.abs(pair[j][i] - ref[i][j]);
+                               if (error > 1.0e-7 ){
+                                       //System.printI(0xa7);
+                                       //System.printString("Validation failed for coefficient " + j + "," + id + "\n");
+                                       //System.printString("Computed value = " + (int)(pair[j]*100000000) + "\n");
+                                       //System.printString("Reference value = " + (int)(ref[id][j]*100000000) + "\n");
+                                       //System.printI((int)(pair[j]*10000));
+                                       //System.printI((int)(ref[id][j]*10000));
+                               }
+                       }
                }
-           }
-       }
     }
+       }
 
     /*
      * TrapezoidIntegrate
diff --git a/Robust/src/Benchmarks/Scheduling/workload.txt b/Robust/src/Benchmarks/Scheduling/workload.txt
new file mode 100644 (file)
index 0000000..9b563e5
--- /dev/null
@@ -0,0 +1,105 @@
+JGFSeries:
+       Single:
+               task t1(StartupObject s{initialstate}) {
+                   //System.printString("task t1\n");
+    
+                   int datasize = 62*2000;
+                   int threadnum = 62;
+                   ...
+               }
+
+       Double:
+               task t1(StartupObject s{initialstate}) {
+                   //System.printString("task t1\n");
+    
+                   int datasize = 62*2000 *2;
+                   int threadnum = 62 * 2;
+                   ...
+               }
+
+
+FilterBank:
+       Single:
+               task t1(StartupObject s{initialstate}) {
+                       //System.printString("task t1\n");
+
+                       int N_sim=1200 * 6;
+                       int N_samp=8;
+                       int N_ch=62; 
+                       int N_col=128 * 6;
+                       ...
+               }
+
+
+       Double:
+               task t1(StartupObject s{initialstate}) {
+                       //System.printString("task t1\n");
+
+                       int N_sim=1200 * 6;
+                       int N_samp=8;
+                       int N_ch=62 * 2; 
+                       int N_col=128 * 6;
+                       ...
+               }
+
+
+Fractal:
+       Single:
+               task t1(StartupObject s{initialstate}) {
+                  //System.printString("task t1\n");
+    
+                   int width = 62 * 15; 
+                   int height = 62 * 17;
+                   int group = 62;
+                   ...
+               }
+
+       Double:
+               task t1(StartupObject s{initialstate}) {
+                  //System.printString("task t1\n");
+    
+                   int width = 62 * 15 * 2; 
+                   int height = 62 * 17;
+                   int group = 62 * 2;
+                   ...
+               }
+
+JGFMonteCarlo:
+       Single:
+               task t1(StartupObject s{initialstate}) {
+                   //System.printString("task t1\n");
+    
+                   int datasize = 1000;  //should be times of 2
+                   int nruns = 62 * 7 ; 
+                   int group = 62; 
+                   ...
+               }
+               
+               in RatePath.java
+               private void readRatesFile(){
+                       //
+                       // Now create an array to store the rates data.
+                       ...
+                       int nLines = 1000; 
+                       ...
+               }
+
+       Double:
+               task t1(StartupObject s{initialstate}) {
+                   //System.printString("task t1\n");
+    
+                   int datasize = 1000;  //should be times of 2
+                   int nruns = 62 * 14 ; 
+                   int group = 62 * 2; 
+                   ...
+               }
+               
+               in RatePath.java
+               private void readRatesFile(){
+                       //
+                       // Now create an array to store the rates data.
+                       ...
+                       int nLines = 1000; 
+                       ...
+               }