PARALLEL_PROCESS_EXPOSED_VERTEX_B is actually not parallelizable. Atleast not as I was doing.

omp-walther
StefanoPetrilli 3 years ago
parent baffff3d93
commit 919e2a2918

@ -84,17 +84,17 @@ template<> inline MPI_Datatype TypeMap<float>() { return MPI_FLOAT; }
// DOUBLE PRECISION VERSION // DOUBLE PRECISION VERSION
//WARNING: The vertex block on a given rank is contiguous //WARNING: The vertex block on a given rank is contiguous
void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP( void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
MilanLongInt NLVer, MilanLongInt NLEdge, MilanLongInt NLVer, MilanLongInt NLEdge,
MilanLongInt* verLocPtr, MilanLongInt* verLocInd, MilanLongInt* verLocPtr, MilanLongInt* verLocInd,
MilanReal* edgeLocWeight, MilanReal* edgeLocWeight,
MilanLongInt* verDistance, MilanLongInt* verDistance,
MilanLongInt* Mate, MilanLongInt* Mate,
MilanInt myRank, MilanInt numProcs, MPI_Comm comm, MilanInt myRank, MilanInt numProcs, MPI_Comm comm,
MilanLongInt* msgIndSent, MilanLongInt* msgActualSent, MilanLongInt* msgIndSent, MilanLongInt* msgActualSent,
MilanReal* msgPercent, MilanReal* msgPercent,
MilanReal* ph0_time, MilanReal* ph1_time, MilanReal* ph2_time, MilanReal* ph0_time, MilanReal* ph1_time, MilanReal* ph2_time,
MilanLongInt* ph1_card, MilanLongInt* ph2_card ) { MilanLongInt* ph1_card, MilanLongInt* ph2_card ) {
/* /*
* verDistance: it's a vector long as the number of processors. * verDistance: it's a vector long as the number of processors.
* verDistance[i] contains the first node index of the i-th processor * verDistance[i] contains the first node index of the i-th processor
@ -424,99 +424,73 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
//Compute the Initial Matching Set: //Compute the Initial Matching Set:
S = numGhostVertices; //Initialize S with number of Ghost Vertices S = numGhostVertices; //Initialize S with number of Ghost Vertices
} // end of single region
/* /*
* OMP PARALLEL_COMPUTE_CANDIDATE_MATE_B * OMP PARALLEL_COMPUTE_CANDIDATE_MATE_B
* The next portion of code has been splitted * It is actually not possible to parallelize this cycle
* to make it 100% parallelized * as it is.
* *
* TODO: I think it diminish the cache update, does it? * TODO think how it could be parallelizable
* */
* TODO: would it make any sense to parallelize also the
* inner for?
*
* TODO: we have a false sharing on candidateMate
*/
#pragma omp for
for ( v=0; v < NLVer; v++ ) {
#ifdef PRINT_DEBUG_INFO_
cout<<"\n("<<myRank<<")Processing: "<<v+StartIndex<<endl; fflush(stdout);
#endif
//Start: PARALLEL_COMPUTE_CANDIDATE_MATE_B(v)
adj1 = verLocPtr[v];
adj2 = verLocPtr[v + 1];
w = -1;
heaviestEdgeWt = MilanRealMin; //Assign the smallest Value possible first LDBL_MIN
for (k = adj1; k < adj2; k++) {
if ((verLocInd[k] < StartIndex) || (verLocInd[k] > EndIndex)) { //Is it a ghost vertex?
if (GMate[Ghost2LocalMap[verLocInd[k]]] >= 0)// Already matched
continue;
} else { //A local vertex
if (Mate[verLocInd[k] - StartIndex] >= 0) // Already matched
continue;
}
if ((edgeLocWeight[k] > heaviestEdgeWt) ||
((edgeLocWeight[k] == heaviestEdgeWt) && (w < verLocInd[k]))) {
heaviestEdgeWt = edgeLocWeight[k];
w = verLocInd[k];
}
} //End of for loop
candidateMate[v] = w;
//End: PARALLEL_COMPUTE_CANDIDATE_MATE_B(v)
} for ( v=0; v < NLVer; v++ ) {
#ifdef PRINT_DEBUG_INFO_
cout<<"\n("<<myRank<<")Processing: "<<v+StartIndex<<endl; fflush(stdout);
#endif
//Start: PARALLEL_COMPUTE_CANDIDATE_MATE_B(v)
adj1 = verLocPtr[v];
adj2 = verLocPtr[v + 1];
w = -1;
heaviestEdgeWt = MilanRealMin; //Assign the smallest Value possible first LDBL_MIN
for (k = adj1; k < adj2; k++) {
if ((verLocInd[k] < StartIndex) || (verLocInd[k] > EndIndex)) { //Is it a ghost vertex?
if (GMate[Ghost2LocalMap[verLocInd[k]]] >= 0)// Already matched
continue;
} else { //A local vertex
if (Mate[verLocInd[k] - StartIndex] >= 0) // Already matched
continue;
}
/* if ((edgeLocWeight[k] > heaviestEdgeWt) ||
TODO this cycle has a lot of margin of improvement!!!! ((edgeLocWeight[k] == heaviestEdgeWt) && (w < verLocInd[k]))) {
This current version introduce some errors. heaviestEdgeWt = edgeLocWeight[k];
1 - ollback to the previous verison and check if it is w = verLocInd[k];
100% stable
2 - if the previous verison was stable all right, if not
that's a big deal
3 - reimplement step by step to check from where the instability
comes from
*/
#pragma omp for reduction(+: msgInd, NumMessagesBundled, myCard, PCounter[:numProcs]) }
for ( v=0; v < NLVer; v++ ) { } //End of for loop
candidateMate[v] = w;
//End: PARALLEL_COMPUTE_CANDIDATE_MATE_B(v)
//Start: PARALLEL_PROCESS_EXPOSED_VERTEX_B(v) //Start: PARALLEL_PROCESS_EXPOSED_VERTEX_B(v)
#ifdef PRINT_DEBUG_INFO_ #ifdef PRINT_DEBUG_INFO_
cout<<"\n("<<myRank<<")Processing: "<<v+StartIndex<<endl; fflush(stdout); cout<<"\n("<<myRank<<")Processing: "<<v+StartIndex<<endl; fflush(stdout);
#endif #endif
w = candidateMate[v];
#ifdef PRINT_DEBUG_INFO_ #ifdef PRINT_DEBUG_INFO_
cout<<"\n("<<myRank<<")"<<v+StartIndex<<" Points to: "<<w; fflush(stdout); cout<<"\n("<<myRank<<")"<<v+StartIndex<<" Points to: "<<w; fflush(stdout);
#endif #endif
//If found a dominating edge: //If found a dominating edge:
if (w >= 0) { if (w >= 0) {
myCard++; myCard++;
if ((w < StartIndex) || (w > EndIndex)) { //w is a ghost vertex if ((w < StartIndex) || (w > EndIndex)) { //w is a ghost vertex
//Build the Message Packet: //Build the Message Packet:
//Message[0] = v+StartIndex; //LOCAL //Message[0] = v+StartIndex; //LOCAL
//Message[1] = w; //GHOST //Message[1] = w; //GHOST
//Message[2] = REQUEST; //TYPE //Message[2] = REQUEST; //TYPE
//Send a Request (Asynchronous) //Send a Request (Asynchronous)
#ifdef PRINT_DEBUG_INFO_ #ifdef PRINT_DEBUG_INFO_
cout<<"\n("<<myRank<<")Sending a request message (291):"; cout<<"\n("<<myRank<<")Sending a request message (291):";
cout<<"\n("<<myRank<<")Local is: "<<v+StartIndex<<" Ghost is "<<w<<" Owner is: "<< findOwnerOfGhost(w, verDistance, myRank, numProcs) <<endl; cout<<"\n("<<myRank<<")Local is: "<<v+StartIndex<<" Ghost is "<<w<<" Owner is: "<< findOwnerOfGhost(w, verDistance, myRank, numProcs) <<endl;
fflush(stdout); fflush(stdout);
#endif #endif
/* MPI_Bsend(&Message[0], 3, MPI_INT, inputSubGraph.findOwner(w), /* MPI_Bsend(&Message[0], 3, MPI_INT, inputSubGraph.findOwner(w),
ComputeTag, comm);*/ ComputeTag, comm);*/
msgInd++; msgInd++;
NumMessagesBundled++; NumMessagesBundled++;
ghostOwner = findOwnerOfGhost(w, verDistance, myRank, numProcs); ghostOwner = findOwnerOfGhost(w, verDistance, myRank, numProcs);
PCounter[ghostOwner]++; //TODO maybe reduction? PCounter[ghostOwner]++;
#pragma omp critical
{
QLocalVtx.push_back(v + StartIndex); QLocalVtx.push_back(v + StartIndex);
QGhostVtx.push_back(w); QGhostVtx.push_back(w);
QMsgType.push_back(REQUEST); QMsgType.push_back(REQUEST);
@ -527,10 +501,10 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
if (candidateMate[NLVer + Ghost2LocalMap[w]] == v + StartIndex) { if (candidateMate[NLVer + Ghost2LocalMap[w]] == v + StartIndex) {
Mate[v] = w; Mate[v] = w;
GMate[Ghost2LocalMap[w]] = v + StartIndex; //w is a Ghost GMate[Ghost2LocalMap[w]] = v + StartIndex; //w is a Ghost
U.push_back(v + StartIndex); U.push_back(v + StartIndex);
U.push_back(w); U.push_back(w);
#ifdef PRINT_DEBUG_INFO_ #ifdef PRINT_DEBUG_INFO_
cout<<"\n("<<myRank<<")MATCH: ("<<v+StartIndex<<","<<w<<")"; fflush(stdout); cout<<"\n("<<myRank<<")MATCH: ("<<v+StartIndex<<","<<w<<")"; fflush(stdout);
@ -539,80 +513,78 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
//Start: PARALLEL_PROCESS_CROSS_EDGE_B(v) //Start: PARALLEL_PROCESS_CROSS_EDGE_B(v)
if (Counter[Ghost2LocalMap[w]] > 0) { if (Counter[Ghost2LocalMap[w]] > 0) {
Counter[Ghost2LocalMap[w]] = Counter[Ghost2LocalMap[w]] - 1; //Decrement Counter[Ghost2LocalMap[w]] = Counter[Ghost2LocalMap[w]] - 1; //Decrement
if (Counter[Ghost2LocalMap[w]] == 0) { if (Counter[Ghost2LocalMap[w]] == 0) {
S--; //Decrement S S--; //Decrement S
#ifdef PRINT_DEBUG_INFO_ #ifdef PRINT_DEBUG_INFO_
cout<<"\n("<<myRank<<")Decrementing S: Ghost vertex "<<w<<" has received all its messages"; cout<<"\n("<<myRank<<")Decrementing S: Ghost vertex "<<w<<" has received all its messages";
fflush(stdout); fflush(stdout);
#endif #endif
} }
} //End of if Counter[w] > 0 } //End of if Counter[w] > 0
//End: PARALLEL_PROCESS_CROSS_EDGE_B(v) //End: PARALLEL_PROCESS_CROSS_EDGE_B(v)
} //End of if CandidateMate[w] = v } //End of if CandidateMate[w] = v
} // end of critical region } //End of if a Ghost Vertex
} //End of if a Ghost Vertex else { // w is a local vertex
else { // w is a local vertex
if (candidateMate[w - StartIndex] == (v + StartIndex)) { if (candidateMate[w - StartIndex] == (v + StartIndex)) {
#pragma omp critical
{ Mate[v] = w; //v is local
Mate[v] = w; //v is local Mate[w - StartIndex] = v + StartIndex; //w is local
Mate[w - StartIndex] = v + StartIndex; //w is local //Q.push_back(u);
//Q.push_back(u); U.push_back(v + StartIndex);
U.push_back(v + StartIndex); U.push_back(w);
U.push_back(w);
#ifdef PRINT_DEBUG_INFO_ #ifdef PRINT_DEBUG_INFO_
cout<<"\n("<<myRank<<")MATCH: ("<<v+StartIndex<<","<<w<<") "; fflush(stdout); cout<<"\n("<<myRank<<")MATCH: ("<<v+StartIndex<<","<<w<<") "; fflush(stdout);
#endif #endif
}
} //End of if ( candidateMate[w-StartIndex] == (v+StartIndex) ) } //End of if ( candidateMate[w-StartIndex] == (v+StartIndex) )
} //End of Else } //End of Else
} //End of if(w >=0) } //End of if(w >=0)
else { else {
adj11 = verLocPtr[v]; adj11 = verLocPtr[v];
adj12 = verLocPtr[v + 1]; adj12 = verLocPtr[v + 1];
for (k1 = adj11; k1 < adj12; k1++) { for (k1 = adj11; k1 < adj12; k1++) {
w = verLocInd[k1]; w = verLocInd[k1];
if ((w < StartIndex) || (w > EndIndex)) { //A ghost if ((w < StartIndex) || (w > EndIndex)) { //A ghost
//Build the Message Packet: //Build the Message Packet:
//Message[0] = v+StartIndex; //LOCAL //Message[0] = v+StartIndex; //LOCAL
//Message[1] = w; //GHOST //Message[1] = w; //GHOST
//Message[2] = FAILURE; //TYPE //Message[2] = FAILURE; //TYPE
//Send a Request (Asynchronous) //Send a Request (Asynchronous)
#ifdef PRINT_DEBUG_INFO_ #ifdef PRINT_DEBUG_INFO_
cout<<"\n("<<myRank<<")Sending a failure message: "; cout<<"\n("<<myRank<<")Sending a failure message: ";
cout<<"\n("<<myRank<<")Ghost is "<<w<<" Owner is: "<<findOwnerOfGhost(w, verDistance, myRank, numProcs); cout<<"\n("<<myRank<<")Ghost is "<<w<<" Owner is: "<<findOwnerOfGhost(w, verDistance, myRank, numProcs);
fflush(stdout); fflush(stdout);
#endif #endif
/* MPI_Bsend(&Message[0], 3, MPI_INT, inputSubGraph.findOwner(w), /* MPI_Bsend(&Message[0], 3, MPI_INT, inputSubGraph.findOwner(w),
ComputeTag, comm); */ ComputeTag, comm); */
NumMessagesBundled++; NumMessagesBundled++;
msgInd++; msgInd++;
ghostOwner = findOwnerOfGhost(w, verDistance, myRank, numProcs); ghostOwner = findOwnerOfGhost(w, verDistance, myRank, numProcs);
PCounter[ghostOwner]++; PCounter[ghostOwner]++;
#pragma omp critical #pragma omp critical
{ {
QLocalVtx.push_back(v + StartIndex); QLocalVtx.push_back(v + StartIndex);
QGhostVtx.push_back(w); QGhostVtx.push_back(w);
QMsgType.push_back(FAILURE); QMsgType.push_back(FAILURE);
//ghostOwner = inputSubGraph.findOwner(w); //ghostOwner = inputSubGraph.findOwner(w);
assert(ghostOwner != -1); assert(ghostOwner != -1);
assert(ghostOwner != myRank); assert(ghostOwner != myRank);
QOwner.push_back(ghostOwner); QOwner.push_back(ghostOwner);
} }
} //End of if(GHOST) } //End of if(GHOST)
} //End of for loop } //End of for loop
} // End of Else: w == -1 } // End of Else: w == -1
//End: PARALLEL_PROCESS_EXPOSED_VERTEX_B(v) //End: PARALLEL_PROCESS_EXPOSED_VERTEX_B(v)
//} // end of critical } //End of for ( v=0; v < NLVer; v++ )
} //End of for ( v=0; v < NLVer; v++ )
} // end of single region
} // end of parallel region } // end of parallel region
tempCounter.clear(); //Do not need this any more tempCounter.clear(); //Do not need this any more
//} // end of parallel region
#ifdef PRINT_DEBUG_INFO_ #ifdef PRINT_DEBUG_INFO_
@ -663,7 +635,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
continue; continue;
} }
if( (edgeLocWeight[k1] > heaviestEdgeWt) || if( (edgeLocWeight[k1] > heaviestEdgeWt) ||
((edgeLocWeight[k1] == heaviestEdgeWt)&&(w < verLocInd[k1])) ) { ((edgeLocWeight[k1] == heaviestEdgeWt)&&(w < verLocInd[k1])) ) {
heaviestEdgeWt = edgeLocWeight[k1]; heaviestEdgeWt = edgeLocWeight[k1];
w = verLocInd[k1]; w = verLocInd[k1];
} }
@ -962,7 +934,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
} }
while ( true ) { while ( true ) {
#ifdef DEBUG_HANG_ #ifdef DEBUG_HANG_
if (myRank == 0) cout<<"\n("<<myRank<<") Main loop" <<endl; fflush(stdout); if (myRank == 0) cout<<"\n("<<myRank<<") Main loop" <<endl; fflush(stdout);
#endif #endif
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/////////////////////////// PROCESS MATCHED VERTICES ////////////////////////////// /////////////////////////// PROCESS MATCHED VERTICES //////////////////////////////
@ -1004,7 +976,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
} }
if( (edgeLocWeight[k1] > heaviestEdgeWt) || if( (edgeLocWeight[k1] > heaviestEdgeWt) ||
((edgeLocWeight[k1] == heaviestEdgeWt)&&(w < verLocInd[k1])) ) { ((edgeLocWeight[k1] == heaviestEdgeWt)&&(w < verLocInd[k1])) ) {
heaviestEdgeWt = edgeLocWeight[k1]; heaviestEdgeWt = edgeLocWeight[k1];
w = verLocInd[k1]; w = verLocInd[k1];
} }
@ -1112,7 +1084,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
MPI_Bsend(&Message[0], 3, TypeMap<MilanLongInt>(), ghostOwner, ComputeTag, comm); MPI_Bsend(&Message[0], 3, TypeMap<MilanLongInt>(), ghostOwner, ComputeTag, comm);
msgInd++; msgActual++; msgInd++; msgActual++;
#ifdef DEBUG_GHOST_ #ifdef DEBUG_GHOST_
if ((u<StartIndex) || (u>EndIndex)) { if ((u<StartIndex) || (u>EndIndex)) {
cout<<"\n("<<myRank<<") "<<__LINE__<<" From Send: should not happen: u= "<<u<<" v= "<<v<< cout<<"\n("<<myRank<<") "<<__LINE__<<" From Send: should not happen: u= "<<u<<" v= "<<v<<
" StartIndex "<<StartIndex<<" EndIndex "<<EndIndex<<endl; " StartIndex "<<StartIndex<<" EndIndex "<<EndIndex<<endl;
fflush(stdout); fflush(stdout);
@ -1133,10 +1105,10 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
if ( S == 0 ) { if ( S == 0 ) {
#ifdef DEBUG_HANG_ #ifdef DEBUG_HANG_
cout<<"\n("<<myRank<<") Breaking out" <<endl; fflush(stdout); cout<<"\n("<<myRank<<") Breaking out" <<endl; fflush(stdout);
#endif #endif
break; break;
} }
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/////////////////////////// PROCESS MESSAGES ////////////////////////////////////// /////////////////////////// PROCESS MESSAGES //////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
@ -1228,7 +1200,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
message_type = ReceiveBuffer[bundleCounter]; //TYPE message_type = ReceiveBuffer[bundleCounter]; //TYPE
bundleCounter++; bundleCounter++;
#ifdef DEBUG_GHOST_ #ifdef DEBUG_GHOST_
if ((v<StartIndex) || (v>EndIndex)) { if ((v<StartIndex) || (v>EndIndex)) {
cout<<"\n("<<myRank<<") From ReceiveBuffer: This should not happen: u= "<<u<<" v= "<<v<<" Type= "<<message_type<< cout<<"\n("<<myRank<<") From ReceiveBuffer: This should not happen: u= "<<u<<" v= "<<v<<" Type= "<<message_type<<
" StartIndex "<<StartIndex<<" EndIndex "<<EndIndex<<endl; " StartIndex "<<StartIndex<<" EndIndex "<<EndIndex<<endl;
fflush(stdout); fflush(stdout);
@ -1244,7 +1216,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
cout<<"\n("<<myRank<<")Message type is REQUEST"<<endl; fflush(stdout); cout<<"\n("<<myRank<<")Message type is REQUEST"<<endl; fflush(stdout);
#endif #endif
#ifdef DEBUG_GHOST_ #ifdef DEBUG_GHOST_
if ((v<0)||(v<StartIndex) || ((v-StartIndex)>NLVer)) { if ((v<0)||(v<StartIndex) || ((v-StartIndex)>NLVer)) {
cout<<"\n("<<myRank<<") case 1 Bad address "<<v<<" "<<StartIndex<<" "<<v-StartIndex<<" "<<NLVer<<endl; fflush(stdout); cout<<"\n("<<myRank<<") case 1 Bad address "<<v<<" "<<StartIndex<<" "<<v-StartIndex<<" "<<NLVer<<endl; fflush(stdout);
} }
@ -1296,7 +1268,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
} //End of if Counter[w] > 0 } //End of if Counter[w] > 0
//End: PARALLEL_PROCESS_CROSS_EDGE_B(v,u) //End: PARALLEL_PROCESS_CROSS_EDGE_B(v,u)
#ifdef DEBUG_GHOST_ #ifdef DEBUG_GHOST_
if ((v<0)||(v<StartIndex) || ((v-StartIndex)>NLVer)) { if ((v<0)||(v<StartIndex) || ((v-StartIndex)>NLVer)) {
cout<<"\n("<<myRank<<") case 2 Bad address "<<v<<" "<<StartIndex<<" "<<v-StartIndex<<" "<<NLVer<<endl; fflush(stdout); cout<<"\n("<<myRank<<") case 2 Bad address "<<v<<" "<<StartIndex<<" "<<v-StartIndex<<" "<<NLVer<<endl; fflush(stdout);
} }
#endif #endif
@ -1319,7 +1291,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
} }
if( (edgeLocWeight[k1] > heaviestEdgeWt) || if( (edgeLocWeight[k1] > heaviestEdgeWt) ||
((edgeLocWeight[k1] == heaviestEdgeWt)&&(w < verLocInd[k1])) ) { ((edgeLocWeight[k1] == heaviestEdgeWt)&&(w < verLocInd[k1])) ) {
heaviestEdgeWt = edgeLocWeight[k1]; heaviestEdgeWt = edgeLocWeight[k1];
w = verLocInd[k1]; w = verLocInd[k1];
} }
@ -1451,8 +1423,8 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
MPI_Waitall(MessageIndex, &SRequest[0], &SStatus[0]); MPI_Waitall(MessageIndex, &SRequest[0], &SStatus[0]);
//MPI_Buffer_attach(&Buffer, BufferSize); //Attach the Buffer //MPI_Buffer_attach(&Buffer, BufferSize); //Attach the Buffer
if ( BufferSize > 0 ) { if ( BufferSize > 0 ) {
MPI_Buffer_detach(&Buffer, &BufferSize); //Detach the Buffer MPI_Buffer_detach(&Buffer, &BufferSize); //Detach the Buffer
free(Buffer); //Free the memory that was allocated free(Buffer); //Free the memory that was allocated
} }
finishTime = MPI_Wtime(); finishTime = MPI_Wtime();
*ph2_time = finishTime-startTime; //Time taken for Phase-2 *ph2_time = finishTime-startTime; //Time taken for Phase-2
@ -1478,9 +1450,9 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
*msgActualSent = msgActual; *msgActualSent = msgActual;
*msgIndSent = msgInd; *msgIndSent = msgInd;
if (msgInd > 0) { if (msgInd > 0) {
*msgPercent = ((double)NumMessagesBundled/(double)(msgInd))*100.0; *msgPercent = ((double)NumMessagesBundled/(double)(msgInd))*100.0;
} else { } else {
*msgPercent = 0; *msgPercent = 0;
} }
#ifdef DEBUG_HANG_ #ifdef DEBUG_HANG_

Loading…
Cancel
Save