diff --git a/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP.cpp b/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP.cpp index e83c37b8..e598a21f 100644 --- a/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP.cpp +++ b/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP.cpp @@ -293,8 +293,11 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP( /* * OMP verGhostPtrInitialization * + * schedule(static) assign to each thread an huge chunk + * it is used in this case to reduce the overhead of chunk assignment + * and to reduce false sharing */ -#pragma omp for nowait +#pragma omp for nowait schedule(static) for (i = 0; i < numGhostVertices; i++) { //O(|Ghost Vertices|) verGhostPtr[i + 1] = verGhostPtr[i] + Counter[i]; #ifdef PRINT_DEBUG_INFO_ @@ -332,7 +335,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP( double verGhostIndInitialization = MPI_Wtime(); #endif -#pragma omp for nowait +#pragma omp for nowait schedule(static) for (v = 0; v < NLVer; v++) { adj1 = verLocPtr[v]; //Vertex Pointer adj2 = verLocPtr[v + 1]; @@ -433,7 +436,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP( * In particular PARALLEL_COMPUTE_CANDIDATE_MATE_B is now totally parallel. */ -#pragma omp for +#pragma omp for schedule(static) for ( v=0; v < NLVer; v++ ) { #ifdef PRINT_DEBUG_INFO_ cout<<"\n("<