/**
* Parallel work by all threads
**/
+ long start=System.currentTimeMillis();
Barrier.enterBarrier();
Learner.createTaskList(0, numThread, learnerPtr);
Barrier.enterBarrier();
Learner.learnStructure(0, numThread, learnerPtr);
Barrier.enterBarrier();
+ long stop=System.currentTimeMillis();
+
+ long diff=stop-start;
+ System.out.println("TIME="+diff);
System.out.println("done.");
for(int i = 1; i<g.numThread; i++) {
gn[i].start();
}
-
+
+ long start=System.currentTimeMillis();
Barrier.enterBarrier();
Sequencer.run(0, g.numThread, g.randomPtr, g.sequencerPtr);
Barrier.enterBarrier();
-
+ long stop=System.currentTimeMillis();
+ long diff=stop-start;
+ System.out.println("TIME="+diff);
System.out.println("done.");
}
in.threadID = 0;
- long start = System.currentTimeMillis();
for(i = 1; i< in.numThread;i++) {
intruders[i].start();
}
+ long start = System.currentTimeMillis();
+
Barrier.enterBarrier();
in.processPackets(in.argument);
Barrier.enterBarrier();
-
long finish = System.currentTimeMillis();
long elapsed = finish - start;
- System.out.println("Elapsed time = " + (float)(elapsed)/1000);
+ System.out.println("TIME=" + elapsed);
// finish
//
int index = -1;
int i;
//double max_dist = FLT_MAX;
- float max_dist = (float)3.40282347e+38;
+ float max_dist = (float)3.40282347e+38f;
float limit = (float) 0.99999;
/* Find the cluster center id with min distance to pt */
System.out.println("Finished Starting threads......");
+ long start=System.currentTimeMillis();
for (int i = 0; i < nloops; i++) {
/*
* Since zscore transform may perform in cluster() which modifies the
kms, //main class that holds users inputs from command prompt and output arrays that need to be filled
g_args); // Global arguments common to all threads
}
+ long stop=System.currentTimeMillis();
+ long diff=stop-start;
+ System.out.println("TIME="+diff);
System.out.println("Printing output......");
System.out.println("Best_nclusters= " + kms.best_nclusters);
int index, start, stop;
start = myId * CHUNK;
- System.out.println("myId= " + myId + " start= " + start + " npoints= " + npoints);
- // System.out.println("myId= " + myId + " start= " + start + " npoints= " + npoints);
while (start < npoints) {
stop = (((start + CHUNK) < npoints) ? (start + CHUNK) : npoints);
int loop = 0;
do {
- delta = (float) 0.0;
+ delta = 0.0f;
args.feature = feature;
args.nfeatures = nfeatures;
/* Replace old cluster centers with new_centers */
for (int i = 0; i < nclusters; i++) {
for (int j = 0; j < nfeatures; j++) {
- if (new_centers_len[i] > 0) {
+ if (new_centers_len[i] >0) {
clusters[i][j] = new_centers[i][j] / new_centers_len[i];
}
new_centers[i][j] = (float)0.0; /* set back to 0 */
delta /= npoints;
- System.out.println("delta= " + delta + " loop= " + loop);
-
} while ((delta > threshold) && (loop++ < 500));
return clusters;
public long random_generate() {
long x= genrand_int32()&0xFFFFFFFFL;
- System.out.println(x);
return x;
}
lb[i] = new Labyrinth(i,routerArg);
}
- long start = System.currentTimeMillis();
-
for(int i = 1; i<labyrinth.numThread;i++) {
lb[i].start();
}
+ long start = System.currentTimeMillis();
Barrier.enterBarrier();
Router.solve(routerArg);
/* End of Solve */
long finish = System.currentTimeMillis();
+ long diff=finish-start;
+ System.out.println("TIME="+diff);
int numPathRouted = 0;
include ../common/Makefile.builds
prep:
- cpp ${MAINCLASS}.java > tmp${MAINCLASS}.java
- cpp Grid.java > tmpGrid.java
- cpp Router.java > tmpRouter.java
- cpp Maze.java > tmpMaze.java
- cpp Queue_t.java > tmpQueue_t.java
- cpp Queue_Int.java > tmpQueue_Int.java
+ cpp -P ${MAINCLASS}.java > tmp${MAINCLASS}.java
+ cpp -P Grid.java > tmpGrid.java
+ cpp -P Router.java > tmpRouter.java
+ cpp -P Maze.java > tmpMaze.java
+ cpp -P Queue_t.java > tmpQueue_t.java
+ cpp -P Queue_Int.java > tmpQueue_Int.java
./extractLines tmp${MAINCLASS}.java
./extractLines tmpGrid.java
./extractLines tmpRouter.java
GridCell.java \
LeeThread.java \
WorkQueue.java
-FLAGS=-mainclass ${MAINCLASS} -joptimize -debug -singleTM -optimize -dcopts -transstats -abcclose -stmstats
-default:
- ../../../buildscript ${FLAGS} -o ${MAINCLASS} ${SRC}
+
+include ../common/Makefile.flags
+include ../common/Makefile.builds
+
+prep:
clean:
rm -rf tmpbuilddirectory
public int global_maxNumVertices;
public int global_outVertexListSize;
public int[][] global_impliedEdgeList;
- public Objectwrapper[] global_auxArr;
+ public int[][] global_auxArr;
public ComputeGraph() {
global_p = null;
}
public void
- prefix_sumsin (int myId, int numThread, int[] result, intwrapper[] input, int arraySize)
+ prefix_sumsin (int myId, int numThread, int[] result, int[] input, int arraySize)
{
int[] p;
if (myId == 0) {
if (myId == 0) {
SDGdataPtr.startVertex = null;
SDGdataPtr.endVertex = null;
- GPtr.inDegree = new intwrapper[GPtr.numVertices];
+ GPtr.inDegree = new int[GPtr.numVertices];
GPtr.inVertexIndex = new int[GPtr.numVertices];
}
* MAX_CLUSTER_SIZE
*/
- Objectwrapper[] auxArr;
+ int[][] auxArr;
if (myId == 0) {
- auxArr = new Objectwrapper[GPtr.numVertices];
+ auxArr = new int[GPtr.numVertices][];
computeGraphArgs.global_auxArr = auxArr;
}
a = new int[MAX_CLUSTER_SIZE];
auxArr[v] = a;
} else {
- a = (int[]) auxArr[v];
+ a = auxArr[v];
}
a[inDegree % MAX_CLUSTER_SIZE] = i;
}
impliedEdgeList[i][j-GPtr.inVertexIndex[i]];
} else {
GPtr.inVertexList[j] =
- ((int[])auxArr[i])[(j-GPtr.inVertexIndex[i]) % MAX_CLUSTER_SIZE];
+ (auxArr[i])[(j-GPtr.inVertexIndex[i]) % MAX_CLUSTER_SIZE];
}
}
}
public int[] outVertexList;
public int[] paralEdgeIndex;
- public intwrapper[] inDegree;
+ public int[] inDegree;
public int[] inVertexIndex;
public int[] inVertexList;
parallel_work_computeGraph(nthreads, glb, computeGraphArgs);
stoptime=System.currentTimeMillis();
System.out.println("\n\tcomputeGraph() completed execution.\n");
- System.out.println("Time="+(stoptime-starttime));
+ System.out.println("TIME="+(stoptime-starttime));
#endif
#ifdef ENABLE_KERNEL2
public static void main(String[] args) {
Simple[] s;
Counting c;
- int numthreads = 32;
+ int numthreads = 2;
atomic {
c = new Counting();
MAINCLASS=Simple
SRC=${MAINCLASS}.java
-default:
- ../../../buildscript -singleTM -optimize -mainclass ${MAINCLASS} ${SRC} -o ${MAINCLASS}
+
+include ../common/Makefile.flags
+include ../common/Makefile.builds
+
+prep:
clean:
rm -rf tmpbuilddirectory
/* Run transactions */
System.out.println("Running clients... ");
- start=System.currentTimeMillis();
Barrier.setBarrier(numThread);
for(int i=1;i<numThread;i++) {
clients[i].start();
}
- clients[0].run();
- // thread_start(client_run, clients);
-
+ start=System.currentTimeMillis();
+ clients[0].run();
stop=System.currentTimeMillis();
System.out.print("done.");
long diff=stop-start;
- System.out.println("Time = "+diff);
+ System.out.println("TIME="+diff);
vac.checkTables(managerPtr);
/* Clean up */
-default: lock basestm lockjopt stmjopt stmopt fission
+default: lockjopt stmopt fission debug fissionarray dv
lock: prep
../../../buildscript ${FLAGSLOCKNOJ} -o LOCKNOJ${MAINCLASS} ${SRC}
+lockprof: prep
+ ../../../buildscript ${FLAGSLOCKPROF} -o LOCKPROF${MAINCLASS} ${SRC}
+
+lockprofo0: prep
+ ../../../buildscript ${FLAGSLOCKPROFO0} -o LOCKPROFO0${MAINCLASS} ${SRC}
+
basestm: prep
../../../buildscript ${FLAGSSTMNOJ} -o STMNOJ${MAINCLASS} ${SRC}
fission: prep
../../../buildscript ${FLAGSFISSION} -o FIS${MAINCLASS} ${SRC}
+fissionarray: prep
+ ../../../buildscript ${FLAGSFISSIONARRAY} -o FISAR${MAINCLASS} ${SRC}
+
+dv: prep
+ ../../../buildscript ${FLAGSDV} -o DV${MAINCLASS} ${SRC}
+
debug: prep
../../../buildscript ${FLAGSDEBUG} -o DEB${MAINCLASS} ${SRC}
-FLAGSLOCK=-mainclass ${MAINCLASS} -thread -optimize -abcclose -64bit -debug -joptimize -arraypad
-FLAGSLOCKNOJ=-mainclass ${MAINCLASS} -thread -optimize -abcclose -64bit -debug -arraypad
+FLAGSLOCK=-mainclass ${MAINCLASS} -thread -optimize -abcclose -64bit -debug -joptimize -arraypad -builddir lock
+FLAGSLOCKNOJ=-mainclass ${MAINCLASS} -thread -optimize -64bit -debug -abcclose -arraypad
FLAGSSTMNOJ=-mainclass ${MAINCLASS} -singleTM -optimize -64bit -debug -abcclose -transstats -arraypad
-FLAGSSTM=-mainclass ${MAINCLASS} -singleTM -optimize -joptimize -64bit -debug -abcclose -transstats -arraypad
-FLAGSOPTSTM=-mainclass ${MAINCLASS} -singleTM -optimize -joptimize -64bit -debug -abcclose -dcopts -transstats -arraypad -sandbox
-FLAGSFISSION=-mainclass ${MAINCLASS} -singleTM -delaycomp -optimize -joptimize -abcclose -64bit -debug -transstats -inlineatomic 2 -minimize -readset -arraypad -sandbox
+FLAGSSTM=-mainclass ${MAINCLASS} -singleTM -optimize -joptimize -64bit -debug -abcclose -transstats -arraypad -sandbox
+FLAGSOPTSTM=-mainclass ${MAINCLASS} -singleTM -optimize -joptimize -64bit -debug -abcclose -dcopts -transstats -arraypad -sandbox -builddir optstm
+FLAGSFISSION=-mainclass ${MAINCLASS} -singleTM -delaycomp -optimize -joptimize -abcclose -64bit -debug -transstats -inlineatomic 2 -minimize -readset -arraypad -sandbox -builddir fission
FLAGSSTATS=-mainclass ${MAINCLASS} -singleTM -optimize -debug -joptimize -64bit -abcclose -dcopts -transstats -arraypad -stmstats
-FLAGSDEBUG=-mainclass ${MAINCLASS} -singleTM -delaycomp -nooptimize -joptimize -abcclose -64bit -debug -transstats -inlineatomic 2 -minimize -readset -arraypad -stmarray -profile -sandbox
+FLAGSDEBUG=-mainclass ${MAINCLASS} -singleTM -optimize -joptimize -64bit -debug -transstats -minimize -arraypad -stmarray -sandbox -dcopts -abcclose -inlineatomic 2 -builddir debug
+FLAGSLOCKPROF=-mainclass ${MAINCLASS} -thread -optimize -abcclose -64bit -debug -joptimize -arraypad
+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
cd Intruder
make &
+cd ..
+
+cd Bayes
+make &
+cd ..
+
+cd Vacation
+make &
+cd ..
+
+cd Yada
+make &
+cd ..
+
+cd LeeRouting
+make &
cd ..
\ No newline at end of file
cd $dir
echo ============================================================
echo Running Fission $command $@
-for i in 1 2 3 4 5
+for i in 1
do
echo Trial $i
time ./FIS$command $args
done
echo
echo
-echo Running STM $command $@
-for i in 1 2 3 4 5
+echo Running Fission Array $command $@
+for i in 1
do
echo Trial $i
-#time ./STM$command $args
+time ./FISAR$command $args
done
echo
echo
-echo Running Optimized STM $command $@
-for i in 1 2 3 4 5
+echo Running Debug Array $command $@
+for i in 1
do
echo Trial $i
-#time ./OPTSTM$command $args
+time ./DEB$command $args
done
echo
echo
-echo Running Lock $command $@
-for i in 1 2 3 4 5
+#echo Running STM $command $@
+#for i in 1
+#do
+#echo Trial $i
+#time ./STM$command $args
+#done
+#echo
+#echo
+echo Running Optimized STM $command $@
+for i in 1
do
echo Trial $i
-time ./LOCK$command $args
+time ./OPTSTM$command $args
done
echo
echo
-echo Running No JOPTIMIZE STM $command $@
-for i in 1 2 3 4 5
+echo Running Lock $command $@
+for i in 1
do
echo Trial $i
-#time ./STMNOJ$command $args
+time ./LOCK$command $args
done
echo
echo
-echo Running No JOPTIMIZE Lock $command $@
-for i in 1 2 3 4 5
+echo Running DV $command $@
+for i in 1
do
echo Trial $i
-time ./LOCKNOJ$command $args
+time ./DV$command $args
done
echo
echo
+#echo Running No JOPTIMIZE STM $command $@
+#for i in 1
+#do
+#echo Trial $i
+#time ./STMNOJ$command $args
+#done
+#echo
+#echo
+#echo Running No JOPTIMIZE Lock $command $@
+#for i in 1
+#do
+#echo Trial $i
+#time ./LOCKNOJ$command $args
+#done
+#echo
+#echo
cd ..
}
#get plenty of stack space
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 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 -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
#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 -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
#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 8
#Genome
-#run Genome Genome.bin -g 8192 -s 32 -n 167721 -t 1
-#run Genome Genome.bin -g 8192 -s 32 -n 167721 -t 2
-#run Genome Genome.bin -g 8192 -s 32 -n 167721 -t 4
-#run Genome Genome.bin -g 8192 -s 32 -n 167721 -t 8
+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
+
+#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
+
+#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
+
+#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
-#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
+#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
wc Interface/*.java Analysis/*/*.java IR/*.java IR/*/*.java Lex/*.java Util/*.java ClassLibrary/*.java
wcrun:
- wc Runtime/*.[c,h] Runtime/DSTM/interface/*.[c,h]
+ wc Runtime/*.[c,h] Runtime/DSTM/interface/*.[c,h] Runtime/STM/*.[c,h]
Parse/Parser.java Parse/Sym.java: Parse/java14.cup
cd Parse && \
dir=`pwd`
echo Doing Test $ARG1
-../buildscript -debug -joptimize -robustroot ${dir}/../ -mainclass $ARG1 $ARG2 -o $ARG1
+../buildscript -64bit -debug -joptimize -robustroot ${dir}/../ -mainclass $ARG1 $ARG2 -o $ARG1
$ARG1.bin $@ &> output/$ARG1.output
diff output/$ARG1.output output/$ARG1.output.goal
rm $ARG1.bin