|
|
@ -1,5 +1,5 @@
|
|
|
|
#include "MatchBoxPC.h"
|
|
|
|
#include "MatchBoxPC.h"
|
|
|
|
#ifdef OPENMP
|
|
|
|
|
|
|
|
// ***********************************************************************
|
|
|
|
// ***********************************************************************
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// MatchboxP: A C++ library for approximate weighted matching
|
|
|
|
// MatchboxP: A C++ library for approximate weighted matching
|
|
|
@ -126,10 +126,8 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
|
|
|
|
fflush(stdout);
|
|
|
|
fflush(stdout);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// The starting vertex owned by the current rank
|
|
|
|
MilanLongInt StartIndex = verDistance[myRank]; // The starting vertex owned by the current rank
|
|
|
|
MilanLongInt StartIndex = verDistance[myRank];
|
|
|
|
MilanLongInt EndIndex = verDistance[myRank + 1] - 1; // The ending vertex owned by the current rank
|
|
|
|
// The ending vertex owned by the current rank
|
|
|
|
|
|
|
|
MilanLongInt EndIndex = verDistance[myRank + 1] - 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MPI_Status computeStatus;
|
|
|
|
MPI_Status computeStatus;
|
|
|
|
|
|
|
|
|
|
|
@ -147,8 +145,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
|
|
|
|
// only one message will be sent in the initialization phase -
|
|
|
|
// only one message will be sent in the initialization phase -
|
|
|
|
// one of: REQUEST/FAILURE/SUCCESS
|
|
|
|
// one of: REQUEST/FAILURE/SUCCESS
|
|
|
|
vector<MilanLongInt> QLocalVtx, QGhostVtx, QMsgType;
|
|
|
|
vector<MilanLongInt> QLocalVtx, QGhostVtx, QMsgType;
|
|
|
|
// Changed by Fabio to be an integer, addresses needs to be integers!
|
|
|
|
vector<MilanInt> QOwner; // Changed by Fabio to be an integer, addresses needs to be integers!
|
|
|
|
vector<MilanInt> QOwner;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MilanLongInt *PCounter = new MilanLongInt[numProcs];
|
|
|
|
MilanLongInt *PCounter = new MilanLongInt[numProcs];
|
|
|
|
for (int i = 0; i < numProcs; i++)
|
|
|
|
for (int i = 0; i < numProcs; i++)
|
|
|
@ -156,8 +153,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
|
|
|
|
|
|
|
|
|
|
|
|
MilanLongInt NumMessagesBundled = 0;
|
|
|
|
MilanLongInt NumMessagesBundled = 0;
|
|
|
|
// TODO when the last computational section will be refactored this could be eliminated
|
|
|
|
// TODO when the last computational section will be refactored this could be eliminated
|
|
|
|
// Changed by Fabio to be an integer, addresses needs to be integers!
|
|
|
|
MilanInt ghostOwner = 0; // Changed by Fabio to be an integer, addresses needs to be integers!
|
|
|
|
MilanInt ghostOwner = 0;
|
|
|
|
|
|
|
|
MilanLongInt *candidateMate = nullptr;
|
|
|
|
MilanLongInt *candidateMate = nullptr;
|
|
|
|
#ifdef PRINT_DEBUG_INFO_
|
|
|
|
#ifdef PRINT_DEBUG_INFO_
|
|
|
|
cout << "\n(" << myRank << ")NV: " << NLVer << " Edges: " << NLEdge;
|
|
|
|
cout << "\n(" << myRank << ")NV: " << NLVer << " Edges: " << NLEdge;
|
|
|
@ -172,12 +168,9 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
|
|
|
|
MilanLongInt myCard = 0;
|
|
|
|
MilanLongInt myCard = 0;
|
|
|
|
|
|
|
|
|
|
|
|
// Build the Ghost Vertex Set: Vg
|
|
|
|
// Build the Ghost Vertex Set: Vg
|
|
|
|
// Map each ghost vertex to a local vertex
|
|
|
|
map<MilanLongInt, MilanLongInt> Ghost2LocalMap; // Map each ghost vertex to a local vertex
|
|
|
|
map<MilanLongInt, MilanLongInt> Ghost2LocalMap;
|
|
|
|
vector<MilanLongInt> Counter; // Store the edge count for each ghost vertex
|
|
|
|
// Store the edge count for each ghost vertex
|
|
|
|
MilanLongInt numGhostVertices = 0, numGhostEdges = 0; // Number of Ghost vertices
|
|
|
|
vector<MilanLongInt> Counter;
|
|
|
|
|
|
|
|
// Number of Ghost vertices
|
|
|
|
|
|
|
|
MilanLongInt numGhostVertices = 0, numGhostEdges = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PRINT_DEBUG_INFO_
|
|
|
|
#ifdef PRINT_DEBUG_INFO_
|
|
|
|
cout << "\n(" << myRank << ")About to compute Ghost Vertices...";
|
|
|
|
cout << "\n(" << myRank << ")About to compute Ghost Vertices...";
|
|
|
@ -559,4 +552,3 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|