mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: redistributePar: Distributing refinement data. Fixes #3137.
- was using blocking (=buffered) comms - was running out of MPI_COMM_SIZE buffer space - now using PstreamBuffers to have non-blocing comms
This commit is contained in:
@ -1271,6 +1271,9 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
|
|||||||
|
|
||||||
// Create subsetted refinement tree consisting of all parents that
|
// Create subsetted refinement tree consisting of all parents that
|
||||||
// move in their whole to other processor.
|
// move in their whole to other processor.
|
||||||
|
|
||||||
|
PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking);
|
||||||
|
|
||||||
for (const int proci : Pstream::allProcs())
|
for (const int proci : Pstream::allProcs())
|
||||||
{
|
{
|
||||||
//Pout<< "-- Subetting for processor " << proci << endl;
|
//Pout<< "-- Subetting for processor " << proci << endl;
|
||||||
@ -1364,11 +1367,15 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
|
|||||||
|
|
||||||
|
|
||||||
// Send to neighbours
|
// Send to neighbours
|
||||||
OPstream toNbr(Pstream::commsTypes::blocking, proci);
|
UOPstream toNbr(proci, pBufs);
|
||||||
toNbr << newSplitCells << newVisibleCells;
|
toNbr << newSplitCells << newVisibleCells;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Wait for finish
|
||||||
|
pBufs.finishedSends();
|
||||||
|
|
||||||
|
|
||||||
// Receive from neighbours and merge
|
// Receive from neighbours and merge
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@ -1382,7 +1389,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
|
|||||||
|
|
||||||
for (const int proci : Pstream::allProcs())
|
for (const int proci : Pstream::allProcs())
|
||||||
{
|
{
|
||||||
IPstream fromNbr(Pstream::commsTypes::blocking, proci);
|
UIPstream fromNbr(proci, pBufs);
|
||||||
List<splitCell8> newSplitCells(fromNbr);
|
List<splitCell8> newSplitCells(fromNbr);
|
||||||
labelList newVisibleCells(fromNbr);
|
labelList newVisibleCells(fromNbr);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user