diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C index ff94ed68f5d8c3f56719fb79bbb14d165896f976..ca36b18808eef7a0a4c71bc2a5aef00faa75c7f5 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C @@ -599,6 +599,8 @@ void Foam::conformalVoronoiMesh::buildParallelInterface Info<< nl << "Parallel interface construction" << endl; + timeCheck("Before buildParallelInterface"); + // Hard coded switch, can be turned on for testing and debugging purposes - // all vertices will be referred to all processors, use with caution for // big cases. @@ -612,6 +614,8 @@ void Foam::conformalVoronoiMesh::buildParallelInterface receivedVertices, outputName ); + + timeCheck("After buildParallelInterfaceAll"); } if (initialEdgeReferral) @@ -627,6 +631,8 @@ void Foam::conformalVoronoiMesh::buildParallelInterface receivedVertices, outputName ); + + timeCheck("After buildParallelInterfaceIntersection"); } buildParallelInterfaceInfluence @@ -773,11 +779,15 @@ void Foam::conformalVoronoiMesh::buildParallelInterfaceIntersection dE0.setSize(fI); dE1.setSize(fI); + timeCheck("buildParallelInterfaceIntersection before intersectsProc"); + // Preform intersections in both directions, as there is no sense // associated with the Dual edge List<List<pointIndexHit> > intersectionForward(intersectsProc(dE0, dE1)); List<List<pointIndexHit> > intersectionReverse(intersectsProc(dE1, dE0)); + timeCheck("buildParallelInterfaceIntersection after intersectsProc"); + fI = 0; // Relying on the order of iteration of facets being the same as before @@ -947,6 +957,8 @@ void Foam::conformalVoronoiMesh::buildParallelInterfaceIntersection } } + timeCheck("buildParallelInterfaceIntersection before referVertices"); + referVertices ( targetProcessor, diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index 2734640c064ba5c8945ae2889c9b2c4e44eec8fd..31ee3dc4ba2f1a6776ca5f49cf4e4ef31ee47fbf 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -63,17 +63,51 @@ void Foam::conformalVoronoiMesh::timeCheck if (Pstream::parRun()) { - reduce(mSize, sumOp<label>()); - reduce(mPeak, sumOp<label>()); - reduce(mRss, sumOp<label>()); - } + labelList allMSize(Pstream::nProcs()); + labelList allMPeak(Pstream::nProcs()); + labelList allMRss(Pstream::nProcs()); + + allMSize[Pstream::myProcNo()] = mSize; + allMPeak[Pstream::myProcNo()] = mPeak; + allMRss[Pstream::myProcNo()] = mRss; + + Pstream::gatherList(allMSize); + Pstream::gatherList(allMPeak); + Pstream::gatherList(allMRss); + + Info<< "--- [ " + << "mem (kB) " << tab + << "size" << tab + << "peak" << tab + << "rss" + << " ] --- " << endl; + + forAll(allMSize, procI) + { + Info<< "--- [ " + << procI << " " << tab + << allMSize[procI] << tab + << allMPeak[procI] << tab + << allMRss[procI] + << " ] --- " << endl; + } + + Info<< "--- [ " + << "sum " << tab + << sum(allMSize) << tab + << sum(allMPeak) << tab + << sum(allMRss) + << " ] --- " << endl; - Info<< "--- [ " - << runTime_.elapsedCpuTime() << " s, " - << "mem size " << mSize << " kB, " - << "mem peak " << mPeak << " kB, " - << "mem rss " << mRss << " kB" - << " ] --- " << endl; + } + else + { + Info<< "--- [ " + << "mem size " << mSize << " kB, " + << "mem peak " << mPeak << " kB, " + << "mem rss " << mRss << " kB" + << " ] --- " << endl; + } } } }