From b2230a6d6d87e7098c59655f435ef2a6c4319751 Mon Sep 17 00:00:00 2001 From: StefanoPetrilli Date: Mon, 13 Jun 2022 16:09:00 -0500 Subject: [PATCH] Improved critical region U --- ...istEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP.cpp b/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP.cpp index dee2a019..966b86a2 100644 --- a/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP.cpp +++ b/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP.cpp @@ -841,9 +841,13 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP( } //End of If( v != Mate[u] ) } //End of critical region } //End of Else //A Ghost Vertex + } //End of For Loop adj(u) + } //End of if ( (u >= StartIndex) && (u <= EndIndex) ) //Process Only If a Local Vertex + //Avoid to ask for the critical section if there is nothing to add + if(privateU.empty()) continue; #pragma omp critical(U) { while(!privateU.empty()) { @@ -852,7 +856,6 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP( myCard += privateMyCard; } //End of critical U - } //End of while ( /*!Q.empty()*/ !U.empty() ) #pragma omp critical(privateMsg)