mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Pstream: Feed through outstanding requests more. See #1626.
This e.g. was giving a problem with using volPointInterpolation (in functionObjects) with non-blocking global reductions.
This commit is contained in:
@ -763,7 +763,7 @@ void correctCoupledBoundaryConditions(fvMesh& mesh)
|
|||||||
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
label nReq = Pstream::nRequests();
|
const label nReq = Pstream::nRequests();
|
||||||
|
|
||||||
forAll(bfld, patchi)
|
forAll(bfld, patchi)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -50,7 +50,7 @@ void evaluateConstraintTypes(GeometricField<Type, fvPatchField, volMesh>& fld)
|
|||||||
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
label nReq = Pstream::nRequests();
|
const label nReq = Pstream::nRequests();
|
||||||
|
|
||||||
forAll(fldBf, patchi)
|
forAll(fldBf, patchi)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -46,7 +46,7 @@ void Foam::Pstream::exchangeContainer
|
|||||||
const bool block
|
const bool block
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
label startOfRequests = Pstream::nRequests();
|
const label startOfRequests = Pstream::nRequests();
|
||||||
|
|
||||||
// Set up receives
|
// Set up receives
|
||||||
// ~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~
|
||||||
@ -120,7 +120,7 @@ void Foam::Pstream::exchangeBuf
|
|||||||
const bool block
|
const bool block
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
label startOfRequests = Pstream::nRequests();
|
const label startOfRequests = Pstream::nRequests();
|
||||||
|
|
||||||
// Set up receives
|
// Set up receives
|
||||||
// ~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@ -414,7 +414,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::evaluate()
|
|||||||
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
label nReq = Pstream::nRequests();
|
const label nReq = Pstream::nRequests();
|
||||||
|
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -455,7 +455,7 @@ bool Foam::OFstreamCollator::write
|
|||||||
// Gather all data onto master. Is done in local communicator since
|
// Gather all data onto master. Is done in local communicator since
|
||||||
// not in write thread. Note that we do not store in contiguous
|
// not in write thread. Note that we do not store in contiguous
|
||||||
// buffer since that would limit to 2G chars.
|
// buffer since that would limit to 2G chars.
|
||||||
label startOfRequests = Pstream::nRequests();
|
const label startOfRequests = Pstream::nRequests();
|
||||||
if (Pstream::master(localComm_))
|
if (Pstream::master(localComm_))
|
||||||
{
|
{
|
||||||
for (label proci = 1; proci < slaveData.size(); proci++)
|
for (label proci = 1; proci < slaveData.size(); proci++)
|
||||||
|
|||||||
@ -279,6 +279,8 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing
|
|||||||
patchFaceRestrictAddressing_[fineLevelIndex];
|
patchFaceRestrictAddressing_[fineLevelIndex];
|
||||||
|
|
||||||
|
|
||||||
|
const label nReq = Pstream::nRequests();
|
||||||
|
|
||||||
// Initialise transfer of restrict addressing on the interface
|
// Initialise transfer of restrict addressing on the interface
|
||||||
forAll(fineInterfaces, inti)
|
forAll(fineInterfaces, inti)
|
||||||
{
|
{
|
||||||
@ -294,7 +296,7 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing
|
|||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
Pstream::waitRequests();
|
Pstream::waitRequests(nReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -147,6 +147,8 @@ Foam::labelListList Foam::GAMGProcAgglomeration::globalCellCells
|
|||||||
// Get the interface cells
|
// Get the interface cells
|
||||||
PtrList<labelList> nbrGlobalCells(interfaces.size());
|
PtrList<labelList> nbrGlobalCells(interfaces.size());
|
||||||
{
|
{
|
||||||
|
const label nReq = Pstream::nRequests();
|
||||||
|
|
||||||
// Initialise transfer of restrict addressing on the interface
|
// Initialise transfer of restrict addressing on the interface
|
||||||
forAll(interfaces, inti)
|
forAll(interfaces, inti)
|
||||||
{
|
{
|
||||||
@ -162,7 +164,7 @@ Foam::labelListList Foam::GAMGProcAgglomeration::globalCellCells
|
|||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
Pstream::waitRequests();
|
Pstream::waitRequests(nReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll(interfaces, inti)
|
forAll(interfaces, inti)
|
||||||
|
|||||||
@ -95,6 +95,8 @@ void Foam::volPointInterpolation::addSeparated
|
|||||||
typename GeometricField<Type, pointPatchField, pointMesh>::
|
typename GeometricField<Type, pointPatchField, pointMesh>::
|
||||||
Boundary& pfbf = pf.boundaryFieldRef();
|
Boundary& pfbf = pf.boundaryFieldRef();
|
||||||
|
|
||||||
|
const label nReq = Pstream::nRequests();
|
||||||
|
|
||||||
forAll(pfbf, patchi)
|
forAll(pfbf, patchi)
|
||||||
{
|
{
|
||||||
if (pfbf[patchi].coupled())
|
if (pfbf[patchi].coupled())
|
||||||
@ -109,7 +111,7 @@ void Foam::volPointInterpolation::addSeparated
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Block for any outstanding requests
|
// Block for any outstanding requests
|
||||||
Pstream::waitRequests();
|
Pstream::waitRequests(nReq);
|
||||||
|
|
||||||
forAll(pfbf, patchi)
|
forAll(pfbf, patchi)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -46,7 +46,7 @@ void Foam::functionObjects::mapFields::evaluateConstraintTypes
|
|||||||
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
label nReq = Pstream::nRequests();
|
const label nReq = Pstream::nRequests();
|
||||||
|
|
||||||
forAll(fldBf, patchi)
|
forAll(fldBf, patchi)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -55,6 +55,8 @@ void Foam::MGridGenGAMGAgglomeration::swap
|
|||||||
PtrList<labelList>& nbrValues
|
PtrList<labelList>& nbrValues
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
|
const label nReq = Pstream::nRequests();
|
||||||
|
|
||||||
// Initialise transfer of restrict addressing on the interface
|
// Initialise transfer of restrict addressing on the interface
|
||||||
forAll(interfaces, inti)
|
forAll(interfaces, inti)
|
||||||
{
|
{
|
||||||
@ -70,7 +72,7 @@ void Foam::MGridGenGAMGAgglomeration::swap
|
|||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
Pstream::waitRequests();
|
Pstream::waitRequests(nReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the interface agglomeration
|
// Get the interface agglomeration
|
||||||
|
|||||||
@ -899,7 +899,7 @@ void Foam::dynamicOversetFvMesh::correctCoupledBoundaryConditions(GeoField& fld)
|
|||||||
{
|
{
|
||||||
typename GeoField::Boundary& bfld = fld.boundaryFieldRef();
|
typename GeoField::Boundary& bfld = fld.boundaryFieldRef();
|
||||||
|
|
||||||
label nReq = Pstream::nRequests();
|
const label nReq = Pstream::nRequests();
|
||||||
|
|
||||||
forAll(bfld, patchi)
|
forAll(bfld, patchi)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user