ENH: bundle Pstream:: AllGather methods

- bundles frequently used 'gather/scatter' patterns more consistently.

  - combineAllGather     -> combineGather + broadcast
  - listCombineAllGather -> listCombineGather + broadcast
  - mapCombineAllGather  -> mapCombineGather + broadcast
  - allGatherList        -> gatherList + scatterList
  - reduce               -> gather + broadcast (ie, allreduce)

- The allGatherList currently wraps gatherList/scatterList, but may be
  replaced with a different algorithm in the future.

STYLE: PstreamCombineReduceOps.H is mostly unneeded now
This commit is contained in:
Mark Olesen
2022-03-28 16:30:51 +02:00
parent e98acdc4fc
commit d38de84d21
105 changed files with 935 additions and 605 deletions

View File

@ -223,7 +223,7 @@ bool writeOptionalMeshObject
// Make sure all know if there is a valid class name
wordList classNames(1, io.headerClassName());
combineReduce(classNames, uniqueEqOp<word>());
Pstream::combineAllGather(classNames, uniqueEqOp<word>());
// Check for correct type
if (classNames[0] == T::typeName)
@ -422,7 +422,7 @@ int main(int argc, char *argv[])
)
);
combineReduce(lagrangianDirs, uniqueEqOp<fileName>());
Pstream::combineAllGather(lagrangianDirs, uniqueEqOp<fileName>());
if (!lagrangianDirs.empty())
{
@ -459,7 +459,7 @@ int main(int argc, char *argv[])
)
);
combineReduce(cloudDirs, uniqueEqOp<fileName>());
Pstream::combineAllGather(cloudDirs, uniqueEqOp<fileName>());
forAll(cloudDirs, i)
{
@ -485,7 +485,7 @@ int main(int argc, char *argv[])
);
// Combine with all other cloud objects
combineReduce(cloudFields, uniqueEqOp<word>());
Pstream::combineAllGather(cloudFields, uniqueEqOp<word>());
for (const word& name : cloudFields)
{