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

@ -287,8 +287,7 @@ bool setFaceFieldType
}
}
Pstream::listCombineGather(nChanged, plusEqOp<label>());
Pstream::broadcast(nChanged);
Pstream::listCombineAllGather(nChanged, plusEqOp<label>());
auto& fieldBf = field.boundaryFieldRef();

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2020 OpenCFD Ltd.
Copyright (C) 2016-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -456,12 +456,9 @@ int main(int argc, char *argv[])
remoteCoarseSf[Pstream::myProcNo()] = localCoarseSf;
remoteCoarseAgg[Pstream::myProcNo()] = localAgg;
Pstream::gatherList(remoteCoarseCf);
Pstream::scatterList(remoteCoarseCf);
Pstream::gatherList(remoteCoarseSf);
Pstream::scatterList(remoteCoarseSf);
Pstream::gatherList(remoteCoarseAgg);
Pstream::scatterList(remoteCoarseAgg);
Pstream::allGatherList(remoteCoarseCf);
Pstream::allGatherList(remoteCoarseSf);
Pstream::allGatherList(remoteCoarseAgg);
globalIndex globalNumbering(nCoarseFaces);