Remoe MateLock

omp-walther
StefanoPetrilli 2 years ago
parent d24c8c2d46
commit cb660e044d

@ -217,7 +217,6 @@ extern "C"
MilanLongInt *S,
MilanLongInt *verLocInd,
MilanLongInt *verLocPtr,
omp_lock_t *MateLock,
map<MilanLongInt, MilanLongInt> &Ghost2LocalMap,
vector<MilanLongInt> &Counter,
vector<MilanLongInt> &verGhostPtr,
@ -249,8 +248,7 @@ extern "C"
MilanLongInt msgInd,
MilanLongInt *msgIndSent,
MilanLongInt NumMessagesBundled,
MilanReal *msgPercent,
omp_lock_t *MateLock);
MilanReal *msgPercent);
void PARALLEL_COMPUTE_CANDIDATE_MATE_B(MilanLongInt NLVer,
MilanLongInt *verLocPtr,
@ -322,8 +320,7 @@ extern "C"
staticQueue &privateQLocalVtx,
staticQueue &privateQGhostVtx,
staticQueue &privateQMsgType,
staticQueue &privateQOwner,
omp_lock_t *MateLock);
staticQueue &privateQOwner);
void sendBundledMessages(MilanLongInt *numGhostEdgesPtr,
MilanInt *BufferSizePtr,

@ -190,14 +190,10 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
MilanInt BufferSize;
MilanLongInt *Buffer;
// Declare the locks
omp_lock_t MateLock[NLVer];
initialize(NLVer, NLEdge, StartIndex,
EndIndex, &numGhostEdges,
&numGhostVertices, &S,
verLocInd, verLocPtr,
MateLock,
Ghost2LocalMap, Counter,
verGhostPtr, verGhostInd,
tempCounter, GMate,
@ -307,8 +303,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
privateQLocalVtx,
privateQGhostVtx,
privateQMsgType,
privateQOwner,
MateLock);
privateQOwner);
/////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////// SEND BUNDLED MESSAGES /////////////////////////////////////
@ -616,8 +611,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
msgInd,
msgIndSent,
NumMessagesBundled,
msgPercent,
MateLock);
msgPercent);
finishTime = MPI_Wtime();
*ph2_time = finishTime - startTime; // Time taken for Phase-2

@ -16,8 +16,7 @@ void clean(MilanLongInt NLVer,
MilanLongInt msgInd,
MilanLongInt *msgIndSent,
MilanLongInt NumMessagesBundled,
MilanReal *msgPercent,
omp_lock_t *MateLock)
MilanReal *msgPercent)
{
// Cleanup Phase
@ -83,10 +82,6 @@ void clean(MilanLongInt NLVer,
*msgPercent = 0;
}
}
// Destroy the locks
#pragma omp taskloop num_tasks(NUM_THREAD)
for (int i = 0; i < NLVer; i++)
omp_destroy_lock(&MateLock[i]);
#ifdef DEBUG_HANG_
if (myRank == 0)

@ -7,7 +7,6 @@ void initialize(MilanLongInt NLVer, MilanLongInt NLEdge,
MilanLongInt *S,
MilanLongInt *verLocInd,
MilanLongInt *verLocPtr,
omp_lock_t *MateLock,
map<MilanLongInt, MilanLongInt> &Ghost2LocalMap,
vector<MilanLongInt> &Counter,
vector<MilanLongInt> &verGhostPtr,
@ -40,10 +39,6 @@ void initialize(MilanLongInt NLVer, MilanLongInt NLEdge,
#pragma omp single
{
// Initialize the locks
#pragma omp taskloop num_tasks(NUM_THREAD)
for (i = 0; i < NLVer; i++)
omp_init_lock(&MateLock[i]);
#ifdef TIME_TRACKER
double Ghost2LocalInitialization = MPI_Wtime();

@ -10,6 +10,8 @@ void PROCESS_CROSS_EDGE(vector<MilanLongInt> &Counter,
#pragma omp atomic capture
captureCounter = --Counter[edge]; // Decrement
//assert(captureCounter >= 0);
if (captureCounter == 0)
#pragma omp atomic
(*SPtr)--; // Decrement S

@ -31,8 +31,7 @@ void processMatchedVertices(
staticQueue &privateQLocalVtx,
staticQueue &privateQGhostVtx,
staticQueue &privateQMsgType,
staticQueue &privateQOwner,
omp_lock_t *MateLock)
staticQueue &privateQOwner)
{
MilanLongInt adj1, adj2, adj11, adj12, k, k1, v = -1, w = -1, ghostOwner;

Loading…
Cancel
Save