From: bdemsky Date: Tue, 10 Nov 2009 10:22:16 +0000 (+0000) Subject: changes X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5803b6e910dc363d6b6104d6999eab14b544992e;p=IRC.git changes --- diff --git a/Robust/src/Analysis/Locality/BranchAnalysis.java b/Robust/src/Analysis/Locality/BranchAnalysis.java index 31a14026..6b22ded9 100644 --- a/Robust/src/Analysis/Locality/BranchAnalysis.java +++ b/Robust/src/Analysis/Locality/BranchAnalysis.java @@ -22,6 +22,9 @@ public class BranchAnalysis { Set group=groupmap.get(fn); if (group==null) return -1; + while (next.numNext()==1&&group.contains(next)) { + next=fnmap.get(next)[0]; + } if (group.contains(next)) return -1; Vector exits=table.get(group); @@ -84,7 +87,7 @@ public class BranchAnalysis { output.println(label+":"); if (numJumps(fn)==1) { FlatNode fndst=getJumps(fn).get(0); - output.println("goto "+nodetolabels.get(fndst)+";"); + output.println("goto L"+nodetolabels.get(fndst)+";"); } else if (numJumps(fn)==2) { Vector exits=getJumps(fn); output.println("if(RESTOREBRANCH())"); @@ -110,17 +113,20 @@ public class BranchAnalysis { for(Iterator fnit=transset.iterator();fnit.hasNext();) { FlatNode fn=fnit.next(); - if (fn.numNext()>1&&storeset.contains(fn)) { + if ((fn.numNext()>1&&storeset.contains(fn))||fn.kind()==FKind.FlatBackEdge||fn.kind()==FKind.FlatNop) { FlatNode[] children=fnmap.get(fn); + if (children==null) + continue; if (!groupmap.containsKey(fn)) { groupmap.put(fn, new HashSet()); groupmap.get(fn).add(fn); } for(int i=0;i1&&storeset.contains(child)) + if ((child.numNext()>1&&storeset.contains(child))||child.kind()==FKind.FlatBackEdge||child.kind()==FKind.FlatNop) { mergegroups(fn, child, groupmap); } + } } } //now we have groupings... diff --git a/Robust/src/Analysis/Locality/DCWrapper.java b/Robust/src/Analysis/Locality/DCWrapper.java index 508b44a6..394f9b40 100644 --- a/Robust/src/Analysis/Locality/DCWrapper.java +++ b/Robust/src/Analysis/Locality/DCWrapper.java @@ -175,6 +175,10 @@ public class DCWrapper { if (!optmap.containsKey(lb)) { optmap.put(lb, new HashSet()); } + + if (state.HYBRID&&recordset.size()>6) + return false; + DiscoverConflicts dc=delaycomp.getConflicts(); for(Iterator fnit=checkset.iterator();fnit.hasNext();) { FlatNode fn=fnit.next(); diff --git a/Robust/src/Analysis/Locality/DiscoverConflicts.java b/Robust/src/Analysis/Locality/DiscoverConflicts.java index 40a88c6b..7baa47e9 100644 --- a/Robust/src/Analysis/Locality/DiscoverConflicts.java +++ b/Robust/src/Analysis/Locality/DiscoverConflicts.java @@ -234,7 +234,7 @@ public class DiscoverConflicts { if (gft!=null) { writemap.put(lb, writeset); } - + HashSet srctrans=new HashSet(); HashSet leftsrctrans=new HashSet(); HashSet rightsrctrans=new HashSet(); @@ -478,7 +478,7 @@ public class DiscoverConflicts { //this could cause conflict...figure out conflict set Set tfpset=tmap.get(fen.getSrc()); if (tfpset!=null) - writeset.addAll(tfpset); + tfset.addAll(tfpset); } break; } @@ -494,7 +494,7 @@ public class DiscoverConflicts { //this could cause conflict...figure out conflict set Set tfpset=tmap.get(ffn.getSrc()); if (tfpset!=null) - writeset.addAll(tfpset); + tfset.addAll(tfpset); } break; } @@ -800,18 +800,21 @@ public class DiscoverConflicts { } class TempFlatPair { - FlatNode f; - TempDescriptor t; - TempFlatPair(TempDescriptor t, FlatNode f) { - this.t=t; - this.f=f; - } - - public int hashCode() { - return f.hashCode()^t.hashCode(); - } - public boolean equals(Object o) { - TempFlatPair tf=(TempFlatPair)o; - return t.equals(tf.t)&&f.equals(tf.f); - } + FlatNode f; + TempDescriptor t; + TempFlatPair(TempDescriptor t, FlatNode f) { + this.t=t; + this.f=f; + } + + public int hashCode() { + return f.hashCode()^t.hashCode(); + } + public boolean equals(Object o) { + TempFlatPair tf=(TempFlatPair)o; + return t.equals(tf.t)&&f.equals(tf.f); + } + public String toString() { + return f.toString()+" "+t.toString(); + } } diff --git a/Robust/src/Benchmarks/SingleTM/common/Makefile.builds b/Robust/src/Benchmarks/SingleTM/common/Makefile.builds index ef109efc..1799768e 100644 --- a/Robust/src/Benchmarks/SingleTM/common/Makefile.builds +++ b/Robust/src/Benchmarks/SingleTM/common/Makefile.builds @@ -1,4 +1,4 @@ -default: lockjopt stmopt fission debug fissionarray dv +default: lockjopt stmopt fission debug fissionarray dv hydv lock: prep ../../../buildscript ${FLAGSLOCKNOJ} -o LOCKNOJ${MAINCLASS} ${SRC} @@ -30,6 +30,9 @@ fissionarray: prep dv: prep ../../../buildscript ${FLAGSDV} -o DV${MAINCLASS} ${SRC} +hydv: prep + ../../../buildscript ${FLAGSHYDV} -o HYDV${MAINCLASS} ${SRC} + debug: prep ../../../buildscript ${FLAGSDEBUG} -o DEB${MAINCLASS} ${SRC} diff --git a/Robust/src/Benchmarks/SingleTM/common/Makefile.flags b/Robust/src/Benchmarks/SingleTM/common/Makefile.flags index 47963fb4..9f249cea 100644 --- a/Robust/src/Benchmarks/SingleTM/common/Makefile.flags +++ b/Robust/src/Benchmarks/SingleTM/common/Makefile.flags @@ -10,3 +10,4 @@ FLAGSLOCKPROF=-mainclass ${MAINCLASS} -thread -optimize -abcclose -64bit -debug FLAGSLOCKPROFO0=-mainclass ${MAINCLASS} -thread -optimize -abcclose -64bit -debug -joptimize -arraypad FLAGSFISSIONARRAY=-mainclass ${MAINCLASS} -singleTM -delaycomp -optimize -joptimize -abcclose -64bit -debug -transstats -inlineatomic 2 -minimize -arraypad -sandbox -stmarray -builddir fisar FLAGSDV=-mainclass ${MAINCLASS} -singleTM -delaycomp -optimize -joptimize -64bit -debug -transstats -inlineatomic 2 -minimize -readset -sandbox -stmarray -dualview -abcclose -builddir dv +FLAGSHYDV=-mainclass ${MAINCLASS} -singleTM -delaycomp -optimize -joptimize -64bit -debug -transstats -inlineatomic 2 -minimize -readset -sandbox -stmarray -dualview -abcclose -builddir hydv -hybrid diff --git a/Robust/src/Benchmarks/SingleTM/runall b/Robust/src/Benchmarks/SingleTM/runall index 2a1d0d63..93eb7f6b 100755 --- a/Robust/src/Benchmarks/SingleTM/runall +++ b/Robust/src/Benchmarks/SingleTM/runall @@ -2,32 +2,37 @@ function run { dir="$1" command="$2" +threads="$3" +shift shift shift args="$@" cd $dir echo ============================================================ echo Running Fission $command $@ -for i in 1 +for i in 1 2 3 4 5 6 7 8 9 10 do echo Trial $i -time ./FIS$command $args +time ./FIS$command $args &> ../log/${command}_${threads}_FIS_${i} +cat ../log/${command}_${threads}_FIS_${i} done echo echo echo Running Fission Array $command $@ -for i in 1 +for i in 1 2 3 4 5 6 7 8 9 10 do echo Trial $i -time ./FISAR$command $args +time ./FISAR$command $args &> ../log/${command}_${threads}_FISAR_${i} +cat ../log/${command}_${threads}_FISAR_${i} done echo echo echo Running Debug Array $command $@ -for i in 1 +for i in 1 2 3 4 5 6 7 8 9 10 do echo Trial $i -time ./DEB$command $args +time ./DEB$command $args &> ../log/${command}_${threads}_DEB_${i} +cat ../log/${command}_${threads}_DEB_${i} done echo echo @@ -35,31 +40,44 @@ echo #for i in 1 #do #echo Trial $i -#time ./STM$command $args +#time ./STM$command $args &> ../log/${command}_${threads}_STM_${i} +#cat ../log/${command}_${threads}_STM_${i} #done #echo #echo echo Running Optimized STM $command $@ -for i in 1 +for i in 1 2 3 4 5 6 7 8 9 10 do echo Trial $i -time ./OPTSTM$command $args +time ./OPTSTM$command $args &> ../log/${command}_${threads}_OPTSTM_${i} +cat ../log/${command}_${threads}_OPTSTM_${i} done echo echo echo Running Lock $command $@ -for i in 1 +for i in 1 2 3 4 5 6 7 8 9 10 do echo Trial $i -time ./LOCK$command $args +time ./LOCK$command $args &> ../log/${command}_${threads}_LOCK_${i} +cat ../log/${command}_${threads}_LOCK_${i} done echo echo echo Running DV $command $@ -for i in 1 +for i in 1 2 3 4 5 6 7 8 9 10 +do +echo Trial $i +time ./DV$command $args &> ../log/${command}_${threads}_DV_${i} +cat ../log/${command}_${threads}_DV_${i} +done +echo +echo +echo Running Hybrid DV $command $@ +for i in 1 2 3 4 5 6 7 8 9 10 do echo Trial $i -time ./DV$command $args +time ./HYDV$command $args &> ../log/${command}_${threads}_HYDV_${i} +cat ../log/${command}_${threads}_HYDV_${i} done echo echo @@ -67,7 +85,8 @@ echo #for i in 1 #do #echo Trial $i -#time ./STMNOJ$command $args +#time ./STMNOJ$command $args &> ../log/${command}_${threads}_STMNOJ_${i} +#cat ../log/${command}_${threads}_STMNOJ_${i} #done #echo #echo @@ -75,7 +94,8 @@ echo #for i in 1 #do #echo Trial $i -#time ./LOCKNOJ$command $args +#time ./LOCKNOJ$command $args &> ../log/${command}_${threads}_LOCKNOJ_${i} +#cat ../log/${command}_${threads}_LOCKNOJ_${i} #done #echo #echo @@ -86,61 +106,56 @@ ulimit -s 45000 #Kmeans -#run KMeans KMeans.bin -m 15 -n 15 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 1 -#run KMeans KMeans.bin -m 15 -n 15 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 2 -#run KMeans KMeans.bin -m 15 -n 15 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 4 -#run KMeans KMeans.bin -m 15 -n 15 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 8 +#run KMeans KMeans.bin 1 -m 15 -n 15 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 1 +#run KMeans KMeans.bin 2 -m 15 -n 15 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 2 +#run KMeans KMeans.bin 4 -m 15 -n 15 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 4 +#run KMeans KMeans.bin 8 -m 15 -n 15 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 8 #Kmeans low -run KMeans KMeans.bin -m 40 -n 40 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 1 -run KMeans KMeans.bin -m 40 -n 40 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 2 -run KMeans KMeans.bin -m 40 -n 40 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 4 -run KMeans KMeans.bin -m 40 -n 40 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 8 +run KMeans KMeans.bin 1 -m 40 -n 40 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 1 +run KMeans KMeans.bin 2 -m 40 -n 40 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 2 +run KMeans KMeans.bin 4 -m 40 -n 40 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 4 +run KMeans KMeans.bin 8 -m 40 -n 40 -t 0.00001 -i inputs/random-n65536-d32-c16.txt -nthreads 8 #Labrynth -run Labyrinth3D Labyrinth.bin -i inputs/random-x512-y512-z7-n512.txt -t 1 -run Labyrinth3D Labyrinth.bin -i inputs/random-x512-y512-z7-n512.txt -t 2 -run Labyrinth3D Labyrinth.bin -i inputs/random-x512-y512-z7-n512.txt -t 4 -run Labyrinth3D Labyrinth.bin -i inputs/random-x512-y512-z7-n512.txt -t 8 +run Labyrinth3D Labyrinth.bin 1 -i inputs/random-x512-y512-z7-n512.txt -t 1 +run Labyrinth3D Labyrinth.bin 2 -i inputs/random-x512-y512-z7-n512.txt -t 2 +run Labyrinth3D Labyrinth.bin 4 -i inputs/random-x512-y512-z7-n512.txt -t 4 +run Labyrinth3D Labyrinth.bin 8 -i inputs/random-x512-y512-z7-n512.txt -t 8 #SSCA2 -run SSCA2 SSCA2.bin -s 20 -i 1.0 -u 1.0 -l 3 -p 3 -t 1 -run SSCA2 SSCA2.bin -s 20 -i 1.0 -u 1.0 -l 3 -p 3 -t 2 -run SSCA2 SSCA2.bin -s 20 -i 1.0 -u 1.0 -l 3 -p 3 -t 4 -run SSCA2 SSCA2.bin -s 20 -i 1.0 -u 1.0 -l 3 -p 3 -t 8 +run SSCA2 SSCA2.bin 1 -s 20 -i 1.0 -u 1.0 -l 3 -p 3 -t 1 +run SSCA2 SSCA2.bin 2 -s 20 -i 1.0 -u 1.0 -l 3 -p 3 -t 2 +run SSCA2 SSCA2.bin 4 -s 20 -i 1.0 -u 1.0 -l 3 -p 3 -t 4 +run SSCA2 SSCA2.bin 8 -s 20 -i 1.0 -u 1.0 -l 3 -p 3 -t 8 #Genome -run Genome Genome.bin -g 8192 -s 64 -n 16777216 -t 1 -run Genome Genome.bin -g 8192 -s 64 -n 16777216 -t 2 -run Genome Genome.bin -g 8192 -s 64 -n 16777216 -t 4 -run Genome Genome.bin -g 8192 -s 64 -n 16777216 -t 8 +run Genome Genome.bin 1 -g 8192 -s 64 -n 16777216 -t 1 +run Genome Genome.bin 2 -g 8192 -s 64 -n 16777216 -t 2 +run Genome Genome.bin 4 -g 8192 -s 64 -n 16777216 -t 4 +run Genome Genome.bin 8 -g 8192 -s 64 -n 16777216 -t 8 #Vacation -run Vacation Vacation.bin -n 4 -q 60 -u 90 -r 1048576 -t 4194304 -c 1 -run Vacation Vacation.bin -n 4 -q 60 -u 90 -r 1048576 -t 4194304 -c 2 -run Vacation Vacation.bin -n 4 -q 60 -u 90 -r 1048576 -t 4194304 -c 4 -run Vacation Vacation.bin -n 4 -q 60 -u 90 -r 1048576 -t 4194304 -c 8 +run Vacation Vacation.bin 1 -n 4 -q 60 -u 90 -r 1048576 -t 4194304 -c 1 +run Vacation Vacation.bin 2 -n 4 -q 60 -u 90 -r 1048576 -t 4194304 -c 2 +run Vacation Vacation.bin 4 -n 4 -q 60 -u 90 -r 1048576 -t 4194304 -c 4 +run Vacation Vacation.bin 8 -n 4 -q 60 -u 90 -r 1048576 -t 4194304 -c 8 #Yada -run Yada yada.bin -a 15 -i input/ttimeu100000.2 -t 1 -run Yada yada.bin -a 15 -i input/ttimeu100000.2 -t 2 -run Yada yada.bin -a 15 -i input/ttimeu100000.2 -t 4 -run Yada yada.bin -a 15 -i input/ttimeu100000.2 -t 8 +run Yada yada.bin 1 -a 15 -i input/ttimeu100000.2 -t 1 +run Yada yada.bin 2 -a 15 -i input/ttimeu100000.2 -t 2 +run Yada yada.bin 4 -a 15 -i input/ttimeu100000.2 -t 4 +run Yada yada.bin 8 -a 15 -i input/ttimeu100000.2 -t 8 #Intruder -run Intruder Intruder.bin -a 10 -l 128 -n 262144 -s 1 -t 1 -run Intruder Intruder.bin -a 10 -l 128 -n 262144 -s 1 -t 2 -run Intruder Intruder.bin -a 10 -l 128 -n 262144 -s 1 -t 4 -run Intruder Intruder.bin -a 10 -l 128 -n 262144 -s 1 -t 8 - -#LeeRouting -run LeeRouting LeeRouter.bin 1 sparselong.txt -run LeeRouting LeeRouter.bin 2 sparselong.txt -run LeeRouting LeeRouter.bin 4 sparselong.txt -run LeeRouting LeeRouter.bin 8 sparselong.txt +run Intruder Intruder.bin 1 -a 10 -l 128 -n 262144 -s 1 -t 1 +run Intruder Intruder.bin 2 -a 10 -l 128 -n 262144 -s 1 -t 2 +run Intruder Intruder.bin 4 -a 10 -l 128 -n 262144 -s 1 -t 4 +run Intruder Intruder.bin 8 -a 10 -l 128 -n 262144 -s 1 -t 8 #Bayes -run Bayes Bayes.bin -v 24 -r 1024 -n 2 -p 20 -s 0 -i 2 -e 2 -t 1 -run Bayes Bayes.bin -v 24 -r 1024 -n 2 -p 20 -s 0 -i 2 -e 2 -t 2 -run Bayes Bayes.bin -v 24 -r 1024 -n 2 -p 20 -s 0 -i 2 -e 2 -t 4 -run Bayes Bayes.bin -v 24 -r 1024 -n 2 -p 20 -s 0 -i 2 -e 2 -t 8 +run Bayes Bayes.bin 1 -v 32 -r 4096 -n 10 -p 40 -s 1 -i 2 -e 8 -t 1 +run Bayes Bayes.bin 2 -v 32 -r 4096 -n 10 -p 40 -s 1 -i 2 -e 8 -t 2 +run Bayes Bayes.bin 4 -v 32 -r 4096 -n 10 -p 40 -s 1 -i 2 -e 8 -t 4 +run Bayes Bayes.bin 8 -v 32 -r 4096 -n 10 -p 40 -s 1 -i 2 -e 8 -t 8 +