changes to build script to increase java heap memory
authoradash <adash>
Tue, 19 Aug 2008 03:21:31 +0000 (03:21 +0000)
committeradash <adash>
Tue, 19 Aug 2008 03:21:31 +0000 (03:21 +0000)
latest changes to Moldyn benchmark
decrease size of prefetch insertion queue
other small changes

15 files changed:
Robust/src/Benchmarks/Prefetch/Em3d/dsm/makefile
Robust/src/Benchmarks/Prefetch/Moldyn/dsm/JGFMolDynBench.java
Robust/src/Benchmarks/Prefetch/Moldyn/dsm/makefile
Robust/src/Benchmarks/Prefetch/SOR/dsm/makefile
Robust/src/Benchmarks/Prefetch/bm.txt
Robust/src/Benchmarks/Prefetch/run.sh
Robust/src/IR/Flat/BuildCode.java
Robust/src/IR/Tree/SemanticCheck.java
Robust/src/Runtime/DSTM/interface/addPrefetchEnhance.c
Robust/src/Runtime/DSTM/interface/addUdpEnhance.c
Robust/src/Runtime/DSTM/interface/dstm.h
Robust/src/Runtime/DSTM/interface/gCollect.c
Robust/src/Runtime/DSTM/interface/queue.c
Robust/src/Runtime/DSTM/interface/trans.c
Robust/src/buildscript

index 856233213e3a660b44fcf322bbec069e6c906836..a16163979d1ef13e8299d6e7d3db5adc940c393a 100644 (file)
@@ -13,10 +13,10 @@ SRC3=${MAINCLASS}2.java \
        Node2.java \
        EVector.java 
 
-FLAGS=-dsm -prefetch -optimize -excprefetch Em3d.main -excprefetch BiGraph.create -excprefetch Node.Node -excprefetch Node.fillTable -excprefetch Node.makeUniqueNeighbors -excprefetch Node.makeFromNodes -excprefetch Node.updateFromNodes -debug -mainclass ${MAINCLASS} -trueprob 0.91
-FLAGS1=-dsm -prefetch -dsmcaching -optimize -excprefetch Node.makeUniqueNeighbors -excprefetch EVector.ensureCapacity -excprefetch EVector.addElement -excprefetch BiGraph.makeFromNodes -excprefetch EVector.elementAt -excprefetch BiGraph.initializeNodes -excprefetch BiGraph.allocateNodes -mainclass ${MAINCLASS} -trueprob 0.91
-FLAGS2=-dsm -dsmcaching -optimize -mainclass ${MAINCLASS} -trueprob 0.91
-FLAGS3=-dsm -optimize -mainclass ${MAINCLASS}
+FLAGS=-dsm -prefetch -optimize -excprefetch Em3d.main -excprefetch BiGraph.create -excprefetch Node.Node -excprefetch Node.fillTable -excprefetch Node.makeUniqueNeighbors -excprefetch Node.makeFromNodes -excprefetch Node.updateFromNodes -debug -mainclass ${MAINCLASS} -trueprob 0.85
+FLAGS1=-dsm -prefetch -dsmcaching -optimize -excprefetch Node.makeUniqueNeighbors -excprefetch EVector.ensureCapacity -excprefetch EVector.addElement -excprefetch BiGraph.makeFromNodes -excprefetch EVector.elementAt -excprefetch BiGraph.initializeNodes -excprefetch BiGraph.allocateNodes -mainclass ${MAINCLASS} -trueprob 0.85
+FLAGS2=-dsm -dsmcaching -optimize -mainclass ${MAINCLASS} -trueprob 0.85
+FLAGS3=-dsm -optimize -mainclass ${MAINCLASS} -trueprob 0.85
 
 default:
 #      ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NP ${SRC}
index 371b2904ee99191ac549620f39b99f1d0a28403c..24fcb3edd7f5cc6f17bf44aecc883d961f79190f 100644 (file)
@@ -181,10 +181,11 @@ class mdRunner extends Thread {
   } 
 
     public void init(particle[] one, int mdsize) {
-      for (lg=0; lg<=1; lg++) {
-        for (i=0; i<mm; i++) {
-          for (j=0; j<mm; j++) {
-            for (k=0; k<mm; k++) {
+       int id=this.id;
+       for (int lg=0; lg<=1; lg++) {
+        for (int i=0; i<mm; i++) {
+          for (int j=0; j<mm; j++) {
+            for (int k=0; k<mm; k++) {
               one[ijk] = new particle((i*a+lg*a*0.5),(j*a+lg*a*0.5),(k*a),
                   xvelocity,yvelocity,zvelocity,sh_force,sh_force2,id,one);
               ijk = ijk + 1;
@@ -193,10 +194,10 @@ class mdRunner extends Thread {
         }
       }
 
-      for (lg=1; lg<=2; lg++) {
-        for (i=0; i<mm; i++) {
-          for (j=0; j<mm; j++) {
-            for (k=0; k<mm; k++) {
+      for (int lg=1; lg<=2; lg++) {
+        for (int i=0; i<mm; i++) {
+          for (int j=0; j<mm; j++) {
+            for (int k=0; k<mm; k++) {
               one[ijk] = new particle((i*a+(2-lg)*a*0.5),(j*a+(lg-1)*a*0.5),
                                      (k*a+a*0.5),xvelocity,yvelocity,zvelocity,sh_force,sh_force2,id,one);
               ijk = ijk + 1;
@@ -213,19 +214,19 @@ class mdRunner extends Thread {
       random randnum = new random(iseed,v1,v2);
       
       
-      for (i=0; i<mdsize; i+=2) {
+      for (int i=0; i<mdsize; i+=2) {
         r  = randnum.seed();
         one[i].xvelocity = r*randnum.v1;
         one[i+1].xvelocity  = r*randnum.v2;
       }
 
-      for (i=0; i<mdsize; i+=2) {
+      for (int i=0; i<mdsize; i+=2) {
         r  = randnum.seed();
         one[i].yvelocity = r*randnum.v1;
         one[i+1].yvelocity  = r*randnum.v2;
       }
 
-      for (i=0; i<mdsize; i+=2) {
+      for (int i=0; i<mdsize; i+=2) {
         r  = randnum.seed();
         one[i].zvelocity = r*randnum.v1;
         one[i+1].zvelocity  = r*randnum.v2;
@@ -237,35 +238,35 @@ class mdRunner extends Thread {
       ekin = 0.0;
       sp = 0.0;
 
-      for(i=0;i<mdsize;i++) {
+      for(int i=0;i<mdsize;i++) {
         sp = sp + one[i].xvelocity;
       }
       sp = sp / mdsize;
 
-      for(i=0;i<mdsize;i++) {
+      for(int i=0;i<mdsize;i++) {
         one[i].xvelocity = one[i].xvelocity - sp;
         ekin = ekin + one[i].xvelocity*one[i].xvelocity;
       }
 
       sp = 0.0;
-      for(i=0;i<mdsize;i++) {
+      for(int i=0;i<mdsize;i++) {
         sp = sp + one[i].yvelocity;
       }
       sp = sp / mdsize;
 
-      for(i=0;i<mdsize;i++) {
+      for(int i=0;i<mdsize;i++) {
         one[i].yvelocity = one[i].yvelocity - sp;
         ekin = ekin + one[i].yvelocity*one[i].yvelocity;
       }
 
 
       sp = 0.0;
-      for(i=0;i<mdsize;i++) {
+      for(int i=0;i<mdsize;i++) {
         sp = sp + one[i].zvelocity;
       }
       sp = sp / mdsize;
 
-      for(i=0;i<mdsize;i++) {
+      for(int i=0;i<mdsize;i++) {
         one[i].zvelocity = one[i].zvelocity - sp;
         ekin = ekin + one[i].zvelocity*one[i].zvelocity;
       }
@@ -274,7 +275,7 @@ class mdRunner extends Thread {
       sc = h * Math.sqrt(tref/ts);
 
 
-      for(i=0;i<mdsize;i++) {
+      for(int i=0;i<mdsize;i++) {
 
         one[i].xvelocity = one[i].xvelocity * sc;     
         one[i].yvelocity = one[i].yvelocity * sc;     
@@ -284,6 +285,60 @@ class mdRunner extends Thread {
 
     }
 
+    public void doinit(int mdsize) {
+       for(int j=0;j<3;j++) {
+           double[] sh=sh_force[j];
+            for (int i=0;i<mdsize;i++) {
+               sh[i] = 0.0;
+            }
+       }
+    }
+
+
+    public void doinit2(int mdsize) {
+          for(int k=0;k<3;k++) {
+             double[] sh=sh_force[k];
+             double [][] sha=sh_force2[k];
+              for(int j=0;j<nthreads;j++) {
+                 double[] sha2=sha[j];
+                 for(int i=0;i<mdsize;i++) {
+                sh[i] += sha2[i];
+              }
+            }
+          }
+         
+          for(int k=0;k<3;k++) {
+             double [][] sh1=sh_force2[k];
+              for(int j=0;j<nthreads;j++) {
+                 double[] sh2=sh1[j];
+            for(int i=0;i<mdsize;i++) {
+               
+
+                sh2[i] = 0.0;
+              }
+            }
+          }
+
+          for(int j=1;j<nthreads;j++) {
+            mymd.epot[0].d += mymd.epot[j].d;
+            mymd.vir[0].d += mymd.vir[j].d;
+          }
+          for(int j=1;j<nthreads;j++) {       
+            mymd.epot[j].d = mymd.epot[0].d;
+            mymd.vir[j].d = mymd.vir[0].d;
+          }
+          for(int j=0;j<nthreads;j++) {
+            mymd.interactions += mymd.interacts[j].i; 
+          }
+
+         for (int j=0;j<3;j++) {
+             double sh[]=sh_force[j];
+           for (int i=0;i<mdsize;i++) {
+             sh[i] = sh[i] * hsq2;
+           }
+         }
+}
+
   public void run() {
     /* Parameter determination */
     
@@ -292,7 +347,9 @@ class mdRunner extends Thread {
     int movemx=50;
     Barrier barr=new Barrier("128.195.175.79");
     particle[] one;
+    int id;
     atomic {
+       id=this.id;
       mdsize = mymd.PARTSIZE;
       one=new particle[mdsize];
       l = mymd.LENGTH;
@@ -329,7 +386,7 @@ class mdRunner extends Thread {
     for (int move=0;move<movemx;move++) {
       atomic {
         /* move the particles and update velocities */
-        for (i=0;i<mdsize;i++) {
+        for (int i=0;i<mdsize;i++) {
           one[i].domove(side,i);       
         }
       }
@@ -339,11 +396,7 @@ class mdRunner extends Thread {
 
       atomic {
         if(id==0) {
-          for(j=0;j<3;j++) {
-            for (i=0;i<mdsize;i++) {
-              sh_force[j][i] = 0.0;
-            }
-          }
+           doinit(mdsize);
         }
        
         mymd.epot[id].d = 0.0;
@@ -358,7 +411,7 @@ class mdRunner extends Thread {
       atomic {
         /* compute forces */
        
-        for (i=0+id;i<mdsize;i+=nthreads) {
+        for (int i=0+id;i<mdsize;i+=nthreads) {
           one[i].force(side,rcoff,mdsize,i,xx,yy,zz,mymd); 
         }
       }
@@ -369,39 +422,7 @@ class mdRunner extends Thread {
       /* update force arrays */
       atomic {
         if(id == 0) {
-          for(int k=0;k<3;k++) {
-            for(i=0;i<mdsize;i++) {
-              for(j=0;j<nthreads;j++) {
-                sh_force[k][i] += sh_force2[k][j][i];
-              }
-            }
-          }
-         
-          for(int k=0;k<3;k++) {
-            for(i=0;i<mdsize;i++) {
-              for(j=0;j<nthreads;j++) {
-                sh_force2[k][j][i] = 0.0;
-              }
-            }
-          }
-
-          for(j=1;j<nthreads;j++) {
-            mymd.epot[0].d += mymd.epot[j].d;
-            mymd.vir[0].d += mymd.vir[j].d;
-          }
-          for(j=1;j<nthreads;j++) {       
-            mymd.epot[j].d = mymd.epot[0].d;
-            mymd.vir[j].d = mymd.vir[0].d;
-          }
-          for(j=0;j<nthreads;j++) {
-            mymd.interactions += mymd.interacts[j].i; 
-          }
-
-         for (j=0;j<3;j++) {
-           for (i=0;i<mdsize;i++) {
-             sh_force[j][i] = sh_force[j][i] * hsq2;
-           }
-         }
+           doinit2(mdsize);
        }
       }
 
@@ -411,7 +432,7 @@ class mdRunner extends Thread {
       atomic {
         /*scale forces, update velocities */
         sum = 0.0;
-        for (i=0;i<mdsize;i++) {
+        for (int i=0;i<mdsize;i++) {
           sum = sum + one[i].mkekin(hsq2,i);  
         }
 
@@ -422,7 +443,7 @@ class mdRunner extends Thread {
 
         /* average velocity */
 
-        for (i=0;i<mdsize;i++) {
+        for (int i=0;i<mdsize;i++) {
           velt = one[i].velavg(vaverh,h);
           if(velt > vaverh) { count = count + 1.0; }
           vel = vel + velt;                    
@@ -434,7 +455,7 @@ class mdRunner extends Thread {
 
         if((move < istop) && (((move+1) % irep) == 0)) {
           sc = Math.sqrt(tref / (tscale*ekin));
-          for (i=0;i<mdsize;i++) {
+          for (int i=0;i<mdsize;i++) {
             one[i].dscal(sc,1);
           }
           ekin = tref / tscale;
@@ -455,7 +476,6 @@ class mdRunner extends Thread {
       Barrier.enterBarrier(barr);
     }
 
-    Barrier.enterBarrier(barr);
     //if (id == 0) JGFInstrumentor.stopTimer("Section3:MolDyn:Run", instr.timers);
   }
 
@@ -514,7 +534,7 @@ class particle {
     double fxi,fyi,fzi;
     double rd,rrd,rrd2,rrd3,rrd4,rrd6,rrd7,r148;
     double forcex,forcey,forcez;
-
+    int id=this.id;
     sideh = 0.5*side; 
     rcoffs = rcoff*rcoff;
 
index 00e2b1d811c51671b5de5317006e3d0b76c5693f..709f729b3b235abc9352e1b8b98581498270dc1d 100644 (file)
@@ -6,19 +6,19 @@ JGFMolDynBench.java \
 DoubleWrapper.java \
 IntWrapper.java \
 MDWrap.java
-FLAGS=-dsm -dsmcaching -prefetch -excprefetch particle.force -excprefetch particle.domove -excprefetch particle.mkekin -excprefetch TournamentBarrier.DoBarrier -excprefetch JGFMolDynBench.JGFvalidate -excprefetch JGFMolDynBench.JGFapplication -optimize -mainclass ${MAINCLASS} -o ${MAINCLASS} -trueprob 0.8
+FLAGS=-dsm -dsmcaching -prefetch -optimize -excprefetch particle.force -excprefetch particle.domove -excprefetch particle.mkekin -excprefetch TournamentBarrier.DoBarrier -excprefetch JGFMolDynBench.JGFvalidate -excprefetch JGFMolDynBench.JGFapplication -excprefetch JGFMolDynBench.JGFinitialise -excprefetch mdRunner.init -mainclass ${MAINCLASS} -o ${MAINCLASS} -trueprob 0.75
 FLAGS2=-dsm -optimize -mainclass ${MAINCLASS} -o ${MAINCLASS}NP
 
 default:
-       ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NP ${SRC}
+       ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC ${SRC}
        ../../../../buildscript ${FLAGS} -o ${MAINCLASS}P  ${SRC}
-       cp ${MAINCLASS}NP.bin ${MAINCLASS}1NP.bin
+       cp ${MAINCLASS}NPNC.bin ${MAINCLASS}1NPNC.bin
        cp ${MAINCLASS}P.bin ${MAINCLASS}1.bin
-       cp ${MAINCLASS}NP.bin ${MAINCLASS}2NP.bin
+       cp ${MAINCLASS}NPNC.bin ${MAINCLASS}2NPNC.bin
        cp ${MAINCLASS}P.bin ${MAINCLASS}2.bin
-       cp ${MAINCLASS}NP.bin ${MAINCLASS}3NP.bin
+       cp ${MAINCLASS}NPNC.bin ${MAINCLASS}3NPNC.bin
        cp ${MAINCLASS}P.bin ${MAINCLASS}3.bin
-       cp ${MAINCLASS}NP.bin ${MAINCLASS}4NP.bin
+       cp ${MAINCLASS}NPNC.bin ${MAINCLASS}4NPNC.bin
        cp ${MAINCLASS}P.bin ${MAINCLASS}4.bin
 
 clean:
index 8c048ac2238cfa71910070ce0d2878489ba0cff8..d879e9438060a3896f4ce8a05b38f5c00fa46175 100644 (file)
@@ -7,7 +7,7 @@ SRC=${MAINCLASS}.java \
        JGFTimer.java \
        SORRunner.java \
        SORWrap.java
-FLAGS=-dsm -prefetch -dsmcaching -optimize -excprefetch JGFSORBench.JGFSORBench -excprefetch JGFSORBenchSizeA.main -excprefetch JGFSORBench.RandomMatrix -excprefetch JGFSORBench.init_sync -excprefetch JGFSORBench.JGFkernel -mainclass ${MAINCLASS} -trueprob 0.73
+FLAGS=-dsm -prefetch -dsmcaching -optimize -excprefetch JGFSORBench.JGFSORBench -excprefetch JGFSORBenchSizeA.main -excprefetch JGFSORBench.RandomMatrix -excprefetch JGFSORBench.init_sync -excprefetch JGFSORBench.JGFkernel -mainclass ${MAINCLASS} -trueprob 0.72
 FLAGS1=-dsm -dsmcaching -optimize -mainclass ${MAINCLASS} 
 FLAGS2=-dsm -optimize -mainclass ${MAINCLASS}
 
index 8c9249a46ae3abba41b6ea747dff9ce6a1a14348..97b4bae65a1d564f525ec59000e285acc0ef4fd3 100644 (file)
@@ -6,6 +6,17 @@ JGFLUFactBenchSizeA:LUFact/dsm:1:2:3:4:lufactverA
 MatrixMultiply:MM200:1 200 30:2 200 30:3 200 30:4 200 30:mmver200
 MatrixMultiply:MatrixMultiply:1 600:2 600:3 600:4 600:mmver600
 Em3d:Em3d/dsm:-T 1 -N 4000 -d 130 -p -i 3:-T 2 -N 4000 -d 130 -p -i 3:-T 3 -N 4000 -d 130 -p -i 3:-T 4 -N 4000 -d 130 -p -i 3:em3dver40001303
-Em3d:Em3d/dsm:-T 1 -N 4000 -d 130 -p -i 100000:-T 2 -N 4000 -d 130 -p -i 100000:-T 3 -N 4000 -d 130 -p -i 100000:-T 4 -N 4000 -d 130 -p -i 100000:em3dver4000130100000
+Em3d:Em3d/dsm:-T 1 -N 4000 -d 130 -p -i 6:-T 2 -N 4000 -d 130 -p -i 6:-T 3 -N 4000 -d 130 -p -i 6:-T 4 -N 4000 -d 130 -p -i 6:em3dver40001306
+Em3d:Em3d/dsm:-T 1 -N 6000 -d 250 -p -i 6:-T 2 -N 6000 -d 250 -p -i 6:-T 3 -N 6000 -d 250 -p -i 6:-T 4 -N 6000 -d 250 -p -i 6:em3dver60002506
+Em3d:Em3d/dsm:-T 1 -N 6000 -d 200 -p -i 6:-T 2 -N 6000 -d 200 -p -i 6:-T 3 -N 6000 -d 200 -p -i 6:-T 4 -N 6000 -d 200 -p -i 6:em3dver60002006
+Em3d:Em3d/dsm:-T 1 -N 6000 -d 200 -p -i 10:-T 2 -N 6000 -d 200 -p -i 10:-T 3 -N 6000 -d 200 -p -i 10:-T 4 -N 6000 -d 200 -p -i 10:em3dver600020010
+Em3d:Em3d/dsm:-T 1 -N 8000 -d 270 -p -i 6:-T 2 -N 8000 -d 270 -p -i 6:-T 3 -N 8000 -d 270 -p -i 6:-T 4 -N 8000 -d 270 -p -i 6:em3dver80002706
+Em3d:Em3d/dsm:-T 1 -N 8000 -d 270 -p -i 10:-T 2 -N 8000 -d 270 -p -i 10:-T 3 -N 8000 -d 270 -p -i 10:-T 4 -N 8000 -d 270 -p -i 10:em3dver800027010
+Em3d:Em3d/dsm:-T 1 -N 10000 -d 400 -p -i 150:-T 2 -N 10000 -d 400 -p -i 150:-T 3 -N 10000 -d 400 -p -i 150:-T 4 -N 10000 -d 400 -p -i 150:em3dver10000400150
+Em3d:Em3d/dsm:-T 1 -N 10000 -d 800 -p -i 15:-T 2 -N 10000 -d 800 -p -i 15:-T 3 -N 10000 -d 800 -p -i 15:-T 4 -N 10000 -d 800 -p -i 15:em3dver1000080015
+Em3d:Em3d/dsm:-T 1 -N 10000 -d 1000 -p -i 15:-T 2 -N 10000 -d 1000 -p -i 15:-T 3 -N 10000 -d 1000 -p -i 15:-T 4 -N 10000 -d 1000 -p -i 15:em3dver10000100015
+Em3d:Em3d/dsm:-T 1 -N 20000 -d 800 -p -i 15:-T 2 -N 20000 -d 800 -p -i 15:-T 3 -N 20000 -d 800 -p -i 15:-T 4 -N 20000 -d 800 -p -i 15:em3dver2000080015
+Em3d:Em3d/dsm:-T 1 -N 20000 -d 600 -p -i 15:-T 2 -N 20000 -d 600 -p -i 15:-T 3 -N 20000 -d 600 -p -i 15:-T 4 -N 20000 -d 600 -p -i 15:em3dver2000060015
+Em3d:Em3d/dsm:-T 1 -N 20000 -d 1000 -p -i 15:-T 2 -N 20000 -d 1000 -p -i 15:-T 3 -N 20000 -d 1000 -p -i 15:-T 4 -N 20000 -d 1000 -p -i 15:em3dver20000100015
 Chase:Chase:::::chase
 Array:Array:::::array
index bbd224db1f9a2603b8910e8931d5c520d12c7e87..3ae77bdd2628d03a349897f22a7d7013fa45bf0f 100755 (executable)
@@ -63,11 +63,11 @@ function oneremote {
 
 function localrun {
   i=0;
-  while [ $i -lt $1 ]; do
-    /usr/bin/time -f "%e" ./${NONPREFETCH} master $ARGS1 2>> ${LOGDIR}/${NONPREFETCH}_local_${EXTENSION}.txt
-    sleep 4
-    i=`expr $i + 1`
-  done
+#while [ $i -lt $1 ]; do
+#    /usr/bin/time -f "%e" ./${NONPREFETCH} master $ARGS1 2>> ${LOGDIR}/${NONPREFETCH}_local_${EXTENSION}.txt
+#   sleep 4
+#   i=`expr $i + 1`
+# done
   i=0;
   while [ $i -lt $1 ]; do
     /usr/bin/time -f "%e" ./${NONPREFETCH_NONCACHE} master $ARGS1 2>> ${LOGDIR}/${NONPREFETCH_NONCACHE}_local_${EXTENSION}.txt
@@ -95,30 +95,30 @@ function callrun {
   localrun 3
 
   echo "---------- Running single thread remote $BMDIR non-prefetch + non-cache on 2 machines ---------- "
-  oneremote 3 1 $NONPREFETCH_NONCACHE
+#  oneremote 1 1 $NONPREFETCH_NONCACHE
   echo "---------- Running single thread remote $BMDIR non-prefetch on 2 machines ---------- "
-  oneremote 3 1 $NONPREFETCH
+#  oneremote 1 1 $NONPREFETCH
   echo "---------- Running single thread remote $BMDIR prefetch on 2 machines ---------- "
-  oneremote 3 1 $PREFETCH
+#  oneremote 1 1 $PREFETCH
 
   echo "---------- Running two threads $BMDIR non-prefetch + non-cache on 2 machines ---------- "
   run 3 2 $NONPREFETCH_NONCACHE2 
   echo "---------- Running two threads $BMDIR non-prefetch on 2 machines ---------- "
-  run 3 2 $NONPREFETCH2 
+#  run 3 2 $NONPREFETCH2 
   echo "---------- Running two threads $BMDIR prefetch on 2 machines ---------- "
   run 3 2 $PREFETCH2 
 
   echo "---------- Running three threads $BMDIR non-prefetch + non-cache on 3 machines ---------- "
   run 3 3 $NONPREFETCH_NONCACHE3 
   echo "---------- Running three threads $BMDIR non-prefetch on 3 machines ---------- "
-  run 3 3 $NONPREFETCH3 
+#  run 3 3 $NONPREFETCH3 
   echo "---------- Running three threads $BMDIR prefetch on 3 machines ---------- "
   run 3 3 $PREFETCH3 
 
   echo "---------- Running four threads $BMDIR non-prefetch + non-cache on 4 machines ---------- "
   run 3 4 $NONPREFETCH_NONCACHE4 
   echo "---------- Running four threads $BMDIR non-prefetch on 4 machines ---------- "
-  run 3 4 $NONPREFETCH4 
+#  run 3 4 $NONPREFETCH4 
   echo "---------- Running four threads $BMDIR prefetch on 4 machines ---------- "
   run 3 4 $PREFETCH4 
 
@@ -142,7 +142,9 @@ function callmicrorun {
 }
 
 benchmarks='array chase mmver200 mmver600'
-#benchmarks='em3dver40001303 sorverD'
+#benchmarks='em3dver10000100015'
+#benchmarks='moldynverA'
+#benchmarks='sorverD' //8000 X 8000 matrix
 
 echo "---------- Clean old files ---------- "
 rm runlog/*
index f55226668a975015900d1ca8851f923f7651c310..801740699bed0bf0f0ec867f1f4d689a52c333fe 100644 (file)
@@ -350,7 +350,6 @@ public class BuildCode {
                 MethodDescriptor md=lb.getMethod();
                FlatMethod fm=state.getMethodFlat(md);
                if (!md.getModifiers().isNative()) {
-                   System.out.println("***"+fm);
                        generateFlatMethod(fm, lb, outmethod);
                }
            }
index 816ee712eae68d6d8fd7d74353d1903575c13b93..a12084d5f35763c9a84bc413968980e26391e241 100644 (file)
@@ -706,7 +706,7 @@ public class SemanticCheck {
                //we have a type
                ClassDescriptor cd=typeutil.getClass(min.getBaseName().getSymbol());
                if (cd==null)
-                   throw new Error(min.getBaseName()+" undefined");
+                   throw new Error("md = "+ md.toString()+ "  "+min.getBaseName()+" undefined");
                typetolookin=new TypeDescriptor(cd);
            }
        } else if ((md instanceof MethodDescriptor)&&min.getMethodName().equals("super")) {
index 30da7aa2309b77b6ea12e42f4ed2c72ef0ff07a7..a368e86fea997626b82ed8f88eaf2678a240b35c 100644 (file)
@@ -50,8 +50,9 @@ void handleDynPrefetching(int numLocal, int ntuples, int siteid) {
   } else {
     if(getOperationMode(siteid) != 0) {
       evalPrefetch[siteid].uselesscount--;
-      if(evalPrefetch[siteid].uselesscount <= 0)
+      if(evalPrefetch[siteid].uselesscount <= 0) {
         evalPrefetch[siteid].operMode = 0;
+      }
     }
   }
 }
index aa8eeb82ef36bc9467dbe18cb61c8cdc17b219e2..defb77f3c19970bcbd915966e5b6f00ecea25371 100644 (file)
@@ -90,7 +90,7 @@ void *udpListenBroadcast(void *sockfd) {
     short status = *((short *) &readBuffer[0]);
     switch (status) {
       case INVALIDATE_OBJS:
-        if((retval = invalidateFromPrefetchCache(readBuffer))!= 0) {
+       if((retval = invalidateFromPrefetchCache(readBuffer))!= 0) {
           printf("Error: In invalidateFromPrefetchCache() at %s, %d\n", __FILE__, __LINE__);
           break;
         }
@@ -194,13 +194,14 @@ int invalidateFromPrefetchCache(char *buffer) {
   if(mid != myIpAddr) {
     /* Read objects sent */
     int numObjsRecv = *((short *)(buffer+offset)) / sizeof(unsigned int);
+    offset += sizeof(short);
     int i;
     for(i = 0; i < numObjsRecv; i++) {
       unsigned int oid;
       oid = *((unsigned int *)(buffer+offset));
       objheader_t *header;
       /* Lookup Objects in prefetch cache and remove them */
-      if((header = prehashSearch(oid)) != NULL) {
+      if(((header = prehashSearch(oid)) != NULL)) {
         prehashRemove(oid);
       }
       offset += sizeof(unsigned int);
index df979d749dda7cf2a5da7e44e952bbedd64b2650..2a347784194c7488426e18ef5924fe7d2d409dad 100644 (file)
@@ -55,8 +55,8 @@
 #define LISTEN_PORT 2156
 #define UDP_PORT 2158
 //Prefetch tuning paramters
-#define RETRYINTERVAL  //N
-#define SHUTDOWNINTERVAL  4  //M
+#define RETRYINTERVAL  20//N
+#define SHUTDOWNINTERVAL  3  //M
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -213,7 +213,7 @@ typedef struct thread_data_array {
   int *count;                  /* Variable to count responses from all participants to the TRANS_REQUEST protocol */
   char *replyctrl;             /* Shared ctrl message that stores the reply to be sent to participants, filled by decideResponse() */
   char *replyretry;            /* Shared variable that keep track if coordinator needs retry */
-  transrecord_t *rec;          /* To send modified objects */
+  transrecord_t *rec;          /* Shared variable transaction record send to all thread data */
 } thread_data_array_t;
 
 
index 9e5e08c62faea32753d78d911a16500a8d9cbcfc..1dd09c25e6ebaa2f3e9c8a9d7e559d4acc9305a1 100644 (file)
@@ -140,9 +140,6 @@ void clearPLookUpTable(void *begin, void *end) {
         objheader_t *objheader;
         if((objheader = prehashSearch(oid)) != NULL) {
           prehashRemove(oid);
-#ifdef CHECKTA
-        printf("%s() clearing Look up table for oid = %x\n", __func__, oid);
-#endif
         }
       }
     }
index 507cf65811da40fbf2619fead2e6338e6f098d90..2fb7e990eee5299a8f1275c76d39425baba6b9fc 100644 (file)
@@ -6,8 +6,7 @@ pthread_mutex_t qlock;
 pthread_mutexattr_t qlockattr;
 pthread_cond_t qcond;
 
-
-#define QSIZE 1000000 //1 MB
+#define QSIZE 2048 //2 KB
 
 void queueInit(void) {
   /* Intitialize primary queue */
index 9003e8ab4ca227281fdd300d6bb743bbb34171d2..2334eca1677e4f032a812bedd40537677d26734c 100644 (file)
@@ -21,6 +21,7 @@
 /* Global Variables */
 extern int classsize[];
 pfcstats_t *evalPrefetch;
+extern int numprefetchsites; //Global variable containing number of prefetch sites 
 extern pthread_mutex_t mainobjstore_mutex;// Mutex to lock main Object store
 objstr_t *prefetchcache; //Global Prefetch cache
 pthread_mutex_t prefetchcache_mutex;// Mutex to lock Prefetch Cache
@@ -68,7 +69,7 @@ void send_data(int fd , void *buf, int buflen) {
     numbytes = send(fd, buffer, size, MSG_NOSIGNAL);
     if (numbytes == -1) {
       perror("send");
-      return;
+      exit(0);
     }
     buffer += numbytes;
     size -= numbytes;
@@ -83,7 +84,7 @@ void recv_data(int fd , void *buf, int buflen) {
     numbytes = recv(fd, buffer, size, 0);
     if (numbytes == -1) {
       perror("recv");
-      return;
+      exit(0);
     }
     buffer += numbytes;
     size -= numbytes;
@@ -861,6 +862,14 @@ void decideResponse(thread_data_array_t *tdata) {
     /* Send Commit */
     *(tdata->replyctrl) = TRANS_COMMIT;
     *(tdata->replyretry) = 0;
+#ifdef CACHE
+#if 0
+    /* Turn prefetching on */
+    int i;
+    for (i=0; i<numprefetchsites; i++)
+      evalPrefetch[i].operMode = 1;
+#endif
+#endif
   } else { 
     /* Send Abort in soft abort case followed by retry commiting transaction again*/
     *(tdata->replyctrl) = TRANS_ABORT;
@@ -1795,29 +1804,29 @@ void transAbort(transrecord_t *trans) {
 plistnode_t *pInsert(plistnode_t *pile, objheader_t *headeraddr, unsigned int mid, int num_objs) {
   plistnode_t *ptr, *tmp;
   int found = 0, offset = 0;
-  
+
   tmp = pile;
   //Add oid into a machine that is already present in the pile linked list structure
   while(tmp != NULL) {
     if (tmp->mid == mid) {
       int tmpsize;
-      
+
       if (STATUS(headeraddr) & NEW) {
-       tmp->oidcreated[tmp->numcreated] = OID(headeraddr);
-       tmp->numcreated++;
-       GETSIZE(tmpsize, headeraddr);
-       tmp->sum_bytes += sizeof(objheader_t) + tmpsize;
+        tmp->oidcreated[tmp->numcreated] = OID(headeraddr);
+        tmp->numcreated++;
+        GETSIZE(tmpsize, headeraddr);
+        tmp->sum_bytes += sizeof(objheader_t) + tmpsize;
       }else if (STATUS(headeraddr) & DIRTY) {
-       tmp->oidmod[tmp->nummod] = OID(headeraddr);
-       tmp->nummod++;
-       GETSIZE(tmpsize, headeraddr);
-       tmp->sum_bytes += sizeof(objheader_t) + tmpsize;
+        tmp->oidmod[tmp->nummod] = OID(headeraddr);
+        tmp->nummod++;
+        GETSIZE(tmpsize, headeraddr);
+        tmp->sum_bytes += sizeof(objheader_t) + tmpsize;
       } else {
-       offset = (sizeof(unsigned int) + sizeof(short)) * tmp->numread;
-       *((unsigned int *)(((char *)tmp->objread) + offset))=OID(headeraddr);
-       offset += sizeof(unsigned int);
-       *((short *)(((char *)tmp->objread) + offset)) = headeraddr->version;
-       tmp->numread ++;
+        offset = (sizeof(unsigned int) + sizeof(short)) * tmp->numread;
+        *((unsigned int *)(((char *)tmp->objread) + offset))=OID(headeraddr);
+        offset += sizeof(unsigned int);
+        *((short *)(((char *)tmp->objread) + offset)) = headeraddr->version;
+        tmp->numread ++;
       }
       found = 1;
       break;
index 3ba69925df1dcc8c8e67a2caa176fd857a9dc81c..5947414dc92c711ead42828d80239b8cc82ff8ec 100755 (executable)
@@ -247,7 +247,7 @@ else
 #if ! java -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
 if ! $NOJAVA
 then
-if ! java -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
+if ! java -Xms50m -Xmx200m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
 $ROBUSTROOT/ClassLibrary/ -dir $BUILDDIR -precise \
 $JAVAOPTS $SRCFILES
 then exit $?