Random random;
String hname;
- barr = new Barrier("128.195.175.78");
- //System.printString("Inside run\n");
+ barr = new Barrier("128.195.175.79");
atomic {
iteration = numIter;
degree = numDegree;
random = new Random(lowerlimit);
- //barr = mybarr;
}
- //System.printString("Here 1\n");
atomic {
//This is going to conflict badly...Minimize work here
bg.allocateNodes ( lowerlimit, upperlimit, threadindex);
}
Barrier.enterBarrier(barr);
System.clearPrefetchCache();
- //System.printString("Here 2\n");
atomic {
//initialize the eNodes
bg.initializeNodes(bg.eNodes, bg.hNodes, lowerlimit, upperlimit, degree, random, threadindex);
}
Barrier.enterBarrier(barr);
- //System.printString("Here 3\n");
atomic {
//initialize the hNodes
bg.initializeNodes(bg.hNodes, bg.eNodes, lowerlimit, upperlimit, degree, random, threadindex);
}
Barrier.enterBarrier(barr);
- //System.printString("Here 4\n");
atomic {
bg.makeFromNodes(bg.hNodes, lowerlimit, upperlimit, random);
}
Barrier.enterBarrier(barr);
- //System.printString("Here 5\n");
atomic {
bg.makeFromNodes(bg.eNodes, lowerlimit, upperlimit, random);
}
Barrier.enterBarrier(barr);
- //System.printString("Here 6\n");
//Do the computation
for (int i = 0; i < iteration; i++) {
Barrier.enterBarrier(barr);
- //System.printString("Here 7\n");
/* for hNodes */
atomic {
for(int j = lowerlimit; j<upperlimit; j++) {
}
}
Barrier.enterBarrier(barr);
- //System.printString("Here 8\n");
}
}
long start0 = System.currentTimeMillis();
int numThreads = em.numThreads;
int[] mid = new int[4];
- //String[] hostname;
- //atomic {
- /*
- hostname = global new String[4];
- hostname[0] = global new String("128.195.175.79");
- hostname[1] = global new String("128.195.175.73");
- hostname[2] = global new String("128.195.175.78");
- hostname[3] = global new String("128.195.175.69");
- */
- //}
mid[0] = (128<<24)|(195<<16)|(175<<8)|79;//dw-1
mid[1] = (128<<24)|(195<<16)|(175<<8)|73;//dw-2
mid[2] = (128<<24)|(195<<16)|(175<<8)|78;
mybarr = global new BarrierServer(numThreads);
graph = BiGraph.create(em.numNodes, em.numDegree, numThreads);
}
- mybarr.start(mid[1]);
+ mybarr.start(mid[0]);
Em3dWrap[] em3d=new Em3dWrap[numThreads];
}
}
-
-
- //TODO check if correct
- //
- System.printString("Starting Barrier run\n");
+ //System.printString("Starting Barrier run\n");
for(int i = 0; i<numThreads; i++) {
em3d[i].em3d.start(mid[i]);
}
for(int i = 0; i<numThreads; i++) {
em3d[i].em3d.join();
}
- //System.printString("Join Barrier run\n");
- //mybarr.join();
System.printString("Done!"+ "\n");
}
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 -transstats -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 -optimize -transstats -mainclass ${MAINCLASS}
+FLAGS1=-dsm -prefetch -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 -optimize -mainclass ${MAINCLASS}
default:
# ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NP ${SRC}
# ../../../../buildscript ${FLAGS} -o ${MAINCLASS} ${SRC}
../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NNP ${SRC3}
-# ../../../../buildscript ${FLAGS1} -o ${MAINCLASS}N ${SRC3}
-# cp ${MAINCLASS}NNP.bin ${MAINCLASS}1NP.bin
-# cp ${MAINCLASS}N.bin ${MAINCLASS}1.bin
-# cp ${MAINCLASS}NNP.bin ${MAINCLASS}2NP.bin
-# cp ${MAINCLASS}N.bin ${MAINCLASS}2.bin
-# cp ${MAINCLASS}NNP.bin ${MAINCLASS}3NP.bin
-# cp ${MAINCLASS}N.bin ${MAINCLASS}3.bin
-# cp ${MAINCLASS}NNP.bin ${MAINCLASS}4NP.bin
-# cp ${MAINCLASS}N.bin ${MAINCLASS}4.bin
+ ../../../../buildscript ${FLAGS1} -o ${MAINCLASS}N ${SRC3}
+ cp ${MAINCLASS}NNP.bin ${MAINCLASS}1NP.bin
+ cp ${MAINCLASS}N.bin ${MAINCLASS}1.bin
+ cp ${MAINCLASS}NNP.bin ${MAINCLASS}2NP.bin
+ cp ${MAINCLASS}N.bin ${MAINCLASS}2.bin
+ cp ${MAINCLASS}NNP.bin ${MAINCLASS}3NP.bin
+ cp ${MAINCLASS}N.bin ${MAINCLASS}3.bin
+ cp ${MAINCLASS}NNP.bin ${MAINCLASS}4NP.bin
+ cp ${MAINCLASS}N.bin ${MAINCLASS}4.bin
clean:
rm -rf tmpbuilddirectory