ENH: remove blocking communication for gather patterns

ENH: eliminate unnecessary duplicate communicator

- in globalMeshData previously had a comm_dup hack to avoid clashes
  with deltaCoeffs calculations. However, this was largely due to a
  manual implementation of reduce() that used point-to-point
  communication. This has since been updated to use an MPI_Allreduce
  and now an MPI_Allgather, neither of which need this hack.
This commit is contained in:
Mark Olesen
2024-02-29 18:35:03 +01:00
parent b98f53ceca
commit 7006056eae
29 changed files with 272 additions and 595 deletions

View File

@ -541,7 +541,7 @@ void syncPoints
// Is there any coupled patch with transformation?
bool hasTransformation = false;
if (Pstream::parRun())
if (UPstream::parRun())
{
const labelList& procPatches = mesh.globalData().processorPatches();
@ -569,7 +569,12 @@ void syncPoints
}
// buffered send
OPstream::bsend(patchInfo, procPatch.neighbProcNo());
OPstream toNbr
(
UPstream::commsTypes::blocking,
procPatch.neighbProcNo()
);
toNbr << patchInfo;
}
}
@ -583,10 +588,10 @@ void syncPoints
if (pp.nPoints() && !procPatch.owner())
{
pointField nbrPatchInfo;
// We do not know the number of points on the other side
// so cannot use UIPstream::read
pointField nbrPatchInfo;
IPstream::recv(nbrPatchInfo, procPatch.neighbProcNo());
// Null any value which is not on neighbouring processor

View File

@ -374,9 +374,9 @@ void getInterfaceSizes
}
if (Pstream::parRun())
if (UPstream::parRun())
{
if (Pstream::master())
if (UPstream::master())
{
// Receive and add to my sizes
for (const int proci : UPstream::subProcs())
@ -420,8 +420,8 @@ void getInterfaceSizes
}
else
{
// buffered send to master
OPstream::bsend(regionsToSize, UPstream::masterNo());
// send to master
OPstream::send(regionsToSize, UPstream::masterNo());
}
}