mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 22:55:12 +00:00
Remoe MateLock
This commit is contained in:
@@ -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,
|
||||
|
||||
+2
-8
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user