diff --git a/applications/test/parallel-comm1/Test-parallel-comm1.C b/applications/test/parallel-comm1/Test-parallel-comm1.C index d0bc966a5d9a2ff6ba93f2162c9853c77e3cd2a4..33a6bd5bdcb54a81a0abd1eb98a01eb22d412026 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<char*>(&procValue), sizeof(scalar), @@ -79,7 +79,7 @@ scalar sumReduce { UOPstream::write ( - UPstream::commsTypes::blocking, + UPstream::commsTypes::buffered, proci, reinterpret_cast<const char*>(&sum), sizeof(scalar), @@ -93,7 +93,7 @@ scalar sumReduce { UOPstream::write ( - UPstream::commsTypes::blocking, + UPstream::commsTypes::buffered, UPstream::masterNo(), reinterpret_cast<const char*>(&localValue), sizeof(scalar), @@ -105,7 +105,7 @@ scalar sumReduce { UIPstream::read ( - UPstream::commsTypes::blocking, + UPstream::commsTypes::buffered, UPstream::masterNo(), reinterpret_cast<char*>(&sum), sizeof(scalar), diff --git a/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C b/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C index ce00f4d8cbe0f8c4da50cc7d53049b9214a44e21..e5ec8bd2b6ce3c79800936aa90265f565b9fe601 100644 --- a/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C +++ b/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C @@ -66,7 +66,7 @@ int main(int argc, char *argv[]) Pstream::myProcNo() ); - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; if (!Pstream::master()) { @@ -150,7 +150,7 @@ int main(int argc, char *argv[]) // Do a non-blocking send inbetween { - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; for (const int proci : Pstream::allProcs()) { diff --git a/applications/test/parallel/Test-parallel.C b/applications/test/parallel/Test-parallel.C index 06d3ea16e9c75d526513cee361021e9d18ec2d41..fa6ab72bee0c4196f14c88e7ea3797846236d6e8 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 825cde7e4ff6b7ac10b8929c526d772b23d4fe04..cfaea6f8084f1dc022500350f98ea222f88d3540 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/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index ccc5b21fe99a74fa41bf1a884c0d88efca74586b..1b6dbddb93046560755619e8f545710e561ad9d2 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -618,7 +618,7 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches labelList rotation(faces.size(), Zero); labelList faceMap(faces.size(), label(-1)); - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; // Send ordering forAll(sortMesh.boundaryMesh(), patchi) diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index 133d208d96ac1c40f662ca43a96698c0b8a85b88..f07f49bfad32692906c29aa2c963161121b59d49 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/parallelProcessing/redistributePar/parLagrangianDistributor.C b/applications/utilities/parallelProcessing/redistributePar/parLagrangianDistributor.C index de9968fbfb0110408cd650595d3fbbf0279372c7..97c5b0cc5c96d0cab932e4a6e11f7f4a68d23628 100644 --- a/applications/utilities/parallelProcessing/redistributePar/parLagrangianDistributor.C +++ b/applications/utilities/parallelProcessing/redistributePar/parLagrangianDistributor.C @@ -184,7 +184,7 @@ Foam::parLagrangianDistributor::distributeLagrangianPositions labelListList sendMap; // Transfer buffers - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; { // List of lists of particles to be transferred for all of the diff --git a/applications/utilities/preProcessing/mapFieldsPar/MapVolFields.H b/applications/utilities/preProcessing/mapFieldsPar/MapVolFields.H index 1257d47aeb6a3fac77dae149ca90e082cba7af0f..f3106def5c470ff6dfee134cdcb6e4c1a09f9dff 100644 --- a/applications/utilities/preProcessing/mapFieldsPar/MapVolFields.H +++ b/applications/utilities/preProcessing/mapFieldsPar/MapVolFields.H @@ -48,7 +48,7 @@ void evaluateConstraintTypes(GeometricField<Type, fvPatchField, volMesh>& fld) if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::nonBlocking ) { diff --git a/etc/controlDict b/etc/controlDict index f084663716d5b90609bd86eddeb68f75b53f12ab..d0ffb7655227b6cbec2ffb272bd0352f6c2c92be 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 d5f8ad2cd9baac987fb12cf0a5433778c243edb2..59175756032375a746ec80d349ca2a58233442db 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C +++ b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C @@ -115,7 +115,7 @@ void Foam::ParSortableList<Type>::checkAndSend } { - OPstream toProc(UPstream::commsTypes::blocking, destProci); + OPstream toProc(UPstream::commsTypes::buffered, destProci); toProc << values << indices; } } @@ -309,7 +309,7 @@ void Foam::ParSortableList<Type>::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/IOobjects/decomposedBlockData/decomposedBlockData.C b/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C index 4139ecca421647417fb51347da903d2c34ace88e..8542952455c88a611f6ff8b68c931b0a5a5ca265 100644 --- a/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C +++ b/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C @@ -545,7 +545,7 @@ bool Foam::decomposedBlockData::readBlocks } else { - PstreamBuffers pBufs(comm, UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs(comm); if (UPstream::master(comm)) { @@ -667,7 +667,7 @@ Foam::autoPtr<Foam::ISstream> Foam::decomposedBlockData::readBlocks } else { - PstreamBuffers pBufs(comm, UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs(comm); if (UPstream::master(comm)) { diff --git a/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.C b/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.C index cc80139f0e68f4c65b2d932962718b4a84fcb231..efdb248655576f7945706c31c62be1d0e5d01086 100644 --- a/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.C +++ b/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.C @@ -115,7 +115,7 @@ void Foam::masterOFstream::commit() } // Different files - PstreamBuffers pBufs(comm_, UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs(comm_); if (!UPstream::master(comm_)) { diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/OPstreams.C b/src/OpenFOAM/db/IOstreams/Pstreams/OPstreams.C index e956e8de74f477657f46c4f61f611393f1971792..fc8312f674923b47a0b6fcccd4ec742eb46585b7 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 e61bf65e904cc4f1384692faf582cb679685b9c9..ed40029c9329aef3002343c72f62477bc3adc218 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H +++ b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H @@ -32,13 +32,13 @@ 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. Example usage: \code - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; for (const int proci : UPstream::allProcs()) { @@ -51,7 +51,7 @@ Description } } - pBufs.finishedSends(); // no-op for blocking + pBufs.finishedSends(); // no-op for buffered for (const int proci : UPstream::allProcs()) { @@ -68,7 +68,7 @@ Description one-to-all and all-to-one communication patterns. For example, \code - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; if (UPstream::master()) { @@ -96,7 +96,7 @@ Description For example, \code - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; pBufs.initRegisterSend(); diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H b/src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H index 3e70872c34a2820ba8e44fb6e89bde3c8b8f8495..138dc465a8cdefec9854e161294fa5093e79cfe8 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<class Type> - 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<class Type> - 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<class Type> - 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<class Type> - 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 bdf79dd6cd4bcd0c04234b693528f33d8b4f7383..cf531d1014e2da1ee1f25ee61e8d3c2e0c50a259 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 bf22b7bac0bae4752400b33f136fa9e24dd0783e..ee446347708652eedd9148f2c6d1897c53762336 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<commsTypes> 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 0a16f916c39373cfbbc838d967fd4830509a786a..70d5ce25560fbebf59db57104610446c48f3a6e2 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C @@ -598,7 +598,7 @@ void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::evaluate() if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::nonBlocking ) { @@ -689,7 +689,7 @@ void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::evaluateLocal() if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::nonBlocking ) { @@ -755,7 +755,7 @@ Foam::GeometricBoundaryField<Type, PatchField, GeoMesh> 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 20cb347469c38a61a076143928ead31c05598ed6..d132cc222bd608328fb09ea2811577bb98428d59 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 a70e06f7320501d07b127237bf5a116fd40f2e92..68d71f61ef0d29f3ed25d054be2ab3a0e4e96845 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 a4f7c2b205fd1df2378458664a33ac5e29a96a6f..4a71dd3766559a0e08458d18b273f6587a257037 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 80e5905a4e2e0718f7843bf6d23e36e611d3c805..d28e88460543cff7aba674f5bb42f792bf225223 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 628ae11ae9a84b1521167a265b7819d3f2d79300..08479d9bf50392c88888843a1e639b996d1b7ca5 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 8808cc3a0abfb54f3f283053d9743dc472b6339d..67d90a5366dd77a87f74d9dcfffbf1d1c657ad1b 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 61f0962398c1115253a39179d7e2306e60d76a50..6fa9bf6cac3c9696242aa48e73d3738532247f4e 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 a5eed9049d410ba8475b371d1c462873f512d278..147fd58cf9b38de217f1e3c250d052fedb05c76c 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 1b9b545902687b9c587285f77e12ef69819a90d2..b3b62e8c69e01e274452508665b8c88ca5a8b2a2 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 436076f52142aeed8aa5df93c14809d68d962fe0..31f2bd75d9701f4d4510ac09e7afac4db4ab5c3c 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 69bef4e18851da1633376b6ccb58b9ad146e431c..c5f75450c6822dec7d9feaa808655a268b010007 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<Type>::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 9999047742a94499d77317159d0a4ef4a3f63aaa..af76e7d9747aaf98ebdb302086267b203cce0af1 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 bdfa66a5a8f71614eab224d507cc1e5a3b030218..8cbb45142dba20f249bf50e15be3deccd6ce0d64 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 543b7f57cf99388e2d601c7287fc7bb8ce94eb25..c2a47ce4125a60a539b0ff2a271cc38d706863a5 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/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C b/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C index 5299af8ab4bac4c71ae8173ec0c3f5dfb8fe9cc6..20c9511aa0dd13a429d00295dc786db2d12dc37c 100644 --- a/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C +++ b/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C @@ -452,7 +452,7 @@ Foam::fileOperations::masterUncollatedFileOperation::read { autoPtr<ISstream> isPtr; - PstreamBuffers pBufs(comm, UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs(comm); if (UPstream::master(comm)) { @@ -1834,7 +1834,7 @@ bool Foam::fileOperations::masterUncollatedFileOperation::readHeader } // Is a more efficient scatter possible? - PstreamBuffers pBufs(comm_, UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs(comm_); if (Pstream::master(comm_)) { @@ -2396,7 +2396,7 @@ Foam::fileOperations::masterUncollatedFileOperation::NewIFstream filePaths[Pstream::myProcNo(comm_)] = filePath; Pstream::gatherList(filePaths, Pstream::msgType(), comm_); - PstreamBuffers pBufs(comm_, Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs(comm_); if (Pstream::master(comm_)) { diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C index a3fa3d2bb145bb0df1be715765ba8a1d3ef3004e..91423a6ca274ac4999529437ee57c350814cb45f 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C @@ -44,7 +44,7 @@ void Foam::LduMatrix<Type, DType, LUType>::initMatrixInterfaces if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::nonBlocking ) { @@ -88,7 +88,7 @@ void Foam::LduMatrix<Type, DType, LUType>::initMatrixInterfaces interfacei, psiif, interfaceCoeffs[interfacei], - UPstream::commsTypes::blocking + UPstream::commsTypes::buffered ); } } @@ -172,7 +172,7 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces if ( - commsType == UPstream::commsTypes::blocking + commsType == UPstream::commsTypes::buffered || commsType == UPstream::commsTypes::nonBlocking ) { @@ -184,7 +184,7 @@ void Foam::LduMatrix<Type, DType, LUType>::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<Type, DType, LUType>::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 2a0c06c60751abc6362b8fbcb0a3c8dd10365f6c..6d95e5215a759bfdd26705b4479b2cddf6e3cb65 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 b7434b7e1afee47c265011066119d000ccb6bc90..6b4f48dc36873a775c95c46b3ca70e1888fb60fd 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/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C index a3fe33a999dff5bdf102f990f3c1812915c075c3..7225bdcaaa8b23c8bf98c8ef4819ffcbeb4df207 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C @@ -311,12 +311,7 @@ void Foam::GAMGSolver::gatherMatrices const auto& boundaryMap = agglomeration_.boundaryMap(destLevel); // Use PstreamBuffers - PstreamBuffers pBufs - ( - UPstream::commsTypes::nonBlocking, - UPstream::msgType(), - comm - ); + PstreamBuffers pBufs(comm); // Send to master if (!UPstream::master(comm)) diff --git a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C index e847072e24e3c84169c18248fcbe8e97ba537e23..40a5975794e0197594d5ef65b7693747560f4a87 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C +++ b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C @@ -1344,12 +1344,7 @@ void Foam::lduPrimitiveMesh::gather (void)mesh.lduAddr().patchSchedule(); // Use PstreamBuffers - PstreamBuffers pBufs - ( - Pstream::commsTypes::nonBlocking, - UPstream::msgType(), - comm - ); + PstreamBuffers pBufs(comm); // Send to master if (!Pstream::master(comm)) diff --git a/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.C b/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.C index 83b28ba35bf05edbdf4cbe350495ef5606dab086..266583000abf2c357680f7c3805c5bdd6c7b6d4a 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 94a764b961f8b475e1fba9213e3157ab323588e7..ce75d448405bb4cb3bfee157c84a20d4f6d29e58 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. @@ -681,7 +681,7 @@ void Foam::mapDistributeBase::distribute if (!is_contiguous<T>::value) { - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking, tag, comm); + PstreamBuffers pBufs(comm, tag); // Stream data into buffer for (const int proci : UPstream::allProcs(comm)) @@ -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. @@ -1121,7 +1121,7 @@ void Foam::mapDistributeBase::distribute if (!is_contiguous<T>::value) { - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking, tag, comm); + PstreamBuffers pBufs(comm, tag); // Stream data into buffer for (const int proci : UPstream::allProcs(comm)) diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index 693684953181ec1f2de617bd66f7b6735579be26..f7332a19006d8de98228e305f65a07eb5dea63ba 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/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C index 21b4030d2277b8b6cced828e1523e1bd2ae6e13e..b23781865970512b0ebd79cc97a82e1996eb6fd1 100644 --- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C @@ -132,7 +132,7 @@ void Foam::syncTools::syncPointMap // Presize according to number of processor patches // (global topology information may not yet be available...) DynamicList<label> neighbProcs(patches.nProcessorPatches()); - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; // Reduce communication by only sending non-zero data, // but with multiply-connected processor/processor @@ -396,7 +396,7 @@ void Foam::syncTools::syncEdgeMap // Presize according to number of processor patches // (global topology information may not yet be available...) DynamicList<label> neighbProcs(patches.nProcessorPatches()); - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; // Reduce communication by only sending non-zero data, // but with multiply-connected processor/processor @@ -1142,7 +1142,7 @@ void Foam::syncTools::syncBoundaryFaceList else { DynamicList<label> neighbProcs; - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; // Send for (const polyPatch& pp : patches) diff --git a/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C b/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C index 9de90ba469e4b791602b680797d008dfc58b8087..4519893055dbcfd96788478c5891bbc33b631c54 100644 --- a/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C +++ b/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C @@ -1092,7 +1092,7 @@ void Foam::globalIndex::get ); // Send local indices to individual processors as local index - PstreamBuffers sendBufs(UPstream::commsTypes::nonBlocking, tag, comm); + PstreamBuffers sendBufs(comm, tag); for (const auto proci : validBins) { @@ -1109,7 +1109,7 @@ void Foam::globalIndex::get sendBufs.finishedSends(); - PstreamBuffers returnBufs(UPstream::commsTypes::nonBlocking, tag, comm); + PstreamBuffers returnBufs(comm, tag); for (const int proci : sendBufs.allProcs()) { diff --git a/src/Pstream/dummy/UIPBstreamRead.C b/src/Pstream/dummy/UIPBstreamRead.C index ac23ba916de8d884a56ac8444ea839a2a37f9a17..31e0f0743fa0fd7ab502edbb20f9fb9822bb4d31 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 316550769e6a79a431dc986b00f514dc4d5a854c..c8b7286fdf623ef7c04afb15c7b663830431cdfb 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 f384c391ebd0b211bad66ca36a3d678399b34148..0ee1d63ce39a3a0f0309f392aac66f9831415749 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<char*>(&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 afee9a19055f81c0881840551199724a869dfe25..2a690f4b9f8305bfe234f9a52f1315f88110823d 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. @@ -35,11 +35,12 @@ License // - as of 2023-06 appears to be broken with INTELMPI + PMI-2 (slurm) // and perhaps other places so currently avoid +#undef Pstream_use_MPI_Get_count + // * * * * * * * * * * * * * * * 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 +55,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)) + { + 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); } - if (UPstream::warnComm >= 0 && communicator != UPstream::warnComm) + else if (UPstream::debug) { 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); } + 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 +112,8 @@ static Foam::label UPstream_mpi_receive ); } + profilingPstream::addGatherTime(); + if (returnCode != MPI_SUCCESS) { FatalErrorInFunction @@ -104,36 +121,53 @@ static Foam::label UPstream_mpi_receive << Foam::abort(FatalError); return 0; } - - profilingPstream::addGatherTime(); + else if (UPstream::debug) + { + Pout<< "UIPstream::read : finished recv from:" + << fromProcNo + << " size:" << label(bufSize) << " tag:" << tag + << Foam::endl; + } // Check size of message read - - int messageSize; - MPI_Get_count(&status, MPI_BYTE, &messageSize); - - if (UPstream::debug) + #ifdef Pstream_use_MPI_Get_count + int count(0); + MPI_Get_count(&status, MPI_BYTE, &count); + #else + MPI_Count count(0); + MPI_Get_elements_x(&status, MPI_BYTE, &count); + #endif + + // Errors + if (count == MPI_UNDEFINED || int64_t(count) < 0) { - Pout<< "UIPstream::read : finished read from:" << fromProcNo - << " tag:" << tag << " read size:" << label(bufSize) - << " commsType:" << UPstream::commsTypeNames[commsType] - << Foam::endl; + FatalErrorInFunction + << "MPI_Get_count() or MPI_Get_elements_x() : " + "returned undefined or negative value" + << Foam::abort(FatalError); + } + else if (int64_t(count) > int64_t(UList<char>::max_size())) + { + FatalErrorInFunction + << "MPI_Get_count() or MPI_Get_elements_x() : " + "count is larger than UList<char>::max_size() bytes" + << Foam::abort(FatalError); } - if (messageSize > bufSize) + + 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 +192,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 +232,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,34 +262,73 @@ void Foam::UIPstream::bufferIPCrecv() &status ); - MPI_Get_count(&status, MPI_BYTE, &messageSize_); - profilingPstream::addProbeTime(); - recvBuf_.resize(messageSize_); + + #ifdef Pstream_use_MPI_Get_count + int count(0); + MPI_Get_count(&status, MPI_BYTE, &count); + #else + MPI_Count count(0); + MPI_Get_elements_x(&status, MPI_BYTE, &count); + #endif + + // Errors + if (count == MPI_UNDEFINED || int64_t(count) < 0) + { + FatalErrorInFunction + << "MPI_Get_count() or MPI_Get_elements_x() : " + "returned undefined or negative value" + << Foam::abort(FatalError); + } + else if (int64_t(count) > int64_t(UList<char>::max_size())) + { + FatalErrorInFunction + << "MPI_Get_count() or MPI_Get_elements_x() : " + "count is larger than UList<char>::max_size() bytes" + << Foam::abort(FatalError); + } 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_, nullptr // UPstream::Request ); + if (count < 0) + { + FatalErrorInFunction + << "MPI_recv() with negative size??" + << Foam::abort(FatalError); + } + else if (int64_t(count) > int64_t(UList<char>::max_size())) + { + FatalErrorInFunction + << "MPI_recv() larger than " + "UList<char>::max_size() bytes" + << Foam::abort(FatalError); + } + // 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 +337,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 c01bff64b3df6c55427ed0996a77e5ace0b7a412..f4c9412fca4e182564450d8b0cc75361ff92d255 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<char*>(&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 c1086fd94c8feae81ab7605b5ecc37af84421f01..8613c17dfcff42ac0aad9ecbe6269e3759a65b8d 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 93bd24cda175e7bcac3cd600b228012f11149818..b23c85d66c26211ef081657db0c2b6ee8c9749f3 100644 --- a/src/Pstream/mpi/UPstream.C +++ b/src/Pstream/mpi/UPstream.C @@ -40,6 +40,8 @@ License #include <numeric> #include <string> +#undef Pstream_use_MPI_Get_count + // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // The min value and default for MPI buffer length @@ -787,7 +789,7 @@ Foam::UPstream::probeMessage int flag = 0; MPI_Status status; - if (UPstream::commsTypes::blocking == commsType) + if (UPstream::commsTypes::buffered == commsType) { // Blocking profilingPstream::beginTiming(); @@ -838,8 +840,36 @@ Foam::UPstream::probeMessage if (flag) { + // Unlikely to be used with large amounts of data, + // but use MPI_Get_elements_x() instead of MPI_Count() anyhow + + #ifdef Pstream_use_MPI_Get_count + int count(0); + MPI_Get_count(&status, MPI_BYTE, &count); + #else + MPI_Count count(0); + MPI_Get_elements_x(&status, MPI_BYTE, &count); + #endif + + // Errors + if (count == MPI_UNDEFINED || int64_t(count) < 0) + { + FatalErrorInFunction + << "MPI_Get_count() or MPI_Get_elements_x() : " + "returned undefined or negative value" + << Foam::abort(FatalError); + } + else if (int64_t(count) > int64_t(INT_MAX)) + { + FatalErrorInFunction + << "MPI_Get_count() or MPI_Get_elements_x() : " + "count is larger than INI_MAX bytes" + << Foam::abort(FatalError); + } + + result.first = status.MPI_SOURCE; - MPI_Get_count(&status, MPI_BYTE, &result.second); + result.second = int(count); } return result; diff --git a/src/Pstream/mpi/UPstreamBroadcast.C b/src/Pstream/mpi/UPstreamBroadcast.C index cc75f95ed59f3d8a00a67ba94b9d5329562496f4..f3b7fac7d4a8eb14c5341f978842da4b01d01efb 100644 --- a/src/Pstream/mpi/UPstreamBroadcast.C +++ b/src/Pstream/mpi/UPstreamBroadcast.C @@ -47,21 +47,21 @@ bool Foam::UPstream::broadcast //Needed? PstreamGlobals::checkCommunicator(comm, rootProcNo); - if (UPstream::debug) + if (UPstream::warnComm >= 0 && comm != UPstream::warnComm) { Pout<< "UPstream::broadcast : root:" << rootProcNo << " comm:" << comm << " size:" << label(bufSize) + << " warnComm:" << UPstream::warnComm << Foam::endl; + error::printStack(Pout); } - if (UPstream::warnComm >= 0 && comm != UPstream::warnComm) + else if (UPstream::debug) { Pout<< "UPstream::broadcast : root:" << rootProcNo << " comm:" << comm << " size:" << label(bufSize) - << " warnComm:" << UPstream::warnComm << Foam::endl; - error::printStack(Pout); } profilingPstream::beginTiming(); diff --git a/src/Pstream/mpi/UPstreamWrapping.txx b/src/Pstream/mpi/UPstreamWrapping.txx index db3f095136ae7dcfed011e95ca733b3ae7ef6e72..94fc3025e19ab291ec4d2ee2a9baab7e5bc81587 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 46336accf7ecfbf8e4c43447a86831b57d76ec1e..9e56bcb92d0d20ce8abc6e15a8cb0427b679be3f 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 b552a4cf48948eac62d91a5fda39778c3e04588b..5779218627f3f852b2d570d0791f207072849b10 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 d8d92e959c036caad1742bb6c70785558e178067..8661837cf23f48ec1ad612e2f88a305a23fd9edb 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/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C index a3b18318a1528002513c84bdef029bc5700cfe1d..b843e387670acde2f4653310902480d009f1851c 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C @@ -2153,7 +2153,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute UPstream::allToAll(nSendCells, nRecvCells); // Allocate buffers - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; // What to send to neighbouring domains diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C index ddb61551d57371d0376f0d724443d41ebf653255..93d9c97a8a217b82a17f3e84553dc66ed7465dd5 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 98f45bf5be828bd1c43b81b96f9ec730b298cbff..a38b0a163bdc2380e172cd120c4b4b1e99f7104e 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/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C index 7919d228e1867e88eafe0d3002ed54c4397e2a3e..c842c2a696000b406207d8338b1a101d149c9d2e 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C @@ -1272,7 +1272,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map) // Create subsetted refinement tree consisting of all parents that // move in their whole to other processor. - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; for (const int proci : Pstream::allProcs()) { diff --git a/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.C b/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.C index 89c358c1b5711b2151763bce4ecd2171e5530eea..55ee4b2899a70a3f16aae2ee07e9575dfd4072de 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 49b60d401803fd44135b1e88024b81cd9c60089f..66c4bed86ddc346b4516c1b46ced38232d9be54b 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 9772728ab5aa452bb69def2da72240941b495fc8..8ff67f1b0c7c24287d46338c5b2db8e83011bb70 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 616d257fe482ac17c4fcd61f75b88dbf63a67023..e305d5ed9e84a66497619dfbbbc64cacff47f6e1 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 1c618f3f7f0e8b0a55d04df5f464773ec3ef56b1..e0c0f8c0c41923d52aea8b85d8f07671ba748214 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 760d9668b461153847857119ba31ccc1c22feb23..f8156670d329a39ebe317a865ca56677a9df5012 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 16f0e01da09c5ae9690031811e67fdb5172b9580..325136fe19e33a33776a706da0f4cca478e9e06a 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 3d31ef2ebe80a9096a290859b418c21cd3fa1ef0..78a432e81e62753f20ac134acae9485b57531214 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 407c9a9b1509c81a24c893f220ab8f684132bb36..298fd742fc52236e274a304cdaa139be00b6c14f 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 70b711375f2fc7ac143a0dd81f61e83cad26bdee..7a7812056c20fe80e4fe94862374747e8beae77c 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<Type>::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 06736b61b3004d16ce4d15f2b86d64f5d699931c..e50d5a2a9184834334522c1762c14477baca4426 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 f417f28c4057fda54c698f4f5505b7d2d39873bb..22858d7db59b88da11015faf4555906fe96dc407 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 ca38463e0244102088b17fe64d8d1a8383e0f323..1fd9007a834a176f4c09af54f10ce1fc4b668aa8 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 e99ab8dae0eb67e039b0a8544d2d16f8c8b608dd..0c47bd2cebe6a322c43370614ed9fa3f5abac474 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 fd1c318d8e8b5451377a4794b52ed86819eefa87..bf487edd2d22dcaefd81c9d01c32bae022192e35 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 9c9fabaf73e01b1cae694f62b06730679b2b7366..30d2268cfd0bb167bc0b02ebdb0de172fd7b34ec 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 23ff2481f59312803aaa48d5cb234cb7f21296f6..60671c45dc2982647fb13fb6b94762ec2257cabe 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 effa2031c7f87c593d1b5c271f4846edc26c250b..b4b5e3060d388282fa7d3d289a73891329fa79de 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 a18da2822a8e8c9787abe477df578c473e9d08da..84c9f30f8c0c1da5dbd2963ad1ebd0657536887a 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 f80fadc4fe480b1bc370bb8d7d8a4c024d795b04..07919120bafe684cb1d606d0bdd395a71a3a6154 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 7d4f5518f7e6b8a80079da400487fb90b2877857..67d8b9ac7a145da5f967c2567ef79f6f246f9d14 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 cb2f0797aceb5a4893223d94691bfee4cd3bf240..0c9f707d4c3f93b3f45efe87d53d4bd332d80afc 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 094fe5b62515af21c0f9fcb06b48ea23721db9f4..950b8b2ecf35db2790ec87a369c2bfc0bf373933 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 7a70acb1e03b3b402aab5b95efca9b3e632bb071..380b6e4999a21a5d64ad12709ce11782ca7fe9cc 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<Type>::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 f287734adc745094ab02f2d40a240b73b90507dc..a95239a9b67b050106f5793fa130d15cfdbca65c 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<Type>::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 dcd345fc87e2cd117e3ada0ebe227db1e34c3a0a..fad9173a2ed8cad528310973b8a7165a4e20689e 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<Type>::jumpCyclicAMIFvPatchField cyclicAMIFvPatchField<Type>(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 08b110dc81e5885b17837df2379126d16dbdc69e..9cf3b074a535f608e4488442e5c4075aae3246cd 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 400112d67a93d58a95af899645d7e73baad1af22..5ea077b08a0b93604507dd9ffb2117d97301ea4f 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 6d8e34e98b9a1870858836f3027179ea03193af1..fe9e31f64481cb937141e9f7612ef167385c76d4 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 eaf2de2de4909189babd563a949e50f0147acdb4..64926a0bae8ee6819ad520b1a4b3a7a6cbaa7fcc 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<Type>::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 3cde2e1c537c55f09ec167cf12f8e599e318117d..425208697fa206aaece798296aa2bfe5cee0ac01 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 863bd67ffb380a3513e99ed0f36bf24dc7715ebe..b02036e92d5fcad9ea9e9fe6fe055d453110e935 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 921199406e935025fb1adf1282c9790e43a21e4f..107fcf30a5c1c0da2bf9c34b0a8d35ac9e01c687 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<Type>::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 8d62f14c27399d9ec044e099f54c2d39d0d60cb3..4eafe72c8c2761770cfe7a2a2a717f7ccf5da8b7 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<Type>::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 b3efdea5961909f3ef5c00c914d9250719dbb4d8..4c8c5aa199315c8fa7d373674dc4c42cc0533d8d 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<Type>::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 8fdfb7e7fd68a33f36f8c969da21f600207758f9..026a245ccbcab7e3982151c67eed95be1478edcd 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 156ce0376bad456225a22c07f0ed48d1b5f4e48d..bc4504b4a5b1d6d3ebc77d1c1089a05a12e0e8bd 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 045f59e00f6ab119e6f4db4fbee29f26c09b2cc7..7ff807b21a224c5104309a329479015754e4dc84 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 3756b435a75a38ed23b805777d9782c7cc672691..6a9f71ede2bd230c77f4a61c0bc178cf4e1a80a3 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 2b895940b7355ee1e074823fbc2731452bcd09e1..e407d0ec07ec440b2e3dd53991f14490302d7435 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 a81ce92912c03a1dc90f91939d7714e6154ed741..4858f5ba96ed2c3cb5060498b95ea7cb963f4312 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 8491516dab0da72670601cdba7de5f8bc2257f4a..40dc0780ccdd97589fd8c0822d90f94efb0b7928 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/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C index c66b64247559ce6572a50cf12a3c68b34ce96429..f7e7ac5a0b7b0bb83be91bfab5283a2fc9c950a5 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C @@ -537,7 +537,7 @@ void Foam::turbulentDFSEMInletFvPatchVectorField::calcOverlappingProcEddies } - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; forAll(sendMap, proci) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C index deca4b47322b89145567b37dc8a7429478aa8ae6..a10457eea47a3a8e29e42fcd9206fbf64c669c03 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<Type>::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 c0bf9569a7accdd5b8bdc57f58a8778957f5077c..07be85db2736e7501a67ef5403b163c1e5925f68 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<Type>::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 993433fd61e7b568ea4d82558cb054780022d192..5acccdf4d0157189239e230c3b681f3d8f0bc8f2 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 ddb7dfa8b61f798ef575a896f221364269d87b98..63cc9f794c920fe1d4be8b988355cb9142f6575c 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/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C index 54a837d7ebf5309d7ddaea6934da327e2aa4f5fb..2f10400289bc4aacfc5c0910c4de4b4dae6e65aa 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C @@ -174,7 +174,7 @@ void Foam::fvMeshSubset::doCoupledPatches if (syncPar && UPstream::parRun()) { - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; // Send face usage across processor patches if (!nCellsUsingFace.empty()) diff --git a/src/functionObjects/field/DMD/DMDModels/derived/STDMD/STDMD.C b/src/functionObjects/field/DMD/DMDModels/derived/STDMD/STDMD.C index 3678b341e58783c05404f813df88caf41f832d57..5f503d8646f6f87bfc5d58c6e9cdd566e340c818 100644 --- a/src/functionObjects/field/DMD/DMDModels/derived/STDMD/STDMD.C +++ b/src/functionObjects/field/DMD/DMDModels/derived/STDMD/STDMD.C @@ -227,7 +227,7 @@ reducedKoopmanOperator() // the final outcome of TSQR decomposition up to sign // Don't clear storage on persistent buffer - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; pBufs.allowClearRecv(false); const label myProcNo = Pstream::myProcNo(); diff --git a/src/functionObjects/field/externalCoupled/externalCoupled.C b/src/functionObjects/field/externalCoupled/externalCoupled.C index 5b69105194e7fec13d99ec660601baa6aa76a238..2602860e1262a0c427a1e0636aa1d1e1365e31e6 100644 --- a/src/functionObjects/field/externalCoupled/externalCoupled.C +++ b/src/functionObjects/field/externalCoupled/externalCoupled.C @@ -111,7 +111,7 @@ void Foam::functionObjects::externalCoupled::readColumns // Get sizes for all processors const globalIndex globalFaces(globalIndex::gatherOnly{}, nRows); - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; if (UPstream::master()) { @@ -182,7 +182,7 @@ void Foam::functionObjects::externalCoupled::readLines // Get sizes for all processors const globalIndex globalFaces(globalIndex::gatherOnly{}, nRows); - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; if (UPstream::master()) { diff --git a/src/functionObjects/field/mapFields/mapFieldsTemplates.C b/src/functionObjects/field/mapFields/mapFieldsTemplates.C index 749def67a3b09b6b44eff8874fa3fc81e757e46b..2350ef32c0e4ed4ea60b3b81fc77fc568555e281 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/functionObjects/randomProcesses/energySpectrum/energySpectrum.C b/src/functionObjects/randomProcesses/energySpectrum/energySpectrum.C index 0a8a159b28795ce6f27a9b5287b2e516fbc103cb..f36b4d276783382195c4154f732976dbd4b369e8 100644 --- a/src/functionObjects/randomProcesses/energySpectrum/energySpectrum.C +++ b/src/functionObjects/randomProcesses/energySpectrum/energySpectrum.C @@ -215,7 +215,7 @@ bool Foam::functionObjects::energySpectrum::write() if (Pstream::parRun()) { - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; { UOPstream toMaster(Pstream::masterNo(), pBufs); diff --git a/src/functionObjects/utilities/syncObjects/syncObjects.C b/src/functionObjects/utilities/syncObjects/syncObjects.C index cd5b2c2a64207afeae1cffb6bd6e756395b89f86..d0735699ddbec9f13137bdc586022a3f9f8ee944 100644 --- a/src/functionObjects/utilities/syncObjects/syncObjects.C +++ b/src/functionObjects/utilities/syncObjects/syncObjects.C @@ -87,11 +87,7 @@ void Foam::functionObjects::syncObjects::sync() // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Note provision of explicit all-world communicator - PstreamBuffers pBufs - ( - UPstream::commGlobal(), - UPstream::commsTypes::nonBlocking - ); + PstreamBuffers pBufs(UPstream::commGlobal()); for (const int proci : pBufs.allProcs()) diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.H index 8fa5889ebea5f072e05d9ba42cfa0a3a676be607..a65d3d791079041503ed5626a7b7dc445c69bf3e 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 e2475907e113c52c7f39c2bc06f4615ded5a24fe..73f892343927fffc42ef4ce706d0dbb0a20e6113 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<Type>::evaluate(Pstream::commsTypes::blocking); + pointPatchField<Type>::evaluate(Pstream::commsTypes::buffered); } } diff --git a/src/lagrangian/basic/Cloud/Cloud.C b/src/lagrangian/basic/Cloud/Cloud.C index eb15d60699e479a38cfd59d6d636189b95df5d3a..2580c082d01f474500ea10d234b1848a7cdafa7e 100644 --- a/src/lagrangian/basic/Cloud/Cloud.C +++ b/src/lagrangian/basic/Cloud/Cloud.C @@ -182,7 +182,7 @@ void Foam::Cloud<ParticleType>::move // Allocate transfer buffers, // automatic clearStorage when UIPstream closes is disabled. - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; pBufs.allowClearRecv(false); // Cache of opened UOPstream wrappers diff --git a/src/lagrangian/basic/InteractionLists/InteractionLists.H b/src/lagrangian/basic/InteractionLists/InteractionLists.H index b71f222d36eaa01832070df0ac71d430b9e3c7d7..a575b9d5b3cedf9b0b261c48d03c627e39cffdfa 100644 --- a/src/lagrangian/basic/InteractionLists/InteractionLists.H +++ b/src/lagrangian/basic/InteractionLists/InteractionLists.H @@ -39,7 +39,7 @@ Description Simultaneous communication and computation is possible using: \verbatim - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; label startOfRequests = Pstream::nRequests(); il_.sendReferredData(cellOccupancy_, pBufs); // Do other things @@ -231,8 +231,7 @@ public: // Member Functions - //- Prepare and send referred particles and wall data, - // nonBlocking communication + //- Prepare and send referred particles and wall data (nonBlocking) void sendReferredData ( const List<DynamicList<ParticleType*>>& cellOccupancy, diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C index e66c5a73a35a51f724906d665c42fc09153866fc..2dbed1a87b9dabf5f1bec28a23393a7f11f7df5f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C @@ -58,7 +58,7 @@ void Foam::PairCollision<CloudType>::preInteraction() template<class CloudType> void Foam::PairCollision<CloudType>::parcelInteraction() { - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; label startOfRequests = Pstream::nRequests(); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/RecycleInteraction/RecycleInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/RecycleInteraction/RecycleInteraction.C index 18d415733f2356047fb3ee44a8468d436e1ef573..78501a00a22a731c7101135fe8e9c966d37166e6 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/RecycleInteraction/RecycleInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/RecycleInteraction/RecycleInteraction.C @@ -208,7 +208,7 @@ void Foam::RecycleInteraction<CloudType>::postEvolve() // See comments in Cloud::move() about transfer particles handling // Allocate transfer buffers - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; // Cache of opened UOPstream wrappers PtrList<UOPstream> UOPstreamPtrs(Pstream::nProcs()); diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C index 9052b14a65f63e247a1400b46b3b36072bc39b5b..3c8670824a09b26ddcb34f371d4162e00cedb960 100644 --- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C +++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C @@ -131,7 +131,7 @@ void Foam::moleculeCloud::buildCellOccupancy() void Foam::moleculeCloud::calculatePairForce() { - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; // Start sending referred data label startOfRequests = Pstream::nRequests(); @@ -356,7 +356,7 @@ void Foam::moleculeCloud::removeHighEnergyOverlaps() buildCellOccupancy(); - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; // Start sending referred data label startOfRequests = Pstream::nRequests(); diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMIParallelOps.C b/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMIParallelOps.C index 2df540432b28bd4f07bb8719771e253a45497e99..7bfa4688d6bfd6e22721329c5a9ae207b4a2b091 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMIParallelOps.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMIParallelOps.C @@ -78,12 +78,7 @@ void Foam::advancingFrontAMI::distributePatches points.setSize(Pstream::nProcs(comm_)); faceIDs.setSize(Pstream::nProcs(comm_)); - PstreamBuffers pBufs - ( - Pstream::commsTypes::nonBlocking, - UPstream::msgType(), - comm_ - ); + PstreamBuffers pBufs(comm_); for (const int domain : Pstream::allProcs(comm_)) { diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H index 6c618a974768e7604909abab2fae20418b14335a..2dd4ed08e41abfb912666368fd4870c8063e7369 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 f6ffa116bbcfc037a4b520e71a530deeda281105..35816cc5ac6512767ae3c461e30e0c1fcbaf47d4 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/meshTools/polyTopoChange/polyTopoChange.C b/src/meshTools/polyTopoChange/polyTopoChange.C index 88b6e0359ef8d5f45bb59676cc8d9ade1f4d4106..149da72b5fef496f8cbcd22c907b1790fa9b2d65 100644 --- a/src/meshTools/polyTopoChange/polyTopoChange.C +++ b/src/meshTools/polyTopoChange/polyTopoChange.C @@ -2026,7 +2026,7 @@ void Foam::polyTopoChange::reorderCoupledFaces // Rotation on new faces. labelList rotation(faces_.size(), Zero); - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; // Send ordering forAll(patchMap, patchi) diff --git a/src/meshTools/processorLOD/box/box.C b/src/meshTools/processorLOD/box/box.C index dd6deffc320c5871718b0ef6ffd4d7b3603c773e..26faa28e680f82e1fae7f4c72ee9fab1d6950cc0 100644 --- a/src/meshTools/processorLOD/box/box.C +++ b/src/meshTools/processorLOD/box/box.C @@ -102,7 +102,7 @@ void Foam::processorLODs::box::setRefineFlags labelList& nElems ) const { - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; // Identify src boxes that can be refined and send to all remote procs for (const int proci : Pstream::allProcs()) @@ -315,7 +315,7 @@ bool Foam::processorLODs::box::doRefineBoxes List<DynamicList<treeBoundBox>>& fixedBoxes ) { - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; // Send refine info back for list of evolving src boxes forAll(refineFlags, proci) diff --git a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H index 19320666986705ee7c4a5c36fa90ac9945145917..9b8d6cd1e6f07b3ddcf945cc9af51ce9f4990d67 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/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C index b0e999c0f88855ab14d359dfafa3d54b7533974a..f606f5bdd440b046afaa3ea44e462809e7e0db25 100644 --- a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C +++ b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C @@ -1970,7 +1970,7 @@ bool Foam::cellCellStencils::inverseDistance::update() const globalIndex globalCells(mesh_.nCells()); - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; // Mark holes (in allCellTypes) for (label srcI = 0; srcI < meshParts.size()-1; srcI++) diff --git a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C index 5aa941503500251a822e31d28ab51fae31295877..73d421c58f5d03578a4e1f5578b85adf1f65ae44 100644 --- a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C +++ b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C @@ -765,7 +765,7 @@ bool Foam::cellCellStencils::trackingInverseDistance::update() const globalIndex globalCells(mesh_.nCells()); - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; DebugInfo<< FUNCTION_NAME << " : Allocated donor-cell structures" << endl; diff --git a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C index 647b5ce11261e038fa3cdb4a2214c181e883a878..8c32aface9d13a59d0e1510d601f641950f01d5e 100644 --- a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C +++ b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C @@ -4784,7 +4784,7 @@ void Foam::distributedTriSurfaceMesh::distribute // Send all // ~~~~~~~~ - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; forAll(faceSendMap, proci) { diff --git a/src/parallel/reconstruct/faReconstruct/faMeshReconstructor.C b/src/parallel/reconstruct/faReconstruct/faMeshReconstructor.C index 722a63e2ba57c4e4a1acd2e3b0a01da68cb3b9ea..71b7584fb4ea33384785dee018ad3c2c164c12ae 100644 --- a/src/parallel/reconstruct/faReconstruct/faMeshReconstructor.C +++ b/src/parallel/reconstruct/faReconstruct/faMeshReconstructor.C @@ -110,7 +110,7 @@ void Foam::faMeshReconstructor::calcAddressing } } - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; if (Pstream::master()) { diff --git a/src/sampling/meshToMesh/meshToMeshParallelOps.C b/src/sampling/meshToMesh/meshToMeshParallelOps.C index f1a9d756b0cb971180194c2bb58c43c81847f1ec..308409db988152e9b6422a4373fedc5db70f5314 100644 --- a/src/sampling/meshToMesh/meshToMeshParallelOps.C +++ b/src/sampling/meshToMesh/meshToMeshParallelOps.C @@ -274,7 +274,7 @@ void Foam::meshToMesh::distributeCells procLocalFaceIDs.setSize(Pstream::nProcs());; - PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; for (const int domain : Pstream::allProcs()) { diff --git a/src/sampling/surface/isoSurface/isoSurfacePoint.C b/src/sampling/surface/isoSurface/isoSurfacePoint.C index 0de39dbcd674f6716dc2f4db0542467f480d2ccd..020a0465a2b266ffb00dc90a59f97238d7947646 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 239f4be28cef6dd44667535d88d271981644b301..bbe5c4fca6d44087ce291409471006d978314370 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 c7bf081805382aa1d2d4bfbb058ba9593128a114..d2beacf925dd3e57022f22833eaff668b4f03879 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<fixedJumpFvPatchScalarField&>(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 8a55c2152dbd33ea68faff5a80c02c6561a6770b..d222d40dd8a1d30f2cce11ab94dc6a6d49aa17e3 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<fixedJumpAMIFvPatchScalarField&>(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/geometricVoF/advectionSchemes/isoAdvection/isoAdvection.C b/src/transportModels/geometricVoF/advectionSchemes/isoAdvection/isoAdvection.C index 1b54ff2ca1a3eda72675618ba98733a1abd2c2db..a2296c3c6bf3833de1d56e73ddd3f318a9b698c4 100644 --- a/src/transportModels/geometricVoF/advectionSchemes/isoAdvection/isoAdvection.C +++ b/src/transportModels/geometricVoF/advectionSchemes/isoAdvection/isoAdvection.C @@ -497,7 +497,7 @@ Foam::DynamicList<Foam::label> Foam::isoAdvection::syncProcPatches if (Pstream::parRun()) { DynamicList<label> neighProcs; - PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking); + PstreamBuffers pBufs; // Send for (const label patchi : procPatchLabels_) diff --git a/src/transportModels/interfaceProperties/alphaContactAngle/alphaContactAngleTwoPhaseFvPatchScalarField.H b/src/transportModels/interfaceProperties/alphaContactAngle/alphaContactAngleTwoPhaseFvPatchScalarField.H index 12cff614f1a7c0bed4e6577fdeef9a4ff6a7c78c..d9fe5dca2ef9f87d32ca1ed9bb9821d36b225aac 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