diff --git a/applications/test/parallel-comm1/Test-parallel-comm1.C b/applications/test/parallel-comm1/Test-parallel-comm1.C index d0bc966a5d..33a6bd5bdc 100644 --- a/applications/test/parallel-comm1/Test-parallel-comm1.C +++ b/applications/test/parallel-comm1/Test-parallel-comm1.C @@ -62,7 +62,7 @@ scalar sumReduce scalar procValue; UIPstream::read ( - UPstream::commsTypes::blocking, + UPstream::commsTypes::buffered, proci, reinterpret_cast(&procValue), sizeof(scalar), @@ -79,7 +79,7 @@ scalar sumReduce { UOPstream::write ( - UPstream::commsTypes::blocking, + UPstream::commsTypes::buffered, proci, reinterpret_cast(&sum), sizeof(scalar), @@ -93,7 +93,7 @@ scalar sumReduce { UOPstream::write ( - UPstream::commsTypes::blocking, + UPstream::commsTypes::buffered, UPstream::masterNo(), reinterpret_cast(&localValue), sizeof(scalar), @@ -105,7 +105,7 @@ scalar sumReduce { UIPstream::read ( - UPstream::commsTypes::blocking, + UPstream::commsTypes::buffered, UPstream::masterNo(), reinterpret_cast(&sum), sizeof(scalar), diff --git a/applications/test/parallel/Test-parallel.C b/applications/test/parallel/Test-parallel.C index 06d3ea16e9..fa6ab72bee 100644 --- a/applications/test/parallel/Test-parallel.C +++ b/applications/test/parallel/Test-parallel.C @@ -131,7 +131,7 @@ void testTransfer(const T& input) for (const int proci : UPstream::subProcs()) { Perr<< "master sending to proc:" << proci << endl; - OPstream os(UPstream::commsTypes::blocking, proci); + OPstream os(UPstream::commsTypes::buffered, proci); os << data; } } @@ -139,7 +139,7 @@ void testTransfer(const T& input) { { Perr<< "proc sending to master" << endl; - OPstream os(UPstream::commsTypes::blocking, UPstream::masterNo()); + OPstream os(UPstream::commsTypes::buffered, UPstream::masterNo()); os << data; } @@ -169,7 +169,7 @@ void testTokenized(const T& data) for (const int proci : UPstream::subProcs()) { Perr<< "master sending to proc:" << proci << endl; - OPstream os(UPstream::commsTypes::blocking, proci); + OPstream os(UPstream::commsTypes::buffered, proci); os << tok; } } @@ -177,7 +177,7 @@ void testTokenized(const T& data) { { Perr<< "proc sending to master" << endl; - OPstream os(UPstream::commsTypes::blocking, UPstream::masterNo()); + OPstream os(UPstream::commsTypes::buffered, UPstream::masterNo()); os << tok; } diff --git a/applications/test/surface-sampling/mydebugSurfaceWriter.H b/applications/test/surface-sampling/mydebugSurfaceWriter.H index 825cde7e4f..cfaea6f808 100644 --- a/applications/test/surface-sampling/mydebugSurfaceWriter.H +++ b/applications/test/surface-sampling/mydebugSurfaceWriter.H @@ -44,7 +44,7 @@ Description Format options: \table Property | Description | Required | Default - commsType | blocking/nonBlocking/scheduled | no | scheduled + commsType | scheduled/nonBlocking/buffered | no | scheduled merge | Enable geometry/field merging | no | true write | Write file(s) | no | false narrow | Communicate with narrowed values | no | false diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index 133d208d96..f07f49bfad 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -568,10 +568,9 @@ void syncPoints } } - // buffered send OPstream toNbr ( - UPstream::commsTypes::blocking, + UPstream::commsTypes::buffered, procPatch.neighbProcNo() ); toNbr << patchInfo; diff --git a/applications/utilities/preProcessing/mapFieldsPar/MapVolFields.H b/applications/utilities/preProcessing/mapFieldsPar/MapVolFields.H index 1257d47aeb..f3106def5c 100644 --- a/applications/utilities/preProcessing/mapFieldsPar/MapVolFields.H +++ b/applications/utilities/preProcessing/mapFieldsPar/MapVolFields.H @@ -48,7 +48,7 @@ void evaluateConstraintTypes(GeometricField& fld) if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::nonBlocking ) { diff --git a/etc/controlDict b/etc/controlDict index f084663716..d0ffb76552 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -132,7 +132,7 @@ OptimisationSwitches // MPI/Parallel settings // ===================== - // Default communication type (nonBlocking | scheduled | blocking); + // Default communication type (nonBlocking | scheduled | buffered) commsType nonBlocking; // Transfer double as float for processor boundaries. Mostly defunct. diff --git a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C index d5f8ad2cd9..5917575603 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C +++ b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C @@ -115,7 +115,7 @@ void Foam::ParSortableList::checkAndSend } { - OPstream toProc(UPstream::commsTypes::blocking, destProci); + OPstream toProc(UPstream::commsTypes::buffered, destProci); toProc << values << indices; } } @@ -309,7 +309,7 @@ void Foam::ParSortableList::sort() Pout<< "Receiving from " << proci << endl; } - IPstream fromProc(UPstream::commsTypes::blocking, proci); + IPstream fromProc(UPstream::commsTypes::buffered, proci); fromProc >> recValues >> recIndices; diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/OPstreams.C b/src/OpenFOAM/db/IOstreams/Pstreams/OPstreams.C index e956e8de74..fc8312f674 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/OPstreams.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/OPstreams.C @@ -101,6 +101,12 @@ Foam::UOPstream::~UOPstream() { if (sendAtDestruct_) { + // Note: sendAtDestruct_ and nonBlocking is a questionable combination + // since the transfer buffer will be destroyed before + // the non-blocking send completes! + // + // Could flag as an error, but not actually used anywhere. + if (!bufferIPCsend()) { FatalErrorInFunction diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H index e61bf65e90..cb4cf58e3a 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H +++ b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H @@ -32,7 +32,7 @@ Description Use UOPstream to stream data into buffers, call finishedSends() to notify that data is in buffers and then use IUPstream to get data out - of received buffers. Works with both blocking and non-blocking. Does + of received buffers. Works with both buffered and non-blocking. Does not make much sense with scheduled since there you would not need these explicit buffers. @@ -51,7 +51,7 @@ Description } } - pBufs.finishedSends(); // no-op for blocking + pBufs.finishedSends(); // no-op for buffered for (const int proci : UPstream::allProcs()) { diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H b/src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H index 3e70872c34..138dc465a8 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2013 OpenFOAM Foundation - Copyright (C) 2017-2023 OpenCFD Ltd. + Copyright (C) 2017-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -96,7 +96,7 @@ protected: const int comm_; //- The message size, read on bufferIPCrecv or set directly - int messageSize_; + label messageSize_; //- Receive position in buffer data, if ony //- If there is no external location for recvBufPos_ @@ -279,8 +279,8 @@ public: // Static Functions //- Read buffer contents from given processor. - // \return the message size (bytes read) - static label read + // \return the message size (bytes read). May change in the future + static std::streamsize read ( const UPstream::commsTypes commsType, const int fromProcNo, @@ -293,8 +293,8 @@ public: ); //- Read buffer contents (non-blocking) from given processor. - // \return the message size (bytes read) - inline static label read + // \return the message size (bytes read). May change in the future + inline static std::streamsize read ( //! [out] request information UPstream::Request& req, @@ -321,7 +321,7 @@ public: // Only valid for contiguous data types. // \return the message size (bytes read). May change in the future template - inline static label read + inline static std::streamsize read ( const UPstream::commsTypes commsType, const int fromProcNo, @@ -348,7 +348,7 @@ public: // Only valid for contiguous data types. // \return the message size (bytes read). May change in the future template - inline static label read + inline static std::streamsize read ( const UPstream::commsTypes commsType, const int fromProcNo, @@ -375,7 +375,7 @@ public: // Only valid for contiguous data types. // \return the message size (bytes read). May change in the future template - inline static label read + inline static std::streamsize read ( //! [out] request information UPstream::Request& req, @@ -401,7 +401,7 @@ public: // Only valid for contiguous data types. // \return the message size (bytes read). May change in the future template - inline static label read + inline static std::streamsize read ( //! [out] request information UPstream::Request& req, @@ -474,8 +474,8 @@ public: // Static Functions //- Wrapped version of UPstream::broadcast - // \return the message size (bytes read) - static label read + // \return the message size (bytes read). May change in the future + static std::streamsize read ( const int rootProcNo, //!< normally UPstream::masterNo() char* buf, diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C index bdf79dd6cd..cf531d1014 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C @@ -50,9 +50,11 @@ const Foam::Enum > Foam::UPstream::commsTypeNames ({ - { commsTypes::blocking, "blocking" }, // "buffered" + { commsTypes::buffered, "buffered" }, // "buffered" { commsTypes::scheduled, "scheduled" }, { commsTypes::nonBlocking, "nonBlocking" }, // "immediate" + // compatibility names + { commsTypes::buffered, "blocking" }, }); diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H index bf22b7bac0..ee44634770 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H @@ -73,15 +73,17 @@ public: //- Communications types enum class commsTypes : char { - blocking, //!< "blocking" (buffered) : (MPI_Bsend, MPI_Recv) + buffered, //!< "buffered" : (MPI_Bsend, MPI_Recv) scheduled, //!< "scheduled" (MPI standard) : (MPI_Send, MPI_Recv) - nonBlocking //!< "nonBlocking" (immediate) : (MPI_Isend, MPI_Irecv) + nonBlocking, //!< "nonBlocking" (immediate) : (MPI_Isend, MPI_Irecv) + // Aliases + blocking = buffered //!< compatibility name for buffered }; //- Enumerated names for the communication types static const Enum commsTypeNames; - //- Different MPI-send modes (ignored for commsTypes::blocking) + //- Different MPI-send modes (ignored for commsTypes::buffered) enum class sendModes : char { normal, //!< (MPI_Send, MPI_Isend) diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C index 0a16f916c3..70d5ce2556 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C @@ -598,7 +598,7 @@ void Foam::GeometricBoundaryField::evaluate() if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::nonBlocking ) { @@ -689,7 +689,7 @@ void Foam::GeometricBoundaryField::evaluateLocal() if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::nonBlocking ) { @@ -755,7 +755,7 @@ Foam::GeometricBoundaryField if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::nonBlocking ) { diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H index 20cb347469..d132cc222b 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H @@ -111,7 +111,7 @@ public: //- Update the patch field virtual void evaluate ( - const Pstream::commsTypes commsType = Pstream::commsTypes::blocking + const Pstream::commsTypes commsType = Pstream::commsTypes::buffered ); diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H index a70e06f732..68d71f61ef 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H @@ -119,7 +119,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) = 0; //- Initialise swap of patch point values diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H index a4f7c2b205..4a71dd3766 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H @@ -202,7 +202,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ); diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H index 80e5905a4e..d28e884605 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H @@ -152,7 +152,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H index 628ae11ae9..08479d9bf5 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H @@ -115,7 +115,7 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); }; diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H index 8808cc3a0a..67d90a5366 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H @@ -115,7 +115,7 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); }; diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H index 61f0962398..6fa9bf6cac 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H @@ -154,7 +154,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H index a5eed9049d..147fd58cf9 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H @@ -153,7 +153,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H index 1b9b545902..b3b62e8c69 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H @@ -126,7 +126,7 @@ public: //- Update the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); }; diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H index 436076f521..31f2bd75d9 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H @@ -121,7 +121,7 @@ public: //- Update the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); }; diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C index 69bef4e188..c5f75450c6 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C @@ -192,7 +192,7 @@ Foam::codedFixedValuePointPatchField::codedFixedValuePointPatchField this->extrapolateInternal(); // Evaluate to assign a value - this->evaluate(Pstream::commsTypes::blocking); + this->evaluate(Pstream::commsTypes::buffered); } } diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H index 9999047742..af76e7d974 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H @@ -243,7 +243,7 @@ public: //- Evaluate the patch field, sets updated() to false virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); //- Write diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H index bdfa66a5a8..8cbb45142d 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H @@ -132,7 +132,7 @@ public: //- Update the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); //- Write diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H index 543b7f57cf..c2a47ce412 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H @@ -562,14 +562,14 @@ public: //- Initialise evaluation of the patch field (do nothing) virtual void initEvaluate ( - const Pstream::commsTypes commsType = Pstream::commsTypes::blocking + const Pstream::commsTypes commsType = Pstream::commsTypes::buffered ) {} //- Evaluate the patch field, sets updated() to false virtual void evaluate ( - const Pstream::commsTypes commsType = Pstream::commsTypes::blocking + const Pstream::commsTypes commsType = Pstream::commsTypes::buffered ); //- Initialise the evaluation of the patch field after a local @@ -577,7 +577,7 @@ public: virtual void initEvaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} @@ -585,7 +585,7 @@ public: virtual void evaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C index a3fa3d2bb1..91423a6ca2 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C @@ -44,7 +44,7 @@ void Foam::LduMatrix::initMatrixInterfaces if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::nonBlocking ) { @@ -88,7 +88,7 @@ void Foam::LduMatrix::initMatrixInterfaces interfacei, psiif, interfaceCoeffs[interfacei], - UPstream::commsTypes::blocking + UPstream::commsTypes::buffered ); } } @@ -172,7 +172,7 @@ void Foam::LduMatrix::updateMatrixInterfaces if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::nonBlocking ) { @@ -184,7 +184,7 @@ void Foam::LduMatrix::updateMatrixInterfaces } // Check/no-check for updatedMatrix() ? - const bool noCheck = (commsType == UPstream::commsTypes::blocking); + const bool noCheck = (commsType == UPstream::commsTypes::buffered); forAll(interfaces_, interfacei) { @@ -264,7 +264,7 @@ void Foam::LduMatrix::updateMatrixInterfaces interfacei, psiif, interfaceCoeffs[interfacei], - UPstream::commsTypes::blocking + UPstream::commsTypes::buffered ); } } diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C index 2a0c06c607..6d95e5215a 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C @@ -43,7 +43,7 @@ void Foam::processorLduInterface::send if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::scheduled ) { @@ -113,7 +113,7 @@ void Foam::processorLduInterface::receive if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::scheduled ) { @@ -194,7 +194,7 @@ void Foam::processorLduInterface::compressedSend if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::scheduled ) { @@ -272,7 +272,7 @@ void Foam::processorLduInterface::compressedReceive if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::scheduled ) { diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C index b7434b7e1a..6b4f48dc36 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C @@ -44,7 +44,7 @@ void Foam::lduMatrix::initMatrixInterfaces if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::nonBlocking ) { @@ -90,7 +90,7 @@ void Foam::lduMatrix::initMatrixInterfaces psiif, coupleCoeffs[interfacei], cmpt, - UPstream::commsTypes::blocking + UPstream::commsTypes::buffered ); } } @@ -229,7 +229,7 @@ void Foam::lduMatrix::updateMatrixInterfaces if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::nonBlocking ) { @@ -241,7 +241,7 @@ void Foam::lduMatrix::updateMatrixInterfaces } // Check/no-check for updatedMatrix() ? - const bool noCheck = (commsType == UPstream::commsTypes::blocking); + const bool noCheck = (commsType == UPstream::commsTypes::buffered); // Consume anything still outstanding forAll(interfaces, interfacei) @@ -326,7 +326,7 @@ void Foam::lduMatrix::updateMatrixInterfaces psiif, coupleCoeffs[interfacei], cmpt, - UPstream::commsTypes::blocking + UPstream::commsTypes::buffered ); } } diff --git a/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.C b/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.C index 83b28ba35b..266583000a 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.C +++ b/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.C @@ -111,7 +111,7 @@ void Foam::pointBoundaryMesh::calcGeometry() if ( - pBufs.commsType() == Pstream::commsTypes::blocking + pBufs.commsType() == Pstream::commsTypes::buffered || pBufs.commsType() == Pstream::commsTypes::nonBlocking ) { @@ -157,7 +157,7 @@ void Foam::pointBoundaryMesh::movePoints(const pointField& p) if ( - pBufs.commsType() == Pstream::commsTypes::blocking + pBufs.commsType() == Pstream::commsTypes::buffered || pBufs.commsType() == Pstream::commsTypes::nonBlocking ) { @@ -203,7 +203,7 @@ void Foam::pointBoundaryMesh::updateMesh() if ( - pBufs.commsType() == Pstream::commsTypes::blocking + pBufs.commsType() == Pstream::commsTypes::buffered || pBufs.commsType() == Pstream::commsTypes::nonBlocking ) { diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C index 94a764b961..68b9662a77 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C @@ -494,7 +494,7 @@ void Foam::mapDistributeBase::distribute return; } - if (commsType == UPstream::commsTypes::blocking) + if (commsType == UPstream::commsTypes::buffered) { // Since buffered sending can reuse the field to collect the // received data. @@ -939,7 +939,7 @@ void Foam::mapDistributeBase::distribute return; } - if (commsType == UPstream::commsTypes::blocking) + if (commsType == UPstream::commsTypes::buffered) { // Since buffered sending can reuse the field to collect the // received data. diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index 6936849531..f7332a1900 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -304,7 +304,7 @@ void Foam::polyBoundaryMesh::calcGeometry() if ( - pBufs.commsType() == Pstream::commsTypes::blocking + pBufs.commsType() == Pstream::commsTypes::buffered || pBufs.commsType() == Pstream::commsTypes::nonBlocking ) { @@ -1297,7 +1297,7 @@ void Foam::polyBoundaryMesh::movePoints(const pointField& p) if ( - pBufs.commsType() == Pstream::commsTypes::blocking + pBufs.commsType() == Pstream::commsTypes::buffered || pBufs.commsType() == Pstream::commsTypes::nonBlocking ) { @@ -1347,7 +1347,7 @@ void Foam::polyBoundaryMesh::updateMesh() if ( - pBufs.commsType() == Pstream::commsTypes::blocking + pBufs.commsType() == Pstream::commsTypes::buffered || pBufs.commsType() == Pstream::commsTypes::nonBlocking ) { diff --git a/src/Pstream/dummy/UIPBstreamRead.C b/src/Pstream/dummy/UIPBstreamRead.C index ac23ba916d..31e0f0743f 100644 --- a/src/Pstream/dummy/UIPBstreamRead.C +++ b/src/Pstream/dummy/UIPBstreamRead.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2022-2023 OpenCFD Ltd. + Copyright (C) 2022-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -37,7 +37,7 @@ void Foam::UIPBstream::bufferIPCrecv() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::label Foam::UIPBstream::read +std::streamsize Foam::UIPBstream::read ( const int rootProcNo, char* buf, diff --git a/src/Pstream/dummy/UIPstreamRead.C b/src/Pstream/dummy/UIPstreamRead.C index 316550769e..c8b7286fdf 100644 --- a/src/Pstream/dummy/UIPstreamRead.C +++ b/src/Pstream/dummy/UIPstreamRead.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2021-2023 OpenCFD Ltd. + Copyright (C) 2021-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -38,7 +38,7 @@ void Foam::UIPstream::bufferIPCrecv() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::label Foam::UIPstream::read +std::streamsize Foam::UIPstream::read ( const UPstream::commsTypes commsType, const int fromProcNo, diff --git a/src/Pstream/mpi/UIPBstreamRead.C b/src/Pstream/mpi/UIPBstreamRead.C index f384c391eb..0ee1d63ce3 100644 --- a/src/Pstream/mpi/UIPBstreamRead.C +++ b/src/Pstream/mpi/UIPBstreamRead.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2022-2023 OpenCFD Ltd. + Copyright (C) 2022-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -39,7 +39,7 @@ void Foam::UIPBstream::bufferIPCrecv() // Expected message size, similar to MPI_Probe // Same type must be expected in UOPBstream::bufferIPCsend() - label bufSize(0); + std::streamsize bufSize(0); // Broadcast #1 - data size if @@ -47,7 +47,7 @@ void Foam::UIPBstream::bufferIPCrecv() !UPstream::broadcast ( reinterpret_cast(&bufSize), - sizeof(label), + sizeof(std::streamsize), comm_, fromProcNo_ //< is actually rootProcNo ) @@ -63,46 +63,45 @@ void Foam::UIPBstream::bufferIPCrecv() Pout<< "UOPBstream IPC read buffer :" << " root:" << fromProcNo_ << " comm:" << comm_ - << " probed size:" << bufSize + << " probed size:" << label(bufSize) << " wanted size:" << recvBuf_.capacity() << Foam::endl; } - // No buffer size allocated/specified - if (!recvBuf_.capacity()) + + // Set buffer size, avoiding any copying and resize doubling etc. + recvBuf_.clear(); + if (recvBuf_.capacity() < label(bufSize)) { - recvBuf_.resize(bufSize); + recvBuf_.setCapacity_nocopy(label(bufSize)); } + recvBuf_.resize_nocopy(label(bufSize)); // This is the only real information we can trust - messageSize_ = bufSize; + messageSize_ = label(bufSize); + // Broadcast #2 - data content // - skip if there is no data to receive - - if (messageSize_) - { - if + if + ( + (bufSize > 0) + && !UPstream::broadcast ( - !UPstream::broadcast - ( - recvBuf_.data(), - messageSize_, // same as bufSize - comm_, - fromProcNo_ //< is actually rootProcNo - ) + recvBuf_.data(), + recvBuf_.size(), // same as bufSize + comm_, + fromProcNo_ //< is actually rootProcNo ) - { - FatalErrorInFunction - << "MPI_Bcast failure receiving buffer data:" << bufSize << nl - << Foam::abort(FatalError); - } + ) + { + FatalErrorInFunction + << "MPI_Bcast failure receiving buffer data:" + << recvBuf_.size() << nl + << Foam::abort(FatalError); } - // Set addressed size. Leave actual allocated memory intact. - recvBuf_.resize(messageSize_); - - if (!messageSize_) + if (recvBuf_.empty()) { setEof(); } @@ -111,7 +110,7 @@ void Foam::UIPBstream::bufferIPCrecv() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::label Foam::UIPBstream::read +std::streamsize Foam::UIPBstream::read ( const int rootProcNo, char* buf, diff --git a/src/Pstream/mpi/UIPstreamRead.C b/src/Pstream/mpi/UIPstreamRead.C index afee9a1905..c8e6de0d74 100644 --- a/src/Pstream/mpi/UIPstreamRead.C +++ b/src/Pstream/mpi/UIPstreamRead.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019-2023 OpenCFD Ltd. + Copyright (C) 2019-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -37,9 +37,8 @@ License // * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * // -// General blocking/non-blocking MPI receive, optionally with probed -// message information. -static Foam::label UPstream_mpi_receive +// General blocking/non-blocking MPI receive +static std::streamsize UPstream_mpi_receive ( const Foam::UPstream::commsTypes commsType, char* buf, @@ -54,34 +53,48 @@ static Foam::label UPstream_mpi_receive PstreamGlobals::reset_request(req); - if (UPstream::debug) + // TODO: some corrective action, at least when not nonBlocking + #if 0 + // No warnings here, just on the sender side. + if (bufSize > std::streamsize(INT_MAX)) { - Pout<< "UIPstream::read : starting read from:" << fromProcNo - << " tag:" << tag << " comm:" << communicator - << " wanted size:" << label(bufSize) - << " commsType:" << UPstream::commsTypeNames[commsType] - << Foam::endl; + Perr<< "UIPstream::read() : from rank " << fromProcNo + << " exceeds INT_MAX bytes" << Foam::endl; + error::printStack(Perr); } + #endif + if (UPstream::warnComm >= 0 && communicator != UPstream::warnComm) { Pout<< "UIPstream::read : starting read from:" << fromProcNo + << " size:" << label(bufSize) << " tag:" << tag << " comm:" << communicator - << " wanted size:" << label(bufSize) << " commsType:" << UPstream::commsTypeNames[commsType] << " warnComm:" << UPstream::warnComm << Foam::endl; error::printStack(Pout); } + else if (UPstream::debug) + { + Pout<< "UIPstream::read : starting read from:" << fromProcNo + << " size:" << label(bufSize) + << " tag:" << tag << " comm:" << communicator + << " commsType:" << UPstream::commsTypeNames[commsType] + << Foam::endl; + } + + int returnCode = MPI_ERR_UNKNOWN; profilingPstream::beginTiming(); if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::scheduled ) { - int returnCode = 0; + // Not UPstream::commsTypes::nonBlocking + MPI_Status status; { @@ -97,6 +110,8 @@ static Foam::label UPstream_mpi_receive ); } + profilingPstream::addGatherTime(); + if (returnCode != MPI_SUCCESS) { FatalErrorInFunction @@ -104,36 +119,31 @@ static Foam::label UPstream_mpi_receive << Foam::abort(FatalError); return 0; } - - profilingPstream::addGatherTime(); - - // Check size of message read - - int messageSize; - MPI_Get_count(&status, MPI_BYTE, &messageSize); - - if (UPstream::debug) + else if (UPstream::debug) { - Pout<< "UIPstream::read : finished read from:" << fromProcNo - << " tag:" << tag << " read size:" << label(bufSize) - << " commsType:" << UPstream::commsTypeNames[commsType] + Pout<< "UIPstream::read : finished recv from:" + << fromProcNo + << " size:" << label(bufSize) << " tag:" << tag << Foam::endl; } - if (messageSize > bufSize) + // Check size of message read + int count(0); + MPI_Get_count(&status, MPI_BYTE, &count); + + if (bufSize < std::streamsize(count)) { FatalErrorInFunction << "buffer (" << label(bufSize) << ") not large enough for incoming message (" - << messageSize << ')' + << label(count) << ')' << Foam::abort(FatalError); } - return messageSize; + return std::streamsize(count); } else if (commsType == UPstream::commsTypes::nonBlocking) { - int returnCode = 0; MPI_Request request; { @@ -158,19 +168,20 @@ static Foam::label UPstream_mpi_receive return 0; } + PstreamGlobals::push_request(request, req); + profilingPstream::addRequestTime(); + + if (UPstream::debug) { - Pout<< "UIPstream::read : started read from:" << fromProcNo - << " tag:" << tag << " read size:" << label(bufSize) - << " commsType:" << UPstream::commsTypeNames[commsType] + Pout<< "UIPstream::read : started non-blocking recv from:" + << fromProcNo + << " size:" << label(bufSize) << " tag:" << tag << " request:" << (req ? label(-1) : PstreamGlobals::outstandingRequests_.size()) << Foam::endl; } - PstreamGlobals::push_request(request, req); - profilingPstream::addRequestTime(); - // Assume the message will be completely received. return bufSize; } @@ -197,9 +208,24 @@ void Foam::UIPstream::bufferIPCrecv() << Foam::endl; } - // No buffer size allocated/specified - probe size of incoming message - if (!recvBuf_.capacity()) + // Fallback value + messageSize_ = recvBuf_.capacity(); + + if (commsType() == UPstream::commsTypes::nonBlocking) { + // Non-blocking + // ~~~~~~~~~~~~ + // No chance of probing for size nor relying on the returned message + // size (since it returns immediately without any further checks) + // + // Fortunately there are not many (any?) places that are using + // a non-blocking IPstream with streaming anyhow. + + messageSize_ = recvBuf_.size(); + } + else if (!recvBuf_.capacity()) + { + // No buffer size allocated/specified - probe size of incoming message profilingPstream::beginTiming(); MPI_Status status; @@ -212,24 +238,26 @@ void Foam::UIPstream::bufferIPCrecv() &status ); - MPI_Get_count(&status, MPI_BYTE, &messageSize_); - profilingPstream::addProbeTime(); - recvBuf_.resize(messageSize_); + int count(0); + MPI_Get_count(&status, MPI_BYTE, &count); if (UPstream::debug) { Pout<< "UIPstream::UIPstream : probed size:" - << messageSize_ << Foam::endl; + << label(count) << Foam::endl; } + + recvBuf_.resize(label(count)); + messageSize_ = label(count); } - messageSize_ = UPstream_mpi_receive + std::streamsize count = UPstream_mpi_receive ( commsType(), recvBuf_.data(), - recvBuf_.capacity(), + messageSize_, // The expected size fromProcNo_, tag_, comm_, @@ -237,9 +265,10 @@ void Foam::UIPstream::bufferIPCrecv() ); // Set addressed size. Leave actual allocated memory intact. - recvBuf_.resize(messageSize_); + recvBuf_.resize(label(count)); + messageSize_ = label(count); - if (!messageSize_) + if (recvBuf_.empty()) { setEof(); } @@ -248,7 +277,7 @@ void Foam::UIPstream::bufferIPCrecv() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::label Foam::UIPstream::read +std::streamsize Foam::UIPstream::read ( const UPstream::commsTypes commsType, const int fromProcNo, diff --git a/src/Pstream/mpi/UOPBstreamWrite.C b/src/Pstream/mpi/UOPBstreamWrite.C index c01bff64b3..f4c9412fca 100644 --- a/src/Pstream/mpi/UOPBstreamWrite.C +++ b/src/Pstream/mpi/UOPBstreamWrite.C @@ -40,7 +40,17 @@ bool Foam::UOPBstream::bufferIPCsend() PstreamGlobals::checkCommunicator(comm_, toProcNo_); // Same type must be expected in UIPBstream::bufferIPCrecv() - label bufSize(sendBuf_.size()); + std::streamsize bufSize(sendBuf_.size()); + + // TODO: some corrective action + #if 0 + if (bufSize > std::streamsize(INT_MAX)) + { + Perr<< "UOPBstream::write() :" + << " exceeds INT_MAX bytes" << Foam::endl; + error::printStack(Perr); + } + #endif // Broadcast #1 - data size if @@ -48,7 +58,7 @@ bool Foam::UOPBstream::bufferIPCsend() !UPstream::broadcast ( reinterpret_cast(&bufSize), - sizeof(label), + sizeof(std::streamsize), comm_, toProcNo_ //< is actually rootProcNo ) @@ -60,26 +70,26 @@ bool Foam::UOPBstream::bufferIPCsend() return false; } + // Broadcast #2 - data content // - skip if there is no data to send - if (bufSize) - { - if + if + ( + (bufSize > 0) + && !UPstream::broadcast ( - !UPstream::broadcast - ( - sendBuf_.data(), - sendBuf_.size(), // same as bufSize - comm_, - toProcNo_ //< is actually rootProcNo - ) + sendBuf_.data(), + sendBuf_.size(), // same as bufSize + comm_, + toProcNo_ //< is actually rootProcNo ) - { - FatalErrorInFunction - << "MPI_Bcast failure sending buffer data:" << bufSize << nl - << Foam::abort(FatalError); - return false; - } + ) + { + FatalErrorInFunction + << "MPI_Bcast failure sending buffer data:" + << sendBuf_.size() << nl + << Foam::abort(FatalError); + return false; } return true; diff --git a/src/Pstream/mpi/UOPstreamWrite.C b/src/Pstream/mpi/UOPstreamWrite.C index c1086fd94c..8613c17dfc 100644 --- a/src/Pstream/mpi/UOPstreamWrite.C +++ b/src/Pstream/mpi/UOPstreamWrite.C @@ -62,24 +62,34 @@ bool Foam::UOPstream::write { PstreamGlobals::reset_request(req); - if (UPstream::debug) + // TODO: some corrective action, at least when not nonBlocking + #if 0 + if (bufSize > std::streamsize(INT_MAX)) { - Pout<< "UOPstream::write : starting write to:" << toProcNo - << " tag:" << tag - << " comm:" << communicator << " size:" << label(bufSize) - << " commType:" << UPstream::commsTypeNames[commsType] - << Foam::endl; + Perr<< "UOPstream::write() : to rank " << toProcNo + << " exceeds INT_MAX bytes" << Foam::endl; + error::printStack(Perr); } + #endif + if (UPstream::warnComm >= 0 && communicator != UPstream::warnComm) { Pout<< "UOPstream::write : starting write to:" << toProcNo - << " tag:" << tag - << " comm:" << communicator << " size:" << label(bufSize) + << " size:" << label(bufSize) + << " tag:" << tag << " comm:" << communicator << " commType:" << UPstream::commsTypeNames[commsType] << " warnComm:" << UPstream::warnComm << Foam::endl; error::printStack(Pout); } + else if (UPstream::debug) + { + Pout<< "UOPstream::write : starting write to:" << toProcNo + << " size:" << label(bufSize) + << " tag:" << tag << " comm:" << communicator + << " commType:" << UPstream::commsTypeNames[commsType] + << Foam::endl; + } PstreamGlobals::checkCommunicator(communicator, toProcNo); @@ -87,7 +97,7 @@ bool Foam::UOPstream::write profilingPstream::beginTiming(); - if (commsType == UPstream::commsTypes::blocking) + if (commsType == UPstream::commsTypes::buffered) { returnCode = MPI_Bsend ( @@ -104,9 +114,9 @@ bool Foam::UOPstream::write if (UPstream::debug) { - Pout<< "UOPstream::write : finished write to:" << toProcNo - << " tag:" << tag << " size:" << label(bufSize) - << " commsType:" << UPstream::commsTypeNames[commsType] + Pout<< "UOPstream::write : finished buffered send to:" + << toProcNo + << " size:" << label(bufSize) << " tag:" << tag << Foam::endl; } } @@ -142,9 +152,9 @@ bool Foam::UOPstream::write if (UPstream::debug) { - Pout<< "UOPstream::write : finished write to:" << toProcNo - << " tag:" << tag << " size:" << label(bufSize) - << " commsType:" << UPstream::commsTypeNames[commsType] + Pout<< "UOPstream::write : finished send to:" + << toProcNo + << " size:" << label(bufSize) << " tag:" << tag << Foam::endl; } } @@ -181,9 +191,9 @@ bool Foam::UOPstream::write if (UPstream::debug) { - Pout<< "UOPstream::write : started write to:" << toProcNo - << " tag:" << tag << " size:" << label(bufSize) - << " commType:" << UPstream::commsTypeNames[commsType] + Pout<< "UOPstream::write : started non-blocking send to:" + << toProcNo + << " size:" << label(bufSize) << " tag:" << tag << " request:" << (req ? label(-1) : PstreamGlobals::outstandingRequests_.size()) << Foam::endl; diff --git a/src/Pstream/mpi/UPstream.C b/src/Pstream/mpi/UPstream.C index 93bd24cda1..a9f19d3b3f 100644 --- a/src/Pstream/mpi/UPstream.C +++ b/src/Pstream/mpi/UPstream.C @@ -787,7 +787,7 @@ Foam::UPstream::probeMessage int flag = 0; MPI_Status status; - if (UPstream::commsTypes::blocking == commsType) + if (UPstream::commsTypes::buffered == commsType) { // Blocking profilingPstream::beginTiming(); diff --git a/src/Pstream/mpi/UPstreamBroadcast.C b/src/Pstream/mpi/UPstreamBroadcast.C index cc75f95ed5..f3b7fac7d4 100644 --- a/src/Pstream/mpi/UPstreamBroadcast.C +++ b/src/Pstream/mpi/UPstreamBroadcast.C @@ -47,13 +47,6 @@ bool Foam::UPstream::broadcast //Needed? PstreamGlobals::checkCommunicator(comm, rootProcNo); - if (UPstream::debug) - { - Pout<< "UPstream::broadcast : root:" << rootProcNo - << " comm:" << comm - << " size:" << label(bufSize) - << Foam::endl; - } if (UPstream::warnComm >= 0 && comm != UPstream::warnComm) { Pout<< "UPstream::broadcast : root:" << rootProcNo @@ -63,6 +56,13 @@ bool Foam::UPstream::broadcast << Foam::endl; error::printStack(Pout); } + else if (UPstream::debug) + { + Pout<< "UPstream::broadcast : root:" << rootProcNo + << " comm:" << comm + << " size:" << label(bufSize) + << Foam::endl; + } profilingPstream::beginTiming(); diff --git a/src/Pstream/mpi/UPstreamWrapping.txx b/src/Pstream/mpi/UPstreamWrapping.txx index db3f095136..94fc3025e1 100644 --- a/src/Pstream/mpi/UPstreamWrapping.txx +++ b/src/Pstream/mpi/UPstreamWrapping.txx @@ -632,7 +632,8 @@ void Foam::PstreamDetail::allToAllConsensus // Message found, receive into dest buffer location const label proci = status.MPI_SOURCE; - int count = 0; + // Only send/recv a single (fundamental) data type + int count(0); MPI_Get_count(&status, datatype, &count); if (count != 1) @@ -812,10 +813,10 @@ void Foam::PstreamDetail::allToAllConsensus if (flag) { // Message found, receive into dest buffer location - const label proci = status.MPI_SOURCE; - int count = 0; + // Only send/recv a single (fundamental) data type + int count(0); MPI_Get_count(&status, datatype, &count); if (count != 1) diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C index 46336accf7..9e56bcb92d 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C @@ -69,7 +69,7 @@ Foam::porousBafflePressureFvPatchField::porousBafflePressureFvPatchField { if (!this->readValueEntry(dict)) { - this->evaluate(Pstream::commsTypes::blocking); + this->evaluate(Pstream::commsTypes::buffered); } } } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H index b552a4cf48..5779218627 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H @@ -151,7 +151,7 @@ public: //- Evaluate the patchField virtual void evaluate ( - const Pstream::commsTypes commsType = Pstream::commsTypes::blocking + const Pstream::commsTypes commsType = Pstream::commsTypes::buffered ); //- Write diff --git a/src/dynamicFaMesh/interfaceTrackingFvMesh/freeSurfacePointDisplacement.C b/src/dynamicFaMesh/interfaceTrackingFvMesh/freeSurfacePointDisplacement.C index d8d92e959c..8661837cf2 100644 --- a/src/dynamicFaMesh/interfaceTrackingFvMesh/freeSurfacePointDisplacement.C +++ b/src/dynamicFaMesh/interfaceTrackingFvMesh/freeSurfacePointDisplacement.C @@ -364,7 +364,7 @@ Foam::interfaceTrackingFvMesh::pointDisplacement() { OPstream toNeighbProc ( - Pstream::commsTypes::blocking, + Pstream::commsTypes::buffered, procPatch.neighbProcNo() ); @@ -375,7 +375,7 @@ Foam::interfaceTrackingFvMesh::pointDisplacement() { IPstream fromNeighbProc ( - Pstream::commsTypes::blocking, + Pstream::commsTypes::buffered, procPatch.neighbProcNo() ); diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C index ddb61551d5..93d9c97a8a 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C @@ -587,12 +587,12 @@ void Foam::motionSmootherAlgo::correctBoundaryConditions if (schedEval.init) { displacementBf[patchi] - .initEvaluate(Pstream::commsTypes::blocking); + .initEvaluate(Pstream::commsTypes::buffered); } else { displacementBf[patchi] - .evaluate(Pstream::commsTypes::blocking); + .evaluate(Pstream::commsTypes::buffered); } } } @@ -608,12 +608,12 @@ void Foam::motionSmootherAlgo::correctBoundaryConditions if (schedEval.init) { displacementBf[patchi] - .initEvaluate(Pstream::commsTypes::blocking); + .initEvaluate(Pstream::commsTypes::buffered); } else { displacementBf[patchi] - .evaluate(Pstream::commsTypes::blocking); + .evaluate(Pstream::commsTypes::buffered); } } } diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C index 98f45bf5be..a38b0a163b 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C @@ -67,12 +67,12 @@ void Foam::motionSmootherAlgo::checkConstraints forAllReverse(bFld, patchi) { - bFld[patchi].initEvaluate(Pstream::commsTypes::blocking); // buffered + bFld[patchi].initEvaluate(Pstream::commsTypes::buffered); } forAllReverse(bFld, patchi) { - bFld[patchi].evaluate(Pstream::commsTypes::blocking); + bFld[patchi].evaluate(Pstream::commsTypes::buffered); } diff --git a/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.C b/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.C index 89c358c1b5..55ee4b2899 100644 --- a/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.C +++ b/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.C @@ -292,7 +292,7 @@ void Foam::faBoundaryMesh::calcGeometry() if ( - pBufs.commsType() == Pstream::commsTypes::blocking + pBufs.commsType() == Pstream::commsTypes::buffered || pBufs.commsType() == Pstream::commsTypes::nonBlocking ) { @@ -943,7 +943,7 @@ void Foam::faBoundaryMesh::movePoints(const pointField& p) if ( - pBufs.commsType() == Pstream::commsTypes::blocking + pBufs.commsType() == Pstream::commsTypes::buffered || pBufs.commsType() == Pstream::commsTypes::nonBlocking ) { @@ -989,7 +989,7 @@ void Foam::faBoundaryMesh::updateMesh() if ( - pBufs.commsType() == Pstream::commsTypes::blocking + pBufs.commsType() == Pstream::commsTypes::buffered || pBufs.commsType() == Pstream::commsTypes::nonBlocking ) { diff --git a/src/finiteArea/faMesh/faMeshDemandDrivenData.C b/src/finiteArea/faMesh/faMeshDemandDrivenData.C index 49b60d4018..66c4bed86d 100644 --- a/src/finiteArea/faMesh/faMeshDemandDrivenData.C +++ b/src/finiteArea/faMesh/faMeshDemandDrivenData.C @@ -1606,7 +1606,7 @@ void Foam::faMesh::calcPointAreaNormals(vectorField& result) const { UOPstream::write ( - UPstream::commsTypes::blocking, + UPstream::commsTypes::buffered, procPatch.neighbProcNo(), patchPointNormals ); @@ -1618,7 +1618,7 @@ void Foam::faMesh::calcPointAreaNormals(vectorField& result) const { UIPstream::read ( - UPstream::commsTypes::blocking, + UPstream::commsTypes::buffered, procPatch.neighbProcNo(), patchPointNormals ); @@ -1916,7 +1916,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit(vectorField& result) const { OPstream toNeighbProc ( - Pstream::commsTypes::blocking, + Pstream::commsTypes::buffered, procPatch.neighbProcNo(), toNgbProcLsPoints.size_bytes() + toNgbProcLsPointStarts.size_bytes() @@ -1945,7 +1945,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit(vectorField& result) const { IPstream fromNeighbProc ( - Pstream::commsTypes::blocking, + Pstream::commsTypes::buffered, procPatch.neighbProcNo(), 10*patchPointLabels.size()*sizeof(vector) + fromNgbProcLsPointStarts.size_bytes() diff --git a/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchField.H index 9772728ab5..8ff67f1b0c 100644 --- a/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchField.H @@ -130,7 +130,7 @@ public: // HJ, 30/Jun/2009 virtual void evaluate ( - const Pstream::commsTypes commsType = Pstream::commsTypes::blocking + const Pstream::commsTypes commsType = Pstream::commsTypes::buffered ); //- Return face-gradient transform diagonal diff --git a/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.H index 616d257fe4..e305d5ed9e 100644 --- a/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.H @@ -162,7 +162,7 @@ public: virtual void initEvaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) { initEvaluate(commsType); @@ -172,7 +172,7 @@ public: virtual void evaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) { evaluate(commsType); diff --git a/src/finiteArea/fields/faPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFaPatchField.H index 1c618f3f7f..e0c0f8c0c4 100644 --- a/src/finiteArea/fields/faPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFaPatchField.H @@ -136,7 +136,7 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); }; diff --git a/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.H index 760d9668b4..f8156670d3 100644 --- a/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.H @@ -210,7 +210,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ); diff --git a/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.H index 16f0e01da0..325136fe19 100644 --- a/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.H @@ -231,7 +231,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ); //- Return the matrix diagonal coefficients corresponding to the diff --git a/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.H index 3d31ef2ebe..78a432e81e 100644 --- a/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.H @@ -178,7 +178,7 @@ public: virtual void initEvaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} @@ -186,7 +186,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} diff --git a/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.H index 407c9a9b15..298fd742fc 100644 --- a/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.H @@ -133,7 +133,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ); //- Return the matrix diagonal coefficients corresponding to the diff --git a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C index 70b711375f..7a7812056c 100644 --- a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C +++ b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C @@ -92,7 +92,7 @@ Foam::cyclicFaPatchField::cyclicFaPatchField if (IOobjectOption::isReadRequired(requireValue)) { - this->evaluate(Pstream::commsTypes::blocking); + this->evaluate(Pstream::commsTypes::buffered); } } diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H index 06736b61b3..e50d5a2a91 100644 --- a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H @@ -191,7 +191,7 @@ public: virtual void initEvaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} @@ -200,7 +200,7 @@ public: virtual void evaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} diff --git a/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchField.H index f417f28c40..22858d7db5 100644 --- a/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchField.H @@ -124,7 +124,7 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType = Pstream::commsTypes::blocking + const Pstream::commsTypes commsType = Pstream::commsTypes::buffered ); diff --git a/src/finiteArea/fields/faPatchFields/derived/clampedPlate/clampedPlateFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/clampedPlate/clampedPlateFaPatchField.H index ca38463e02..1fd9007a83 100644 --- a/src/finiteArea/fields/faPatchFields/derived/clampedPlate/clampedPlateFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/clampedPlate/clampedPlateFaPatchField.H @@ -155,7 +155,7 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); //- Return the matrix diagonal coefficients corresponding to the diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H index e99ab8dae0..0c47bd2ceb 100644 --- a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H +++ b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H @@ -564,7 +564,7 @@ public: virtual void initEvaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} @@ -572,7 +572,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ); //- Initialise the evaluation of the patch field after a local @@ -580,7 +580,7 @@ public: virtual void initEvaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} @@ -588,7 +588,7 @@ public: virtual void evaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} diff --git a/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.H b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.H index fd1c318d8e..bf487edd2d 100644 --- a/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.H +++ b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.H @@ -482,7 +482,7 @@ public: virtual void initEvaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} @@ -490,7 +490,7 @@ public: virtual void evaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} @@ -516,14 +516,14 @@ public: //- Initialise the evaluation of the patch field, generally a no-op virtual void initEvaluate ( - const Pstream::commsTypes commsType = Pstream::commsTypes::blocking + const Pstream::commsTypes commsType = Pstream::commsTypes::buffered ) {} //- Evaluate the patch field, generally a no-op virtual void evaluate ( - const Pstream::commsTypes commsType = Pstream::commsTypes::blocking + const Pstream::commsTypes commsType = Pstream::commsTypes::buffered ) {} diff --git a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H index 9c9fabaf73..30d2268cfd 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H @@ -125,7 +125,7 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); //- Return face-gradient transform diagonal diff --git a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H index 23ff2481f5..60671c45dc 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H @@ -188,7 +188,7 @@ public: virtual void initEvaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) { initEvaluate(commsType); @@ -198,7 +198,7 @@ public: virtual void evaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) { evaluate(commsType); diff --git a/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H index effa2031c7..b4b5e3060d 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H @@ -191,7 +191,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ); //- Return face-gradient transform diagonal diff --git a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H index a18da2822a..84c9f30f8c 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H @@ -135,7 +135,7 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); }; diff --git a/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H index f80fadc4fe..07919120ba 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H @@ -210,7 +210,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ); //- Return the matrix diagonal coefficients corresponding to the diff --git a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H index 7d4f5518f7..67d8b9ac7a 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H @@ -268,7 +268,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ); //- Return the matrix diagonal coefficients corresponding to the diff --git a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H index cb2f0797ac..0c9f707d4c 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H @@ -176,7 +176,7 @@ public: virtual void initEvaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} @@ -184,7 +184,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} diff --git a/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H index 094fe5b625..950b8b2ecf 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H @@ -142,7 +142,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ); //- Return the matrix diagonal coefficients corresponding to the diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C index 7a70acb1e0..380b6e4999 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C @@ -70,7 +70,7 @@ Foam::cyclicFvPatchField::cyclicFvPatchField if (needValue) { - this->evaluate(Pstream::commsTypes::blocking); + this->evaluate(Pstream::commsTypes::buffered); } } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C index f287734adc..a95239a9b6 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C @@ -121,7 +121,7 @@ Foam::cyclicACMIFvPatchField::cyclicACMIFvPatchField const int oldConsistency = consistency; consistency = 0; - this->evaluate(Pstream::commsTypes::blocking); + this->evaluate(Pstream::commsTypes::buffered); consistency = oldConsistency; } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C index dcd345fc87..fad9173a2e 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C @@ -66,7 +66,7 @@ Foam::jumpCyclicAMIFvPatchField::jumpCyclicAMIFvPatchField cyclicAMIFvPatchField(p, iF, dict) { // Call this evaluation in derived classes - //this->evaluate(Pstream::commsTypes::blocking); + //this->evaluate(Pstream::commsTypes::buffered); } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H index 08b110dc81..9cf3b074a5 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H @@ -199,7 +199,7 @@ public: virtual void initEvaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} @@ -208,7 +208,7 @@ public: virtual void evaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H index 400112d67a..5ea077b08a 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H @@ -145,7 +145,7 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); //- Return face-gradient transform diagonal diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H index 6d8e34e98b..fe9e31f644 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H @@ -146,7 +146,7 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); //- Return face-gradient transform diagonal diff --git a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C index eaf2de2de4..64926a0bae 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C @@ -192,7 +192,7 @@ Foam::codedFixedValueFvPatchField::codedFixedValueFvPatchField this->extrapolateInternal(); // Evaluate to assign a value - this->evaluate(Pstream::commsTypes::blocking); + this->evaluate(Pstream::commsTypes::buffered); } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H index 3cde2e1c53..425208697f 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H @@ -245,7 +245,7 @@ public: //- Evaluate the patch field, sets updated() to false virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); //- Write diff --git a/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H index 863bd67ffb..b02036e92d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H @@ -251,7 +251,7 @@ public: // to false. virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); //- Write diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C index 921199406e..107fcf30a5 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C @@ -89,7 +89,7 @@ Foam::fanFvPatchField::fanFvPatchField if (!this->readValueEntry(dict)) { - this->evaluate(Pstream::commsTypes::blocking); + this->evaluate(Pstream::commsTypes::buffered); } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C index 8d62f14c27..4eafe72c8c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C @@ -94,7 +94,7 @@ Foam::fixedJumpFvPatchField::fixedJumpFvPatchField { if (!this->readValueEntry(dict)) { - this->evaluate(Pstream::commsTypes::blocking); + this->evaluate(Pstream::commsTypes::buffered); } } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C index b3efdea596..4c8c5aa199 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C @@ -73,7 +73,7 @@ Foam::fixedJumpAMIFvPatchField::fixedJumpAMIFvPatchField if (!this->readValueEntry(dict)) { - this->evaluate(Pstream::commsTypes::blocking); + this->evaluate(Pstream::commsTypes::buffered); } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H index 8fdfb7e7fd..026a245ccb 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H @@ -219,7 +219,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ); //- Return face-gradient transform diagonal diff --git a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C index 156ce0376b..bc4504b4a5 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C @@ -93,7 +93,7 @@ flowRateInletVelocityFvPatchVectorField // Value field required if mass based if (!this->readValueEntry(dict)) { - evaluate(Pstream::commsTypes::blocking); + evaluate(Pstream::commsTypes::buffered); } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.C index 045f59e00f..7ff807b21a 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.C @@ -87,7 +87,7 @@ flowRateOutletVelocityFvPatchVectorField // Value field required if mass based if (!this->readValueEntry(dict)) { - evaluate(Pstream::commsTypes::blocking); + evaluate(Pstream::commsTypes::buffered); } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.H index 3756b435a7..6a9f71ede2 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.H @@ -168,7 +168,7 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); //- Write diff --git a/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.C index 2b895940b7..e407d0ec07 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.C @@ -72,7 +72,7 @@ matchedFlowRateOutletVelocityFvPatchVectorField // Value field required if mass based if (!this->readValueEntry(dict)) { - evaluate(Pstream::commsTypes::blocking); + evaluate(Pstream::commsTypes::buffered); } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H index a81ce92912..4858f5ba96 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H @@ -215,7 +215,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ); //- Return face-gradient transform diagonal diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C index 8491516dab..40dc0780cc 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C @@ -72,7 +72,7 @@ timeVaryingMappedFixedValueFvPatchField // by re-setting of fvatchfield::updated_ flag. This is // so if first use is in the next time step it retriggers // a new update. - this->evaluate(Pstream::commsTypes::blocking); + this->evaluate(Pstream::commsTypes::buffered); } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C index deca4b4732..a10457eea4 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C @@ -77,7 +77,7 @@ Foam::uniformJumpFvPatchField::uniformJumpFvPatchField if (!this->readValueEntry(dict)) { - this->evaluate(Pstream::commsTypes::blocking); + this->evaluate(Pstream::commsTypes::buffered); } } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C index c0bf9569a7..07be85db27 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C @@ -74,7 +74,7 @@ Foam::uniformJumpAMIFvPatchField::uniformJumpAMIFvPatchField if (!this->readValueEntry(dict)) { - this->evaluate(Pstream::commsTypes::blocking); + this->evaluate(Pstream::commsTypes::buffered); } } diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H index 993433fd61..5acccdf4d0 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H @@ -635,7 +635,7 @@ public: virtual void initEvaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} @@ -643,7 +643,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ); //- Initialise the evaluation of the patch field after a local @@ -651,7 +651,7 @@ public: virtual void initEvaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} @@ -659,7 +659,7 @@ public: virtual void evaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H index ddb7dfa8b6..63cc9f794c 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H @@ -511,7 +511,7 @@ public: virtual void initEvaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} @@ -519,7 +519,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} @@ -528,7 +528,7 @@ public: virtual void initEvaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} @@ -536,7 +536,7 @@ public: virtual void evaluateLocal ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} diff --git a/src/functionObjects/field/mapFields/mapFieldsTemplates.C b/src/functionObjects/field/mapFields/mapFieldsTemplates.C index 749def67a3..2350ef32c0 100644 --- a/src/functionObjects/field/mapFields/mapFieldsTemplates.C +++ b/src/functionObjects/field/mapFields/mapFieldsTemplates.C @@ -43,7 +43,7 @@ void Foam::functionObjects::mapFields::evaluateConstraintTypes if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::nonBlocking ) { diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.H index 8fa5889ebe..a65d3d7910 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.H +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.H @@ -190,7 +190,7 @@ public: //- Update the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); //- Write diff --git a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C index e2475907e1..73f8923439 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C @@ -107,7 +107,7 @@ timeVaryingMappedFixedValuePointPatchField // of the pointPatchField::updated_ flag. This is // so if first use is in the next time step it retriggers // a new update. - pointPatchField::evaluate(Pstream::commsTypes::blocking); + pointPatchField::evaluate(Pstream::commsTypes::buffered); } } diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H index 6c618a9747..2dd4ed08e4 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H +++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H @@ -199,7 +199,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H index f6ffa116bb..35816cc5ac 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H @@ -203,7 +203,7 @@ public: virtual void evaluate ( const Pstream::commsTypes commsType = - Pstream::commsTypes::blocking + Pstream::commsTypes::buffered ) {} diff --git a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H index 1932066698..9b8d6cd1e6 100644 --- a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H +++ b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H @@ -138,7 +138,7 @@ public: // adjoint pressure BC virtual void evaluate ( - const Pstream::commsTypes commsType = Pstream::commsTypes::blocking + const Pstream::commsTypes commsType = Pstream::commsTypes::buffered ); //virtual void updateCoeffs(); diff --git a/src/sampling/surface/isoSurface/isoSurfacePoint.C b/src/sampling/surface/isoSurface/isoSurfacePoint.C index 0de39dbcd6..020a0465a2 100644 --- a/src/sampling/surface/isoSurface/isoSurfacePoint.C +++ b/src/sampling/surface/isoSurface/isoSurfacePoint.C @@ -164,10 +164,9 @@ void Foam::isoSurfacePoint::syncUnseparatedPoints patchInfo[nbrPointi] = pointValues[meshPts[pointi]]; } - // buffered send OPstream toNbr ( - UPstream::commsTypes::blocking, + UPstream::commsTypes::buffered, procPatch.neighbProcNo() ); toNbr << patchInfo; diff --git a/src/surfMesh/writers/debug/debugSurfaceWriter.H b/src/surfMesh/writers/debug/debugSurfaceWriter.H index 239f4be28c..bbe5c4fca6 100644 --- a/src/surfMesh/writers/debug/debugSurfaceWriter.H +++ b/src/surfMesh/writers/debug/debugSurfaceWriter.H @@ -44,7 +44,7 @@ Description Format options: \table Property | Description | Required | Default - commsType | blocking/nonBlocking/scheduled | no | scheduled + commsType | scheduled/nonBlocking/buffered | no | scheduled merge | Enable geometry/field merging | no | true write | Write file(s) | no | false \endtable diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.C index c7bf081805..d2beacf925 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.C +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.C @@ -66,7 +66,7 @@ Foam::energyJumpFvPatchScalarField::energyJumpFvPatchScalarField { if (!this->readValueEntry(dict)) { - evaluate(Pstream::commsTypes::blocking); + evaluate(Pstream::commsTypes::buffered); } } @@ -115,7 +115,7 @@ void Foam::energyJumpFvPatchScalarField::updateCoeffs() const_cast(TbPatch); // force update of jump - Tbp.evaluate(Pstream::commsTypes::blocking); + Tbp.evaluate(Pstream::commsTypes::buffered); const labelUList& faceCells = this->patch().faceCells(); diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.C index 8a55c2152d..d222d40dd8 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.C +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.C @@ -66,7 +66,7 @@ Foam::energyJumpAMIFvPatchScalarField::energyJumpAMIFvPatchScalarField { if (!this->readValueEntry(dict)) { - evaluate(Pstream::commsTypes::blocking); + evaluate(Pstream::commsTypes::buffered); } } @@ -115,7 +115,7 @@ void Foam::energyJumpAMIFvPatchScalarField::updateCoeffs() const_cast(TbPatch); // force update of jump - Tbp.evaluate(Pstream::commsTypes::blocking); + Tbp.evaluate(Pstream::commsTypes::buffered); const labelUList& faceCells = this->patch().faceCells(); diff --git a/src/transportModels/interfaceProperties/alphaContactAngle/alphaContactAngleTwoPhaseFvPatchScalarField.H b/src/transportModels/interfaceProperties/alphaContactAngle/alphaContactAngleTwoPhaseFvPatchScalarField.H index 12cff614f1..d9fe5dca2e 100644 --- a/src/transportModels/interfaceProperties/alphaContactAngle/alphaContactAngleTwoPhaseFvPatchScalarField.H +++ b/src/transportModels/interfaceProperties/alphaContactAngle/alphaContactAngleTwoPhaseFvPatchScalarField.H @@ -148,7 +148,7 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::buffered ); //- Write