|
|
|
@ -62,24 +62,16 @@ void PARALLEL_PROCESS_EXPOSED_VERTEX_B(MilanLongInt NLVer,
|
|
|
|
|
fflush(stdout);
|
|
|
|
|
#endif
|
|
|
|
|
// If found a dominating edge:
|
|
|
|
|
if (w >= 0)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
#pragma omp critical(processExposed)
|
|
|
|
|
if (w >= 0) {
|
|
|
|
|
#pragma omp critical(Matching)
|
|
|
|
|
{
|
|
|
|
|
if (isAlreadyMatched(verLocInd[k], StartIndex, EndIndex, GMate, Mate, Ghost2LocalMap)) {
|
|
|
|
|
w = computeCandidateMate(verLocPtr[v],
|
|
|
|
|
verLocPtr[v + 1],
|
|
|
|
|
edgeLocWeight, 0,
|
|
|
|
|
verLocInd,
|
|
|
|
|
StartIndex,
|
|
|
|
|
EndIndex,
|
|
|
|
|
GMate,
|
|
|
|
|
Mate,
|
|
|
|
|
Ghost2LocalMap);
|
|
|
|
|
w = computeCandidateMate(verLocPtr[v], verLocPtr[v + 1], edgeLocWeight, 0,
|
|
|
|
|
verLocInd, StartIndex, EndIndex,
|
|
|
|
|
GMate, Mate, Ghost2LocalMap);
|
|
|
|
|
candidateMate[v] = w;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (w >= 0) {
|
|
|
|
|
(*myCard)++;
|
|
|
|
|
if ((w < StartIndex) || (w > EndIndex)) { // w is a ghost vertex
|
|
|
|
@ -88,32 +80,23 @@ void PARALLEL_PROCESS_EXPOSED_VERTEX_B(MilanLongInt NLVer,
|
|
|
|
|
option = 1;
|
|
|
|
|
Mate[v] = w;
|
|
|
|
|
GMate[Ghost2LocalMap[w]] = v + StartIndex; // w is a Ghost
|
|
|
|
|
|
|
|
|
|
} // End of if CandidateMate[w] = v
|
|
|
|
|
|
|
|
|
|
} // End of if a Ghost Vertex
|
|
|
|
|
else { // w is a local vertex
|
|
|
|
|
|
|
|
|
|
if (candidateMate[w - StartIndex] == (v + StartIndex)) {
|
|
|
|
|
option = 3;
|
|
|
|
|
Mate[v] = w; // v is local
|
|
|
|
|
Mate[w - StartIndex] = v + StartIndex; // w is local
|
|
|
|
|
|
|
|
|
|
#ifdef PRINT_DEBUG_INFO_
|
|
|
|
|
cout << "\n(" << myRank << ")MATCH: (" << v + StartIndex << "," << w << ") ";
|
|
|
|
|
fflush(stdout);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
} // End of if ( candidateMate[w-StartIndex] == (v+StartIndex) )
|
|
|
|
|
} // End of Else
|
|
|
|
|
|
|
|
|
|
} // End of second if
|
|
|
|
|
|
|
|
|
|
} // End critical processExposed
|
|
|
|
|
|
|
|
|
|
} // End of if(w >=0)
|
|
|
|
|
else {
|
|
|
|
|
#pragma omp critical(adjuse)
|
|
|
|
|
//#pragma omp critical(adjuse)
|
|
|
|
|
{
|
|
|
|
|
// This piece of code is executed a really small number of times
|
|
|
|
|
adj11 = verLocPtr[v];
|
|
|
|
@ -132,6 +115,7 @@ void PARALLEL_PROCESS_EXPOSED_VERTEX_B(MilanLongInt NLVer,
|
|
|
|
|
ghostOwner = findOwnerOfGhost(w, verDistance, myRank, numProcs);
|
|
|
|
|
// assert(ghostOwner != -1);
|
|
|
|
|
// assert(ghostOwner != myRank);
|
|
|
|
|
#pragma omp atomic
|
|
|
|
|
PCounter[ghostOwner]++;
|
|
|
|
|
|
|
|
|
|
privateQLocalVtx.push_back(v + StartIndex);
|
|
|
|
@ -171,6 +155,7 @@ void PARALLEL_PROCESS_EXPOSED_VERTEX_B(MilanLongInt NLVer,
|
|
|
|
|
ghostOwner = findOwnerOfGhost(w, verDistance, myRank, numProcs);
|
|
|
|
|
// assert(ghostOwner != -1);
|
|
|
|
|
// assert(ghostOwner != myRank);
|
|
|
|
|
#pragma omp atomic
|
|
|
|
|
PCounter[ghostOwner]++;
|
|
|
|
|
|
|
|
|
|
privateQLocalVtx.push_back(v + StartIndex);
|
|
|
|
|