Isolated under ifdef buggy matching

Poly-novrl
Cirdans-Home 11 months ago
parent 47bafd7fe7
commit 54d608d2dd

@ -72,8 +72,9 @@ void dMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge,
double tmr = MPI_Wtime();
#endif
#define OMP
// Rimosso per tornare al vecchio matching #define OMP
#ifdef OMP
fprintf(stderr,"Warning: using buggy OpenMP matching!\n");
dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(NLVer, NLEdge,
verLocPtr, verLocInd, edgeLocWeight,
verDistance, Mate,

@ -59,7 +59,11 @@
#include <assert.h>
#include <map>
#include <vector>
#ifdef OMP
// OpenMP is included and used if and only if the OpenMP version of the matching
// is required
#include "omp.h"
#endif
#include "primitiveDataTypeDefinitions.h"
#include "dataStrStaticQueue.h"
@ -174,6 +178,10 @@ extern "C"
#define MilanRealMin MINUS_INFINITY
#endif
#ifdef OMP
/* These functions are only used in the experimental OMP implementation, if that
is disabled there is no reason to actually compile or reference them. */
// Function of find the owner of a ghost vertex using binary search:
MilanInt findOwnerOfGhost(MilanLongInt vtxIndex, MilanLongInt *mVerDistance,
MilanInt myRank, MilanInt numProcs);
@ -420,6 +428,14 @@ extern "C"
MilanLongInt *msgIndSent, MilanLongInt *msgActualSent, MilanReal *msgPercent,
MilanReal *ph0_time, MilanReal *ph1_time, MilanReal *ph2_time,
MilanLongInt *ph1_card, MilanLongInt *ph2_card);
#endif
#ifndef OMP
//Function of find the owner of a ghost vertex using binary search:
inline MilanInt findOwnerOfGhost(MilanLongInt vtxIndex, MilanLongInt *mVerDistance,
MilanInt myRank, MilanInt numProcs);
#endif
void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateC(
MilanLongInt NLVer, MilanLongInt NLEdge,

@ -1,5 +1,5 @@
#include "MatchBoxPC.h"
#ifdef OMP
// ***********************************************************************
//
// MatchboxP: A C++ library for approximate weighted matching
@ -552,3 +552,4 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
#endif
#endif
#endif

@ -1,5 +1,5 @@
#include "MatchBoxPC.h"
#ifdef OMP
// TODO comment
void clean(MilanLongInt NLVer,
@ -89,3 +89,4 @@ void clean(MilanLongInt NLVer,
}
}
}
#endif

@ -1,5 +1,5 @@
#include "MatchBoxPC.h"
#ifdef OMP
/**
* Execute the research fr the Candidate Mate without controlling if the vertices are already matched.
* Returns the vertices with the highest weight
@ -71,3 +71,4 @@ MilanLongInt computeCandidateMate(MilanLongInt adj1,
return w;
}
#endif

@ -1,5 +1,5 @@
#include "MatchBoxPC.h"
#ifdef OMP
void extractUChunk(
vector<MilanLongInt> &UChunkBeingProcessed,
vector<MilanLongInt> &U,
@ -29,3 +29,4 @@ void extractUChunk(
} // End of critical U // End of critical U
}
#endif

@ -1,5 +1,5 @@
#include "MatchBoxPC.h"
#ifdef OMP
/// Find the owner of a ghost node:
MilanInt findOwnerOfGhost(MilanLongInt vtxIndex, MilanLongInt *mVerDistance,
MilanInt myRank, MilanInt numProcs)
@ -27,3 +27,4 @@ MilanInt findOwnerOfGhost(MilanLongInt vtxIndex, MilanLongInt *mVerDistance,
return Current;
} // End of findOwnerOfGhost()
#endif

@ -1,5 +1,5 @@
#include "MatchBoxPC.h"
#ifdef OMP
void initialize(MilanLongInt NLVer, MilanLongInt NLEdge,
MilanLongInt StartIndex, MilanLongInt EndIndex,
MilanLongInt *numGhostEdges,
@ -302,3 +302,4 @@ void initialize(MilanLongInt NLVer, MilanLongInt NLEdge,
} // End of single region
} // End of parallel region
}
#endif

@ -1,5 +1,5 @@
#include "MatchBoxPC.h"
#ifdef OMP
/**
* //TODO documentation
* @param k
@ -44,3 +44,4 @@ bool isAlreadyMatched(MilanLongInt node,
return val >= 0; // Already matched
}
#endif

@ -1,5 +1,5 @@
#include "MatchBoxPC.h"
#ifdef OMP
void PARALLEL_COMPUTE_CANDIDATE_MATE_B(MilanLongInt NLVer,
MilanLongInt *verLocPtr,
MilanLongInt *verLocInd,
@ -25,3 +25,4 @@ void PARALLEL_COMPUTE_CANDIDATE_MATE_B(MilanLongInt NLVer,
}
}
}
#endif

@ -1,5 +1,5 @@
#include "MatchBoxPC.h"
#ifdef OMP
void PROCESS_CROSS_EDGE(MilanLongInt *edge,
MilanLongInt *S)
{
@ -22,3 +22,4 @@ void PROCESS_CROSS_EDGE(MilanLongInt *edge,
// End: PARALLEL_PROCESS_CROSS_EDGE_B
}
#endif

@ -1,5 +1,5 @@
#include "MatchBoxPC.h"
#ifdef OMP
void PARALLEL_PROCESS_EXPOSED_VERTEX_B(MilanLongInt NLVer,
MilanLongInt *candidateMate,
MilanLongInt *verLocInd,
@ -193,3 +193,4 @@ void PARALLEL_PROCESS_EXPOSED_VERTEX_B(MilanLongInt NLVer,
} // End of parallel region
}
#endif

@ -1,5 +1,5 @@
#include "MatchBoxPC.h"
#ifdef OMP
void processMatchedVertices(
MilanLongInt NLVer,
vector<MilanLongInt> &UChunkBeingProcessed,
@ -292,3 +292,4 @@ void processMatchedVertices(
#endif
} // End of parallel region
}
#endif

@ -1,4 +1,5 @@
#include "MatchBoxPC.h"
#ifdef OMP
//#define DEBUG_HANG_
void processMatchedVerticesAndSendMessages(
MilanLongInt NLVer,
@ -306,3 +307,4 @@ void processMatchedVerticesAndSendMessages(
cout << myRank<<" Done sending messages"<<endl;
#endif
}
#endif

@ -1,4 +1,5 @@
#include "MatchBoxPC.h"
#ifdef OMP
//#define DEBUG_HANG_
void processMessages(
@ -313,3 +314,4 @@ void processMessages(
return;
}
#endif

@ -1,5 +1,5 @@
#include "MatchBoxPC.h"
#ifdef OMP
void queuesTransfer(vector<MilanLongInt> &U,
vector<MilanLongInt> &privateU,
vector<MilanLongInt> &QLocalVtx,
@ -34,3 +34,4 @@ void queuesTransfer(vector<MilanLongInt> &U,
privateQOwner.clear();
}
#endif

@ -1,5 +1,5 @@
#include "MatchBoxPC.h"
#ifdef OMP
void sendBundledMessages(MilanLongInt *numGhostEdges,
MilanInt *BufferSize,
MilanLongInt *Buffer,
@ -207,3 +207,4 @@ void sendBundledMessages(MilanLongInt *numGhostEdges,
}
}
}
#endif

Loading…
Cancel
Save