|
|
@ -130,8 +130,6 @@ void processMatchedVertices(
|
|
|
|
Mate[v - StartIndex] = w; // v is a local vertex
|
|
|
|
Mate[v - StartIndex] = w; // v is a local vertex
|
|
|
|
GMate[Ghost2LocalMap[w]] = v; // w is a ghost vertex
|
|
|
|
GMate[Ghost2LocalMap[w]] = v; // w is a ghost vertex
|
|
|
|
|
|
|
|
|
|
|
|
// Decrement the counter:
|
|
|
|
|
|
|
|
PROCESS_CROSS_EDGE(Counter, Ghost2LocalMap[w], SPtr);
|
|
|
|
|
|
|
|
} // End of if CandidateMate[w] = v
|
|
|
|
} // End of if CandidateMate[w] = v
|
|
|
|
} // End of if a Ghost Vertex
|
|
|
|
} // End of if a Ghost Vertex
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -150,7 +148,8 @@ void processMatchedVertices(
|
|
|
|
} // End of Else
|
|
|
|
} // End of Else
|
|
|
|
|
|
|
|
|
|
|
|
} // End of if(w >=0)
|
|
|
|
} // End of if(w >=0)
|
|
|
|
else option = 4;// End of Else: w == -1
|
|
|
|
else
|
|
|
|
|
|
|
|
option = 4; // End of Else: w == -1
|
|
|
|
// End: PARALLEL_PROCESS_EXPOSED_VERTEX_B(v)
|
|
|
|
// End: PARALLEL_PROCESS_EXPOSED_VERTEX_B(v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} // End of task
|
|
|
|
} // End of task
|
|
|
@ -164,10 +163,10 @@ void processMatchedVertices(
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (candidateMate[NLVer + Ghost2LocalMap[v]] == u)
|
|
|
|
if (candidateMate[NLVer + Ghost2LocalMap[v]] == u)
|
|
|
|
candidateMate[NLVer + Ghost2LocalMap[v]] = -1;
|
|
|
|
candidateMate[NLVer + Ghost2LocalMap[v]] = -1;
|
|
|
|
if (v != Mate[u - StartIndex]) option = 5; // u is local
|
|
|
|
if (v != Mate[u - StartIndex])
|
|
|
|
} // End of critical
|
|
|
|
option = 5; // u is local
|
|
|
|
} // End of Else //A Ghost Vertex
|
|
|
|
} // End of critical
|
|
|
|
|
|
|
|
} // End of Else //A Ghost Vertex
|
|
|
|
|
|
|
|
|
|
|
|
switch (option)
|
|
|
|
switch (option)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -184,6 +183,8 @@ void processMatchedVertices(
|
|
|
|
cout << "\n(" << myRank << ")MATCH: (" << v << "," << w << ") ";
|
|
|
|
cout << "\n(" << myRank << ")MATCH: (" << v << "," << w << ") ";
|
|
|
|
fflush(stdout);
|
|
|
|
fflush(stdout);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Decrement the counter:
|
|
|
|
|
|
|
|
PROCESS_CROSS_EDGE(Counter, Ghost2LocalMap[w], SPtr);
|
|
|
|
case 2:
|
|
|
|
case 2:
|
|
|
|
// Found a dominating edge, it is a ghost
|
|
|
|
// Found a dominating edge, it is a ghost
|
|
|
|
ghostOwner = findOwnerOfGhost(w, verDistance, myRank, numProcs);
|
|
|
|
ghostOwner = findOwnerOfGhost(w, verDistance, myRank, numProcs);
|
|
|
@ -243,27 +244,27 @@ void processMatchedVertices(
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PRINT_DEBUG_INFO_
|
|
|
|
#ifdef PRINT_DEBUG_INFO_
|
|
|
|
cout << "\n(" << myRank << ")Sending a success message: ";
|
|
|
|
cout << "\n(" << myRank << ")Sending a success message: ";
|
|
|
|
cout << "\n(" << myRank << ")Ghost is " << v << " Owner is: " << findOwnerOfGhost(v, verDistance, myRank, numProcs) << "\n";
|
|
|
|
cout << "\n(" << myRank << ")Ghost is " << v << " Owner is: " << findOwnerOfGhost(v, verDistance, myRank, numProcs) << "\n";
|
|
|
|
fflush(stdout);
|
|
|
|
fflush(stdout);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
ghostOwner = findOwnerOfGhost(v, verDistance, myRank, numProcs);
|
|
|
|
ghostOwner = findOwnerOfGhost(v, verDistance, myRank, numProcs);
|
|
|
|
assert(ghostOwner != -1);
|
|
|
|
assert(ghostOwner != -1);
|
|
|
|
assert(ghostOwner != myRank);
|
|
|
|
assert(ghostOwner != myRank);
|
|
|
|
#pragma omp atomic
|
|
|
|
#pragma omp atomic
|
|
|
|
PCounter[ghostOwner]++;
|
|
|
|
PCounter[ghostOwner]++;
|
|
|
|
#pragma omp atomic
|
|
|
|
#pragma omp atomic
|
|
|
|
(*msgIndPtr)++;
|
|
|
|
(*msgIndPtr)++;
|
|
|
|
#pragma omp atomic
|
|
|
|
#pragma omp atomic
|
|
|
|
(*NumMessagesBundledPtr)++;
|
|
|
|
(*NumMessagesBundledPtr)++;
|
|
|
|
privateQLocalVtx.push_back(u);
|
|
|
|
privateQLocalVtx.push_back(u);
|
|
|
|
privateQGhostVtx.push_back(v);
|
|
|
|
privateQGhostVtx.push_back(v);
|
|
|
|
privateQMsgType.push_back(SUCCESS);
|
|
|
|
privateQMsgType.push_back(SUCCESS);
|
|
|
|
privateQOwner.push_back(ghostOwner);
|
|
|
|
privateQOwner.push_back(ghostOwner);
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
} //End of switch
|
|
|
|
} // End of switch
|
|
|
|
|
|
|
|
|
|
|
|
} // End of inner for
|
|
|
|
} // End of inner for
|
|
|
|
|
|
|
|
|
|
|
|