mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use mpi gather for list values in a few places
- avoid gatherList/scatterList when value are only need on master
This commit is contained in:
committed by
Andrew Heather
parent
c086f22298
commit
af8161925b
@ -261,15 +261,17 @@ boolList haveFacesFile(const fileName& meshPath)
|
||||
{
|
||||
const fileName facesPath(meshPath/"faces");
|
||||
Info<< "Checking for mesh in " << facesPath << nl << endl;
|
||||
boolList haveMesh(Pstream::nProcs(), false);
|
||||
haveMesh[Pstream::myProcNo()] = fileHandler().isFile
|
||||
boolList haveMesh
|
||||
(
|
||||
fileHandler().filePath(facesPath)
|
||||
UPstream::listGatherValues<bool>
|
||||
(
|
||||
fileHandler().isFile(fileHandler().filePath(facesPath))
|
||||
)
|
||||
);
|
||||
Pstream::gatherList(haveMesh);
|
||||
Pstream::scatterList(haveMesh);
|
||||
Info<< "Per processor mesh availability:" << nl
|
||||
<< " " << flatOutput(haveMesh) << nl << endl;
|
||||
|
||||
Pstream::broadcast(haveMesh);
|
||||
return haveMesh;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user