mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -286,7 +286,7 @@ Foam::parLagrangianRedistributor::redistributeLagrangianPositions
|
||||
nsTransPs[sendProcI] = subMap[sendProcI].size();
|
||||
}
|
||||
// Send sizes across. Note: blocks.
|
||||
combineReduce(sizes, Pstream::listEq());
|
||||
Pstream::combineAllGather(sizes, Pstream::listEq());
|
||||
|
||||
labelListList constructMap(Pstream::nProcs());
|
||||
label constructSize = 0;
|
||||
|
||||
@ -2649,7 +2649,7 @@ int main(int argc, char *argv[])
|
||||
bool nfs = true;
|
||||
{
|
||||
List<fileName> roots(1, args.rootPath());
|
||||
combineReduce(roots, ListOps::uniqueEqOp<fileName>());
|
||||
Pstream::combineAllGather(roots, ListOps::uniqueEqOp<fileName>());
|
||||
nfs = (roots.size() == 1);
|
||||
}
|
||||
|
||||
@ -3280,8 +3280,7 @@ int main(int argc, char *argv[])
|
||||
)
|
||||
);
|
||||
meshDir[Pstream::myProcNo()] = fName.path();
|
||||
Pstream::gatherList(meshDir);
|
||||
Pstream::scatterList(meshDir);
|
||||
Pstream::allGatherList(meshDir);
|
||||
//Info<< "Per processor faces dirs:" << nl
|
||||
// << " " << meshDir << nl << endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user