**/
Node[] hNodes;
- EVector [][] reversetable;
+ EVector [][] ereversetable;
+ EVector [][] hreversetable;
int numNodes;
/**
Node [] hTable = global new Node[numNodes];
BiGraph g = global new BiGraph(eTable, hTable);
g.numNodes=numNodes;
- g.reversetable=global new EVector[numThreads][];
+ g.ereversetable=global new EVector[numThreads][];
+ g.hreversetable=global new EVector[numThreads][];
return g;
}
eNodes[i]=global new Node();
hNodes[i]=global new Node();
}
- reversetable[threadIndex]=global new EVector[numNodes];
+ ereversetable[threadIndex]=global new EVector[numNodes];
+ hreversetable[threadIndex]=global new EVector[numNodes];
}
- public void initializeNodes(Node[] fromnodes, Node[] tonodes, int begin, int end, int degree, Random r, int threadIndex) {
+ public void initializeNodes(Node[] fromnodes, Node[] tonodes, EVector[][] reversetable, int begin, int end, int degree, Random r, int threadIndex) {
for(int i = begin; i < end; i++ ) {
Node n=fromnodes[i];
n.init(degree, r.nextDouble());
* @return
**/
- public void makeFromNodes(Node[] nodes, int indexBegin, int indexEnd, Random r) {
+ public void makeFromNodes(Node[] nodes, EVector reversetable[][], int indexBegin, int indexEnd, Random r) {
// Create the fromNodes and coeff field
int numthreads=reversetable.length;
for(int i = indexBegin; i < indexEnd; i++) {
barr = new Barrier("128.195.175.79");
atomic {
+ System.printString("Inside atomic 1\n");
iteration = numIter;
degree = numDegree;
random = new Random(lowerlimit);
atomic {
//This is going to conflict badly...Minimize work here
+ System.printString("Inside atomic 2\n");
bg.allocateNodes ( lowerlimit, upperlimit, threadindex);
}
Barrier.enterBarrier(barr);
atomic {
//initialize the eNodes
- bg.initializeNodes(bg.eNodes, bg.hNodes, lowerlimit, upperlimit, degree, random, threadindex);
+ System.printString("Inside atomic 3\n");
+ bg.initializeNodes(bg.eNodes, bg.hNodes, bg.hreversetable, lowerlimit, upperlimit, degree, random, threadindex);
}
Barrier.enterBarrier(barr);
atomic {
//initialize the hNodes
- bg.initializeNodes(bg.hNodes, bg.eNodes, lowerlimit, upperlimit, degree, random, threadindex);
+ System.printString("Inside atomic 4\n");
+ bg.initializeNodes(bg.hNodes, bg.eNodes, bg.ereversetable, lowerlimit, upperlimit, degree, random, threadindex);
}
Barrier.enterBarrier(barr);
atomic {
- bg.makeFromNodes(bg.hNodes, lowerlimit, upperlimit, random);
+ System.printString("Inside atomic 5\n");
+ bg.makeFromNodes(bg.hNodes, bg.hreversetable, lowerlimit, upperlimit, random);
}
Barrier.enterBarrier(barr);
atomic {
- bg.makeFromNodes(bg.eNodes, lowerlimit, upperlimit, random);
+ System.printString("Inside atomic 6\n");
+ bg.makeFromNodes(bg.eNodes, bg.ereversetable, lowerlimit, upperlimit, random);
}
Barrier.enterBarrier(barr);
for (int i = 0; i < iteration; i++) {
/* for eNodes */
atomic {
+ System.printString("Inside atomic 7\n");
for(int j = lowerlimit; j<upperlimit; j++) {
Node n = bg.eNodes[j];
/* for hNodes */
atomic {
+ System.printString("Inside atomic 8\n");
for(int j = lowerlimit; j<upperlimit; j++) {
Node n = bg.hNodes[j];
for (int k = 0; k < n.fromCount; k++) {
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 -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}
+FLAGS1=-dsm -prefetch -optimize -runtimedebug -transstats -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 -runtimedebug -mainclass ${MAINCLASS}
default:
# ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NP ${SRC}
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
+# cp ${MAINCLASS}NNP.bin ${MAINCLASS}4NP.bin
+# cp ${MAINCLASS}N.bin ${MAINCLASS}4.bin
clean:
rm -rf tmpbuilddirectory