ENH: additional gather/scatter modes for PstreamBuffers

- gather/scatter types of operations can avoid AllToAll communication
  and use simple MPI gather (or scatter) to establish the receive sizes.

  New methods: finishedGathers() / finishedScatters()
This commit is contained in:
Mark Olesen
2022-03-11 12:15:59 +01:00
parent a674c9d373
commit de8ef5332d
11 changed files with 237 additions and 71 deletions

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2015-2021 OpenCFD Ltd.
Copyright (C) 2015-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -179,11 +179,10 @@ void surfaceNoise::readSurfaceData
}
}
pBufs.finishedSends();
pBufs.finishedScatters();
// Receive data from the master
UIPstream fromProc(Pstream::masterNo(), pBufs);
scalarList pSlice(fromProc);
forAll(pSlice, faceI)
@ -264,7 +263,7 @@ scalar surfaceNoise::writeSurfaceData
toProc << data;
}
pBufs.finishedSends();
pBufs.finishedGathers();
scalar areaAverage = 0;
if (Pstream::master())
@ -379,7 +378,7 @@ scalar surfaceNoise::surfaceAverage
toProc << data;
}
pBufs.finishedSends();
pBufs.finishedGathers();
scalar areaAverage = 0;
if (Pstream::master())