mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: communication name "buffered" instead of "blocking"
- "buffered" corresponds to MPI_Bsend (buffered send), whereas the old name "blocking" is misleading since the regular MPI_Send also blocks until completion (ie, buffer can be reused). ENH: IPstream::read() returns std::streamsize instead of label (#3152) - previously returned a 'label' but std::streamsize is consistent with the input parameter and will help with later adjustments. - use <label> instead of <int> for internal accounting of the message size, for consistency with the underyling List<char> buffers used. - improve handling for corner case of IPstream receive with non-blocking, although this combination is not used anywhere
This commit is contained in:
@ -62,7 +62,7 @@ scalar sumReduce
|
|||||||
scalar procValue;
|
scalar procValue;
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
UPstream::commsTypes::blocking,
|
UPstream::commsTypes::buffered,
|
||||||
proci,
|
proci,
|
||||||
reinterpret_cast<char*>(&procValue),
|
reinterpret_cast<char*>(&procValue),
|
||||||
sizeof(scalar),
|
sizeof(scalar),
|
||||||
@ -79,7 +79,7 @@ scalar sumReduce
|
|||||||
{
|
{
|
||||||
UOPstream::write
|
UOPstream::write
|
||||||
(
|
(
|
||||||
UPstream::commsTypes::blocking,
|
UPstream::commsTypes::buffered,
|
||||||
proci,
|
proci,
|
||||||
reinterpret_cast<const char*>(&sum),
|
reinterpret_cast<const char*>(&sum),
|
||||||
sizeof(scalar),
|
sizeof(scalar),
|
||||||
@ -93,7 +93,7 @@ scalar sumReduce
|
|||||||
{
|
{
|
||||||
UOPstream::write
|
UOPstream::write
|
||||||
(
|
(
|
||||||
UPstream::commsTypes::blocking,
|
UPstream::commsTypes::buffered,
|
||||||
UPstream::masterNo(),
|
UPstream::masterNo(),
|
||||||
reinterpret_cast<const char*>(&localValue),
|
reinterpret_cast<const char*>(&localValue),
|
||||||
sizeof(scalar),
|
sizeof(scalar),
|
||||||
@ -105,7 +105,7 @@ scalar sumReduce
|
|||||||
{
|
{
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
UPstream::commsTypes::blocking,
|
UPstream::commsTypes::buffered,
|
||||||
UPstream::masterNo(),
|
UPstream::masterNo(),
|
||||||
reinterpret_cast<char*>(&sum),
|
reinterpret_cast<char*>(&sum),
|
||||||
sizeof(scalar),
|
sizeof(scalar),
|
||||||
|
|||||||
@ -131,7 +131,7 @@ void testTransfer(const T& input)
|
|||||||
for (const int proci : UPstream::subProcs())
|
for (const int proci : UPstream::subProcs())
|
||||||
{
|
{
|
||||||
Perr<< "master sending to proc:" << proci << endl;
|
Perr<< "master sending to proc:" << proci << endl;
|
||||||
OPstream os(UPstream::commsTypes::blocking, proci);
|
OPstream os(UPstream::commsTypes::buffered, proci);
|
||||||
os << data;
|
os << data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -139,7 +139,7 @@ void testTransfer(const T& input)
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
Perr<< "proc sending to master" << endl;
|
Perr<< "proc sending to master" << endl;
|
||||||
OPstream os(UPstream::commsTypes::blocking, UPstream::masterNo());
|
OPstream os(UPstream::commsTypes::buffered, UPstream::masterNo());
|
||||||
os << data;
|
os << data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ void testTokenized(const T& data)
|
|||||||
for (const int proci : UPstream::subProcs())
|
for (const int proci : UPstream::subProcs())
|
||||||
{
|
{
|
||||||
Perr<< "master sending to proc:" << proci << endl;
|
Perr<< "master sending to proc:" << proci << endl;
|
||||||
OPstream os(UPstream::commsTypes::blocking, proci);
|
OPstream os(UPstream::commsTypes::buffered, proci);
|
||||||
os << tok;
|
os << tok;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -177,7 +177,7 @@ void testTokenized(const T& data)
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
Perr<< "proc sending to master" << endl;
|
Perr<< "proc sending to master" << endl;
|
||||||
OPstream os(UPstream::commsTypes::blocking, UPstream::masterNo());
|
OPstream os(UPstream::commsTypes::buffered, UPstream::masterNo());
|
||||||
os << tok;
|
os << tok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ Description
|
|||||||
Format options:
|
Format options:
|
||||||
\table
|
\table
|
||||||
Property | Description | Required | Default
|
Property | Description | Required | Default
|
||||||
commsType | blocking/nonBlocking/scheduled | no | scheduled
|
commsType | scheduled/nonBlocking/buffered | no | scheduled
|
||||||
merge | Enable geometry/field merging | no | true
|
merge | Enable geometry/field merging | no | true
|
||||||
write | Write file(s) | no | false
|
write | Write file(s) | no | false
|
||||||
narrow | Communicate with narrowed values | no | false
|
narrow | Communicate with narrowed values | no | false
|
||||||
|
|||||||
@ -568,10 +568,9 @@ void syncPoints
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// buffered send
|
|
||||||
OPstream toNbr
|
OPstream toNbr
|
||||||
(
|
(
|
||||||
UPstream::commsTypes::blocking,
|
UPstream::commsTypes::buffered,
|
||||||
procPatch.neighbProcNo()
|
procPatch.neighbProcNo()
|
||||||
);
|
);
|
||||||
toNbr << patchInfo;
|
toNbr << patchInfo;
|
||||||
|
|||||||
@ -48,7 +48,7 @@ void evaluateConstraintTypes(GeometricField<Type, fvPatchField, volMesh>& fld)
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
commsType == UPstream::commsTypes::blocking
|
commsType == UPstream::commsTypes::buffered
|
||||||
|| commsType == UPstream::commsTypes::nonBlocking
|
|| commsType == UPstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -132,7 +132,7 @@ OptimisationSwitches
|
|||||||
// MPI/Parallel settings
|
// MPI/Parallel settings
|
||||||
// =====================
|
// =====================
|
||||||
|
|
||||||
// Default communication type (nonBlocking | scheduled | blocking);
|
// Default communication type (nonBlocking | scheduled | buffered)
|
||||||
commsType nonBlocking;
|
commsType nonBlocking;
|
||||||
|
|
||||||
// Transfer double as float for processor boundaries. Mostly defunct.
|
// Transfer double as float for processor boundaries. Mostly defunct.
|
||||||
|
|||||||
@ -115,7 +115,7 @@ void Foam::ParSortableList<Type>::checkAndSend
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
OPstream toProc(UPstream::commsTypes::blocking, destProci);
|
OPstream toProc(UPstream::commsTypes::buffered, destProci);
|
||||||
toProc << values << indices;
|
toProc << values << indices;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -309,7 +309,7 @@ void Foam::ParSortableList<Type>::sort()
|
|||||||
Pout<< "Receiving from " << proci << endl;
|
Pout<< "Receiving from " << proci << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPstream fromProc(UPstream::commsTypes::blocking, proci);
|
IPstream fromProc(UPstream::commsTypes::buffered, proci);
|
||||||
|
|
||||||
fromProc >> recValues >> recIndices;
|
fromProc >> recValues >> recIndices;
|
||||||
|
|
||||||
|
|||||||
@ -101,6 +101,12 @@ Foam::UOPstream::~UOPstream()
|
|||||||
{
|
{
|
||||||
if (sendAtDestruct_)
|
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())
|
if (!bufferIPCsend())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
|
|||||||
@ -32,7 +32,7 @@ Description
|
|||||||
|
|
||||||
Use UOPstream to stream data into buffers, call finishedSends() to
|
Use UOPstream to stream data into buffers, call finishedSends() to
|
||||||
notify that data is in buffers and then use IUPstream to get data out
|
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
|
not make much sense with scheduled since there you would not need these
|
||||||
explicit buffers.
|
explicit buffers.
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ Description
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pBufs.finishedSends(); // no-op for blocking
|
pBufs.finishedSends(); // no-op for buffered
|
||||||
|
|
||||||
for (const int proci : UPstream::allProcs())
|
for (const int proci : UPstream::allProcs())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2013 OpenFOAM Foundation
|
Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2023 OpenCFD Ltd.
|
Copyright (C) 2017-2024 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -96,7 +96,7 @@ protected:
|
|||||||
const int comm_;
|
const int comm_;
|
||||||
|
|
||||||
//- The message size, read on bufferIPCrecv or set directly
|
//- The message size, read on bufferIPCrecv or set directly
|
||||||
int messageSize_;
|
label messageSize_;
|
||||||
|
|
||||||
//- Receive position in buffer data, if ony
|
//- Receive position in buffer data, if ony
|
||||||
//- If there is no external location for recvBufPos_
|
//- If there is no external location for recvBufPos_
|
||||||
@ -279,8 +279,8 @@ public:
|
|||||||
// Static Functions
|
// Static Functions
|
||||||
|
|
||||||
//- Read buffer contents from given processor.
|
//- Read buffer contents from given processor.
|
||||||
// \return the message size (bytes read)
|
// \return the message size (bytes read). May change in the future
|
||||||
static label read
|
static std::streamsize read
|
||||||
(
|
(
|
||||||
const UPstream::commsTypes commsType,
|
const UPstream::commsTypes commsType,
|
||||||
const int fromProcNo,
|
const int fromProcNo,
|
||||||
@ -293,8 +293,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Read buffer contents (non-blocking) from given processor.
|
//- Read buffer contents (non-blocking) from given processor.
|
||||||
// \return the message size (bytes read)
|
// \return the message size (bytes read). May change in the future
|
||||||
inline static label read
|
inline static std::streamsize read
|
||||||
(
|
(
|
||||||
//! [out] request information
|
//! [out] request information
|
||||||
UPstream::Request& req,
|
UPstream::Request& req,
|
||||||
@ -321,7 +321,7 @@ public:
|
|||||||
// Only valid for contiguous data types.
|
// Only valid for contiguous data types.
|
||||||
// \return the message size (bytes read). May change in the future
|
// \return the message size (bytes read). May change in the future
|
||||||
template<class Type>
|
template<class Type>
|
||||||
inline static label read
|
inline static std::streamsize read
|
||||||
(
|
(
|
||||||
const UPstream::commsTypes commsType,
|
const UPstream::commsTypes commsType,
|
||||||
const int fromProcNo,
|
const int fromProcNo,
|
||||||
@ -348,7 +348,7 @@ public:
|
|||||||
// Only valid for contiguous data types.
|
// Only valid for contiguous data types.
|
||||||
// \return the message size (bytes read). May change in the future
|
// \return the message size (bytes read). May change in the future
|
||||||
template<class Type>
|
template<class Type>
|
||||||
inline static label read
|
inline static std::streamsize read
|
||||||
(
|
(
|
||||||
const UPstream::commsTypes commsType,
|
const UPstream::commsTypes commsType,
|
||||||
const int fromProcNo,
|
const int fromProcNo,
|
||||||
@ -375,7 +375,7 @@ public:
|
|||||||
// Only valid for contiguous data types.
|
// Only valid for contiguous data types.
|
||||||
// \return the message size (bytes read). May change in the future
|
// \return the message size (bytes read). May change in the future
|
||||||
template<class Type>
|
template<class Type>
|
||||||
inline static label read
|
inline static std::streamsize read
|
||||||
(
|
(
|
||||||
//! [out] request information
|
//! [out] request information
|
||||||
UPstream::Request& req,
|
UPstream::Request& req,
|
||||||
@ -401,7 +401,7 @@ public:
|
|||||||
// Only valid for contiguous data types.
|
// Only valid for contiguous data types.
|
||||||
// \return the message size (bytes read). May change in the future
|
// \return the message size (bytes read). May change in the future
|
||||||
template<class Type>
|
template<class Type>
|
||||||
inline static label read
|
inline static std::streamsize read
|
||||||
(
|
(
|
||||||
//! [out] request information
|
//! [out] request information
|
||||||
UPstream::Request& req,
|
UPstream::Request& req,
|
||||||
@ -474,8 +474,8 @@ public:
|
|||||||
// Static Functions
|
// Static Functions
|
||||||
|
|
||||||
//- Wrapped version of UPstream::broadcast
|
//- Wrapped version of UPstream::broadcast
|
||||||
// \return the message size (bytes read)
|
// \return the message size (bytes read). May change in the future
|
||||||
static label read
|
static std::streamsize read
|
||||||
(
|
(
|
||||||
const int rootProcNo, //!< normally UPstream::masterNo()
|
const int rootProcNo, //!< normally UPstream::masterNo()
|
||||||
char* buf,
|
char* buf,
|
||||||
|
|||||||
@ -50,9 +50,11 @@ const Foam::Enum
|
|||||||
>
|
>
|
||||||
Foam::UPstream::commsTypeNames
|
Foam::UPstream::commsTypeNames
|
||||||
({
|
({
|
||||||
{ commsTypes::blocking, "blocking" }, // "buffered"
|
{ commsTypes::buffered, "buffered" }, // "buffered"
|
||||||
{ commsTypes::scheduled, "scheduled" },
|
{ commsTypes::scheduled, "scheduled" },
|
||||||
{ commsTypes::nonBlocking, "nonBlocking" }, // "immediate"
|
{ commsTypes::nonBlocking, "nonBlocking" }, // "immediate"
|
||||||
|
// compatibility names
|
||||||
|
{ commsTypes::buffered, "blocking" },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -73,15 +73,17 @@ public:
|
|||||||
//- Communications types
|
//- Communications types
|
||||||
enum class commsTypes : char
|
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)
|
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
|
//- Enumerated names for the communication types
|
||||||
static const Enum<commsTypes> commsTypeNames;
|
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
|
enum class sendModes : char
|
||||||
{
|
{
|
||||||
normal, //!< (MPI_Send, MPI_Isend)
|
normal, //!< (MPI_Send, MPI_Isend)
|
||||||
|
|||||||
@ -598,7 +598,7 @@ void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::evaluate()
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
commsType == UPstream::commsTypes::blocking
|
commsType == UPstream::commsTypes::buffered
|
||||||
|| commsType == UPstream::commsTypes::nonBlocking
|
|| commsType == UPstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -689,7 +689,7 @@ void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::evaluateLocal()
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
commsType == UPstream::commsTypes::blocking
|
commsType == UPstream::commsTypes::buffered
|
||||||
|| commsType == UPstream::commsTypes::nonBlocking
|
|| commsType == UPstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -755,7 +755,7 @@ Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
commsType == UPstream::commsTypes::blocking
|
commsType == UPstream::commsTypes::buffered
|
||||||
|| commsType == UPstream::commsTypes::nonBlocking
|
|| commsType == UPstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -111,7 +111,7 @@ public:
|
|||||||
//- Update the patch field
|
//- Update the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType = Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType = Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -119,7 +119,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
) = 0;
|
) = 0;
|
||||||
|
|
||||||
//- Initialise swap of patch point values
|
//- Initialise swap of patch point values
|
||||||
|
|||||||
@ -202,7 +202,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -152,7 +152,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -115,7 +115,7 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -115,7 +115,7 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -154,7 +154,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -153,7 +153,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -126,7 +126,7 @@ public:
|
|||||||
//- Update the patch field
|
//- Update the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -121,7 +121,7 @@ public:
|
|||||||
//- Update the patch field
|
//- Update the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -192,7 +192,7 @@ Foam::codedFixedValuePointPatchField<Type>::codedFixedValuePointPatchField
|
|||||||
this->extrapolateInternal();
|
this->extrapolateInternal();
|
||||||
|
|
||||||
// Evaluate to assign a value
|
// Evaluate to assign a value
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
this->evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -243,7 +243,7 @@ public:
|
|||||||
//- Evaluate the patch field, sets updated() to false
|
//- Evaluate the patch field, sets updated() to false
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
|
|||||||
@ -132,7 +132,7 @@ public:
|
|||||||
//- Update the patch field
|
//- Update the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
|
|||||||
@ -562,14 +562,14 @@ public:
|
|||||||
//- Initialise evaluation of the patch field (do nothing)
|
//- Initialise evaluation of the patch field (do nothing)
|
||||||
virtual void initEvaluate
|
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
|
//- Evaluate the patch field, sets updated() to false
|
||||||
virtual void evaluate
|
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
|
//- Initialise the evaluation of the patch field after a local
|
||||||
@ -577,7 +577,7 @@ public:
|
|||||||
virtual void initEvaluateLocal
|
virtual void initEvaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -585,7 +585,7 @@ public:
|
|||||||
virtual void evaluateLocal
|
virtual void evaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ void Foam::LduMatrix<Type, DType, LUType>::initMatrixInterfaces
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
commsType == UPstream::commsTypes::blocking
|
commsType == UPstream::commsTypes::buffered
|
||||||
|| commsType == UPstream::commsTypes::nonBlocking
|
|| commsType == UPstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -88,7 +88,7 @@ void Foam::LduMatrix<Type, DType, LUType>::initMatrixInterfaces
|
|||||||
interfacei,
|
interfacei,
|
||||||
psiif,
|
psiif,
|
||||||
interfaceCoeffs[interfacei],
|
interfaceCoeffs[interfacei],
|
||||||
UPstream::commsTypes::blocking
|
UPstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -172,7 +172,7 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
commsType == UPstream::commsTypes::blocking
|
commsType == UPstream::commsTypes::buffered
|
||||||
|| commsType == UPstream::commsTypes::nonBlocking
|
|| commsType == UPstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -184,7 +184,7 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check/no-check for updatedMatrix() ?
|
// Check/no-check for updatedMatrix() ?
|
||||||
const bool noCheck = (commsType == UPstream::commsTypes::blocking);
|
const bool noCheck = (commsType == UPstream::commsTypes::buffered);
|
||||||
|
|
||||||
forAll(interfaces_, interfacei)
|
forAll(interfaces_, interfacei)
|
||||||
{
|
{
|
||||||
@ -264,7 +264,7 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces
|
|||||||
interfacei,
|
interfacei,
|
||||||
psiif,
|
psiif,
|
||||||
interfaceCoeffs[interfacei],
|
interfaceCoeffs[interfacei],
|
||||||
UPstream::commsTypes::blocking
|
UPstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,7 +43,7 @@ void Foam::processorLduInterface::send
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
commsType == UPstream::commsTypes::blocking
|
commsType == UPstream::commsTypes::buffered
|
||||||
|| commsType == UPstream::commsTypes::scheduled
|
|| commsType == UPstream::commsTypes::scheduled
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -113,7 +113,7 @@ void Foam::processorLduInterface::receive
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
commsType == UPstream::commsTypes::blocking
|
commsType == UPstream::commsTypes::buffered
|
||||||
|| commsType == UPstream::commsTypes::scheduled
|
|| commsType == UPstream::commsTypes::scheduled
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -194,7 +194,7 @@ void Foam::processorLduInterface::compressedSend
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
commsType == UPstream::commsTypes::blocking
|
commsType == UPstream::commsTypes::buffered
|
||||||
|| commsType == UPstream::commsTypes::scheduled
|
|| commsType == UPstream::commsTypes::scheduled
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -272,7 +272,7 @@ void Foam::processorLduInterface::compressedReceive
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
commsType == UPstream::commsTypes::blocking
|
commsType == UPstream::commsTypes::buffered
|
||||||
|| commsType == UPstream::commsTypes::scheduled
|
|| commsType == UPstream::commsTypes::scheduled
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -44,7 +44,7 @@ void Foam::lduMatrix::initMatrixInterfaces
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
commsType == UPstream::commsTypes::blocking
|
commsType == UPstream::commsTypes::buffered
|
||||||
|| commsType == UPstream::commsTypes::nonBlocking
|
|| commsType == UPstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -90,7 +90,7 @@ void Foam::lduMatrix::initMatrixInterfaces
|
|||||||
psiif,
|
psiif,
|
||||||
coupleCoeffs[interfacei],
|
coupleCoeffs[interfacei],
|
||||||
cmpt,
|
cmpt,
|
||||||
UPstream::commsTypes::blocking
|
UPstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -229,7 +229,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
commsType == UPstream::commsTypes::blocking
|
commsType == UPstream::commsTypes::buffered
|
||||||
|| commsType == UPstream::commsTypes::nonBlocking
|
|| commsType == UPstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -241,7 +241,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check/no-check for updatedMatrix() ?
|
// Check/no-check for updatedMatrix() ?
|
||||||
const bool noCheck = (commsType == UPstream::commsTypes::blocking);
|
const bool noCheck = (commsType == UPstream::commsTypes::buffered);
|
||||||
|
|
||||||
// Consume anything still outstanding
|
// Consume anything still outstanding
|
||||||
forAll(interfaces, interfacei)
|
forAll(interfaces, interfacei)
|
||||||
@ -326,7 +326,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
|
|||||||
psiif,
|
psiif,
|
||||||
coupleCoeffs[interfacei],
|
coupleCoeffs[interfacei],
|
||||||
cmpt,
|
cmpt,
|
||||||
UPstream::commsTypes::blocking
|
UPstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -111,7 +111,7 @@ void Foam::pointBoundaryMesh::calcGeometry()
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
pBufs.commsType() == Pstream::commsTypes::blocking
|
pBufs.commsType() == Pstream::commsTypes::buffered
|
||||||
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -157,7 +157,7 @@ void Foam::pointBoundaryMesh::movePoints(const pointField& p)
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
pBufs.commsType() == Pstream::commsTypes::blocking
|
pBufs.commsType() == Pstream::commsTypes::buffered
|
||||||
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -203,7 +203,7 @@ void Foam::pointBoundaryMesh::updateMesh()
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
pBufs.commsType() == Pstream::commsTypes::blocking
|
pBufs.commsType() == Pstream::commsTypes::buffered
|
||||||
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -494,7 +494,7 @@ void Foam::mapDistributeBase::distribute
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commsType == UPstream::commsTypes::blocking)
|
if (commsType == UPstream::commsTypes::buffered)
|
||||||
{
|
{
|
||||||
// Since buffered sending can reuse the field to collect the
|
// Since buffered sending can reuse the field to collect the
|
||||||
// received data.
|
// received data.
|
||||||
@ -939,7 +939,7 @@ void Foam::mapDistributeBase::distribute
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commsType == UPstream::commsTypes::blocking)
|
if (commsType == UPstream::commsTypes::buffered)
|
||||||
{
|
{
|
||||||
// Since buffered sending can reuse the field to collect the
|
// Since buffered sending can reuse the field to collect the
|
||||||
// received data.
|
// received data.
|
||||||
|
|||||||
@ -304,7 +304,7 @@ void Foam::polyBoundaryMesh::calcGeometry()
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
pBufs.commsType() == Pstream::commsTypes::blocking
|
pBufs.commsType() == Pstream::commsTypes::buffered
|
||||||
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -1297,7 +1297,7 @@ void Foam::polyBoundaryMesh::movePoints(const pointField& p)
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
pBufs.commsType() == Pstream::commsTypes::blocking
|
pBufs.commsType() == Pstream::commsTypes::buffered
|
||||||
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -1347,7 +1347,7 @@ void Foam::polyBoundaryMesh::updateMesh()
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
pBufs.commsType() == Pstream::commsTypes::blocking
|
pBufs.commsType() == Pstream::commsTypes::buffered
|
||||||
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2022-2023 OpenCFD Ltd.
|
Copyright (C) 2022-2024 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -37,7 +37,7 @@ void Foam::UIPBstream::bufferIPCrecv()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::label Foam::UIPBstream::read
|
std::streamsize Foam::UIPBstream::read
|
||||||
(
|
(
|
||||||
const int rootProcNo,
|
const int rootProcNo,
|
||||||
char* buf,
|
char* buf,
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2021-2023 OpenCFD Ltd.
|
Copyright (C) 2021-2024 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -38,7 +38,7 @@ void Foam::UIPstream::bufferIPCrecv()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::label Foam::UIPstream::read
|
std::streamsize Foam::UIPstream::read
|
||||||
(
|
(
|
||||||
const UPstream::commsTypes commsType,
|
const UPstream::commsTypes commsType,
|
||||||
const int fromProcNo,
|
const int fromProcNo,
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2022-2023 OpenCFD Ltd.
|
Copyright (C) 2022-2024 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -39,7 +39,7 @@ void Foam::UIPBstream::bufferIPCrecv()
|
|||||||
|
|
||||||
// Expected message size, similar to MPI_Probe
|
// Expected message size, similar to MPI_Probe
|
||||||
// Same type must be expected in UOPBstream::bufferIPCsend()
|
// Same type must be expected in UOPBstream::bufferIPCsend()
|
||||||
label bufSize(0);
|
std::streamsize bufSize(0);
|
||||||
|
|
||||||
// Broadcast #1 - data size
|
// Broadcast #1 - data size
|
||||||
if
|
if
|
||||||
@ -47,7 +47,7 @@ void Foam::UIPBstream::bufferIPCrecv()
|
|||||||
!UPstream::broadcast
|
!UPstream::broadcast
|
||||||
(
|
(
|
||||||
reinterpret_cast<char*>(&bufSize),
|
reinterpret_cast<char*>(&bufSize),
|
||||||
sizeof(label),
|
sizeof(std::streamsize),
|
||||||
comm_,
|
comm_,
|
||||||
fromProcNo_ //< is actually rootProcNo
|
fromProcNo_ //< is actually rootProcNo
|
||||||
)
|
)
|
||||||
@ -63,46 +63,45 @@ void Foam::UIPBstream::bufferIPCrecv()
|
|||||||
Pout<< "UOPBstream IPC read buffer :"
|
Pout<< "UOPBstream IPC read buffer :"
|
||||||
<< " root:" << fromProcNo_
|
<< " root:" << fromProcNo_
|
||||||
<< " comm:" << comm_
|
<< " comm:" << comm_
|
||||||
<< " probed size:" << bufSize
|
<< " probed size:" << label(bufSize)
|
||||||
<< " wanted size:" << recvBuf_.capacity()
|
<< " wanted size:" << recvBuf_.capacity()
|
||||||
<< Foam::endl;
|
<< 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
|
// This is the only real information we can trust
|
||||||
messageSize_ = bufSize;
|
messageSize_ = label(bufSize);
|
||||||
|
|
||||||
|
|
||||||
// Broadcast #2 - data content
|
// Broadcast #2 - data content
|
||||||
// - skip if there is no data to receive
|
// - skip if there is no data to receive
|
||||||
|
|
||||||
if (messageSize_)
|
|
||||||
{
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!UPstream::broadcast
|
(bufSize > 0)
|
||||||
|
&& !UPstream::broadcast
|
||||||
(
|
(
|
||||||
recvBuf_.data(),
|
recvBuf_.data(),
|
||||||
messageSize_, // same as bufSize
|
recvBuf_.size(), // same as bufSize
|
||||||
comm_,
|
comm_,
|
||||||
fromProcNo_ //< is actually rootProcNo
|
fromProcNo_ //< is actually rootProcNo
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "MPI_Bcast failure receiving buffer data:" << bufSize << nl
|
<< "MPI_Bcast failure receiving buffer data:"
|
||||||
|
<< recvBuf_.size() << nl
|
||||||
<< Foam::abort(FatalError);
|
<< Foam::abort(FatalError);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Set addressed size. Leave actual allocated memory intact.
|
if (recvBuf_.empty())
|
||||||
recvBuf_.resize(messageSize_);
|
|
||||||
|
|
||||||
if (!messageSize_)
|
|
||||||
{
|
{
|
||||||
setEof();
|
setEof();
|
||||||
}
|
}
|
||||||
@ -111,7 +110,7 @@ void Foam::UIPBstream::bufferIPCrecv()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::label Foam::UIPBstream::read
|
std::streamsize Foam::UIPBstream::read
|
||||||
(
|
(
|
||||||
const int rootProcNo,
|
const int rootProcNo,
|
||||||
char* buf,
|
char* buf,
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2023 OpenCFD Ltd.
|
Copyright (C) 2019-2024 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -37,9 +37,8 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// General blocking/non-blocking MPI receive, optionally with probed
|
// General blocking/non-blocking MPI receive
|
||||||
// message information.
|
static std::streamsize UPstream_mpi_receive
|
||||||
static Foam::label UPstream_mpi_receive
|
|
||||||
(
|
(
|
||||||
const Foam::UPstream::commsTypes commsType,
|
const Foam::UPstream::commsTypes commsType,
|
||||||
char* buf,
|
char* buf,
|
||||||
@ -54,34 +53,48 @@ static Foam::label UPstream_mpi_receive
|
|||||||
|
|
||||||
PstreamGlobals::reset_request(req);
|
PstreamGlobals::reset_request(req);
|
||||||
|
|
||||||
if (UPstream::debug)
|
// TODO: some corrective action, at least when not nonBlocking
|
||||||
|
#if 0
|
||||||
|
// No warnings here, just on the sender side.
|
||||||
|
if (bufSize > std::streamsize(INT_MAX))
|
||||||
{
|
{
|
||||||
Pout<< "UIPstream::read : starting read from:" << fromProcNo
|
Perr<< "UIPstream::read() : from rank " << fromProcNo
|
||||||
<< " tag:" << tag << " comm:" << communicator
|
<< " exceeds INT_MAX bytes" << Foam::endl;
|
||||||
<< " wanted size:" << label(bufSize)
|
error::printStack(Perr);
|
||||||
<< " commsType:" << UPstream::commsTypeNames[commsType]
|
|
||||||
<< Foam::endl;
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (UPstream::warnComm >= 0 && communicator != UPstream::warnComm)
|
if (UPstream::warnComm >= 0 && communicator != UPstream::warnComm)
|
||||||
{
|
{
|
||||||
Pout<< "UIPstream::read : starting read from:" << fromProcNo
|
Pout<< "UIPstream::read : starting read from:" << fromProcNo
|
||||||
|
<< " size:" << label(bufSize)
|
||||||
<< " tag:" << tag << " comm:" << communicator
|
<< " tag:" << tag << " comm:" << communicator
|
||||||
<< " wanted size:" << label(bufSize)
|
|
||||||
<< " commsType:" << UPstream::commsTypeNames[commsType]
|
<< " commsType:" << UPstream::commsTypeNames[commsType]
|
||||||
<< " warnComm:" << UPstream::warnComm
|
<< " warnComm:" << UPstream::warnComm
|
||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Pout);
|
||||||
}
|
}
|
||||||
|
else if (UPstream::debug)
|
||||||
|
{
|
||||||
|
Pout<< "UIPstream::read : starting read from:" << fromProcNo
|
||||||
|
<< " size:" << label(bufSize)
|
||||||
|
<< " tag:" << tag << " comm:" << communicator
|
||||||
|
<< " commsType:" << UPstream::commsTypeNames[commsType]
|
||||||
|
<< Foam::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
int returnCode = MPI_ERR_UNKNOWN;
|
||||||
|
|
||||||
profilingPstream::beginTiming();
|
profilingPstream::beginTiming();
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
commsType == UPstream::commsTypes::blocking
|
commsType == UPstream::commsTypes::buffered
|
||||||
|| commsType == UPstream::commsTypes::scheduled
|
|| commsType == UPstream::commsTypes::scheduled
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int returnCode = 0;
|
// Not UPstream::commsTypes::nonBlocking
|
||||||
|
|
||||||
MPI_Status status;
|
MPI_Status status;
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -97,6 +110,8 @@ static Foam::label UPstream_mpi_receive
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
profilingPstream::addGatherTime();
|
||||||
|
|
||||||
if (returnCode != MPI_SUCCESS)
|
if (returnCode != MPI_SUCCESS)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
@ -104,36 +119,31 @@ static Foam::label UPstream_mpi_receive
|
|||||||
<< Foam::abort(FatalError);
|
<< Foam::abort(FatalError);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
else if (UPstream::debug)
|
||||||
profilingPstream::addGatherTime();
|
|
||||||
|
|
||||||
// Check size of message read
|
|
||||||
|
|
||||||
int messageSize;
|
|
||||||
MPI_Get_count(&status, MPI_BYTE, &messageSize);
|
|
||||||
|
|
||||||
if (UPstream::debug)
|
|
||||||
{
|
{
|
||||||
Pout<< "UIPstream::read : finished read from:" << fromProcNo
|
Pout<< "UIPstream::read : finished recv from:"
|
||||||
<< " tag:" << tag << " read size:" << label(bufSize)
|
<< fromProcNo
|
||||||
<< " commsType:" << UPstream::commsTypeNames[commsType]
|
<< " size:" << label(bufSize) << " tag:" << tag
|
||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (messageSize > bufSize)
|
// Check size of message read
|
||||||
|
int count(0);
|
||||||
|
MPI_Get_count(&status, MPI_BYTE, &count);
|
||||||
|
|
||||||
|
if (bufSize < std::streamsize(count))
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "buffer (" << label(bufSize)
|
<< "buffer (" << label(bufSize)
|
||||||
<< ") not large enough for incoming message ("
|
<< ") not large enough for incoming message ("
|
||||||
<< messageSize << ')'
|
<< label(count) << ')'
|
||||||
<< Foam::abort(FatalError);
|
<< Foam::abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return messageSize;
|
return std::streamsize(count);
|
||||||
}
|
}
|
||||||
else if (commsType == UPstream::commsTypes::nonBlocking)
|
else if (commsType == UPstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
int returnCode = 0;
|
|
||||||
MPI_Request request;
|
MPI_Request request;
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -158,19 +168,20 @@ static Foam::label UPstream_mpi_receive
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PstreamGlobals::push_request(request, req);
|
||||||
|
profilingPstream::addRequestTime();
|
||||||
|
|
||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UIPstream::read : started read from:" << fromProcNo
|
Pout<< "UIPstream::read : started non-blocking recv from:"
|
||||||
<< " tag:" << tag << " read size:" << label(bufSize)
|
<< fromProcNo
|
||||||
<< " commsType:" << UPstream::commsTypeNames[commsType]
|
<< " size:" << label(bufSize) << " tag:" << tag
|
||||||
<< " request:" <<
|
<< " request:" <<
|
||||||
(req ? label(-1) : PstreamGlobals::outstandingRequests_.size())
|
(req ? label(-1) : PstreamGlobals::outstandingRequests_.size())
|
||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
PstreamGlobals::push_request(request, req);
|
|
||||||
profilingPstream::addRequestTime();
|
|
||||||
|
|
||||||
// Assume the message will be completely received.
|
// Assume the message will be completely received.
|
||||||
return bufSize;
|
return bufSize;
|
||||||
}
|
}
|
||||||
@ -197,9 +208,24 @@ void Foam::UIPstream::bufferIPCrecv()
|
|||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// No buffer size allocated/specified - probe size of incoming message
|
// Fallback value
|
||||||
if (!recvBuf_.capacity())
|
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();
|
profilingPstream::beginTiming();
|
||||||
|
|
||||||
MPI_Status status;
|
MPI_Status status;
|
||||||
@ -212,24 +238,26 @@ void Foam::UIPstream::bufferIPCrecv()
|
|||||||
&status
|
&status
|
||||||
);
|
);
|
||||||
|
|
||||||
MPI_Get_count(&status, MPI_BYTE, &messageSize_);
|
|
||||||
|
|
||||||
profilingPstream::addProbeTime();
|
profilingPstream::addProbeTime();
|
||||||
|
|
||||||
recvBuf_.resize(messageSize_);
|
int count(0);
|
||||||
|
MPI_Get_count(&status, MPI_BYTE, &count);
|
||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UIPstream::UIPstream : probed size:"
|
Pout<< "UIPstream::UIPstream : probed size:"
|
||||||
<< messageSize_ << Foam::endl;
|
<< label(count) << Foam::endl;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
messageSize_ = UPstream_mpi_receive
|
recvBuf_.resize(label(count));
|
||||||
|
messageSize_ = label(count);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::streamsize count = UPstream_mpi_receive
|
||||||
(
|
(
|
||||||
commsType(),
|
commsType(),
|
||||||
recvBuf_.data(),
|
recvBuf_.data(),
|
||||||
recvBuf_.capacity(),
|
messageSize_, // The expected size
|
||||||
fromProcNo_,
|
fromProcNo_,
|
||||||
tag_,
|
tag_,
|
||||||
comm_,
|
comm_,
|
||||||
@ -237,9 +265,10 @@ void Foam::UIPstream::bufferIPCrecv()
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Set addressed size. Leave actual allocated memory intact.
|
// Set addressed size. Leave actual allocated memory intact.
|
||||||
recvBuf_.resize(messageSize_);
|
recvBuf_.resize(label(count));
|
||||||
|
messageSize_ = label(count);
|
||||||
|
|
||||||
if (!messageSize_)
|
if (recvBuf_.empty())
|
||||||
{
|
{
|
||||||
setEof();
|
setEof();
|
||||||
}
|
}
|
||||||
@ -248,7 +277,7 @@ void Foam::UIPstream::bufferIPCrecv()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::label Foam::UIPstream::read
|
std::streamsize Foam::UIPstream::read
|
||||||
(
|
(
|
||||||
const UPstream::commsTypes commsType,
|
const UPstream::commsTypes commsType,
|
||||||
const int fromProcNo,
|
const int fromProcNo,
|
||||||
|
|||||||
@ -40,7 +40,17 @@ bool Foam::UOPBstream::bufferIPCsend()
|
|||||||
PstreamGlobals::checkCommunicator(comm_, toProcNo_);
|
PstreamGlobals::checkCommunicator(comm_, toProcNo_);
|
||||||
|
|
||||||
// Same type must be expected in UIPBstream::bufferIPCrecv()
|
// 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
|
// Broadcast #1 - data size
|
||||||
if
|
if
|
||||||
@ -48,7 +58,7 @@ bool Foam::UOPBstream::bufferIPCsend()
|
|||||||
!UPstream::broadcast
|
!UPstream::broadcast
|
||||||
(
|
(
|
||||||
reinterpret_cast<char*>(&bufSize),
|
reinterpret_cast<char*>(&bufSize),
|
||||||
sizeof(label),
|
sizeof(std::streamsize),
|
||||||
comm_,
|
comm_,
|
||||||
toProcNo_ //< is actually rootProcNo
|
toProcNo_ //< is actually rootProcNo
|
||||||
)
|
)
|
||||||
@ -60,13 +70,13 @@ bool Foam::UOPBstream::bufferIPCsend()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Broadcast #2 - data content
|
// Broadcast #2 - data content
|
||||||
// - skip if there is no data to send
|
// - skip if there is no data to send
|
||||||
if (bufSize)
|
|
||||||
{
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!UPstream::broadcast
|
(bufSize > 0)
|
||||||
|
&& !UPstream::broadcast
|
||||||
(
|
(
|
||||||
sendBuf_.data(),
|
sendBuf_.data(),
|
||||||
sendBuf_.size(), // same as bufSize
|
sendBuf_.size(), // same as bufSize
|
||||||
@ -76,11 +86,11 @@ bool Foam::UOPBstream::bufferIPCsend()
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "MPI_Bcast failure sending buffer data:" << bufSize << nl
|
<< "MPI_Bcast failure sending buffer data:"
|
||||||
|
<< sendBuf_.size() << nl
|
||||||
<< Foam::abort(FatalError);
|
<< Foam::abort(FatalError);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,24 +62,34 @@ bool Foam::UOPstream::write
|
|||||||
{
|
{
|
||||||
PstreamGlobals::reset_request(req);
|
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
|
Perr<< "UOPstream::write() : to rank " << toProcNo
|
||||||
<< " tag:" << tag
|
<< " exceeds INT_MAX bytes" << Foam::endl;
|
||||||
<< " comm:" << communicator << " size:" << label(bufSize)
|
error::printStack(Perr);
|
||||||
<< " commType:" << UPstream::commsTypeNames[commsType]
|
|
||||||
<< Foam::endl;
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (UPstream::warnComm >= 0 && communicator != UPstream::warnComm)
|
if (UPstream::warnComm >= 0 && communicator != UPstream::warnComm)
|
||||||
{
|
{
|
||||||
Pout<< "UOPstream::write : starting write to:" << toProcNo
|
Pout<< "UOPstream::write : starting write to:" << toProcNo
|
||||||
<< " tag:" << tag
|
<< " size:" << label(bufSize)
|
||||||
<< " comm:" << communicator << " size:" << label(bufSize)
|
<< " tag:" << tag << " comm:" << communicator
|
||||||
<< " commType:" << UPstream::commsTypeNames[commsType]
|
<< " commType:" << UPstream::commsTypeNames[commsType]
|
||||||
<< " warnComm:" << UPstream::warnComm
|
<< " warnComm:" << UPstream::warnComm
|
||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
error::printStack(Pout);
|
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);
|
PstreamGlobals::checkCommunicator(communicator, toProcNo);
|
||||||
|
|
||||||
@ -87,7 +97,7 @@ bool Foam::UOPstream::write
|
|||||||
|
|
||||||
profilingPstream::beginTiming();
|
profilingPstream::beginTiming();
|
||||||
|
|
||||||
if (commsType == UPstream::commsTypes::blocking)
|
if (commsType == UPstream::commsTypes::buffered)
|
||||||
{
|
{
|
||||||
returnCode = MPI_Bsend
|
returnCode = MPI_Bsend
|
||||||
(
|
(
|
||||||
@ -104,9 +114,9 @@ bool Foam::UOPstream::write
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UOPstream::write : finished write to:" << toProcNo
|
Pout<< "UOPstream::write : finished buffered send to:"
|
||||||
<< " tag:" << tag << " size:" << label(bufSize)
|
<< toProcNo
|
||||||
<< " commsType:" << UPstream::commsTypeNames[commsType]
|
<< " size:" << label(bufSize) << " tag:" << tag
|
||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -142,9 +152,9 @@ bool Foam::UOPstream::write
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UOPstream::write : finished write to:" << toProcNo
|
Pout<< "UOPstream::write : finished send to:"
|
||||||
<< " tag:" << tag << " size:" << label(bufSize)
|
<< toProcNo
|
||||||
<< " commsType:" << UPstream::commsTypeNames[commsType]
|
<< " size:" << label(bufSize) << " tag:" << tag
|
||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -181,9 +191,9 @@ bool Foam::UOPstream::write
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UOPstream::write : started write to:" << toProcNo
|
Pout<< "UOPstream::write : started non-blocking send to:"
|
||||||
<< " tag:" << tag << " size:" << label(bufSize)
|
<< toProcNo
|
||||||
<< " commType:" << UPstream::commsTypeNames[commsType]
|
<< " size:" << label(bufSize) << " tag:" << tag
|
||||||
<< " request:" <<
|
<< " request:" <<
|
||||||
(req ? label(-1) : PstreamGlobals::outstandingRequests_.size())
|
(req ? label(-1) : PstreamGlobals::outstandingRequests_.size())
|
||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
|
|||||||
@ -787,7 +787,7 @@ Foam::UPstream::probeMessage
|
|||||||
int flag = 0;
|
int flag = 0;
|
||||||
MPI_Status status;
|
MPI_Status status;
|
||||||
|
|
||||||
if (UPstream::commsTypes::blocking == commsType)
|
if (UPstream::commsTypes::buffered == commsType)
|
||||||
{
|
{
|
||||||
// Blocking
|
// Blocking
|
||||||
profilingPstream::beginTiming();
|
profilingPstream::beginTiming();
|
||||||
|
|||||||
@ -47,13 +47,6 @@ bool Foam::UPstream::broadcast
|
|||||||
|
|
||||||
//Needed? PstreamGlobals::checkCommunicator(comm, rootProcNo);
|
//Needed? PstreamGlobals::checkCommunicator(comm, rootProcNo);
|
||||||
|
|
||||||
if (UPstream::debug)
|
|
||||||
{
|
|
||||||
Pout<< "UPstream::broadcast : root:" << rootProcNo
|
|
||||||
<< " comm:" << comm
|
|
||||||
<< " size:" << label(bufSize)
|
|
||||||
<< Foam::endl;
|
|
||||||
}
|
|
||||||
if (UPstream::warnComm >= 0 && comm != UPstream::warnComm)
|
if (UPstream::warnComm >= 0 && comm != UPstream::warnComm)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::broadcast : root:" << rootProcNo
|
Pout<< "UPstream::broadcast : root:" << rootProcNo
|
||||||
@ -63,6 +56,13 @@ bool Foam::UPstream::broadcast
|
|||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Pout);
|
||||||
}
|
}
|
||||||
|
else if (UPstream::debug)
|
||||||
|
{
|
||||||
|
Pout<< "UPstream::broadcast : root:" << rootProcNo
|
||||||
|
<< " comm:" << comm
|
||||||
|
<< " size:" << label(bufSize)
|
||||||
|
<< Foam::endl;
|
||||||
|
}
|
||||||
|
|
||||||
profilingPstream::beginTiming();
|
profilingPstream::beginTiming();
|
||||||
|
|
||||||
|
|||||||
@ -632,7 +632,8 @@ void Foam::PstreamDetail::allToAllConsensus
|
|||||||
// Message found, receive into dest buffer location
|
// Message found, receive into dest buffer location
|
||||||
const label proci = status.MPI_SOURCE;
|
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);
|
MPI_Get_count(&status, datatype, &count);
|
||||||
|
|
||||||
if (count != 1)
|
if (count != 1)
|
||||||
@ -812,10 +813,10 @@ void Foam::PstreamDetail::allToAllConsensus
|
|||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
// Message found, receive into dest buffer location
|
// Message found, receive into dest buffer location
|
||||||
|
|
||||||
const label proci = status.MPI_SOURCE;
|
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);
|
MPI_Get_count(&status, datatype, &count);
|
||||||
|
|
||||||
if (count != 1)
|
if (count != 1)
|
||||||
|
|||||||
@ -69,7 +69,7 @@ Foam::porousBafflePressureFvPatchField::porousBafflePressureFvPatchField
|
|||||||
{
|
{
|
||||||
if (!this->readValueEntry(dict))
|
if (!this->readValueEntry(dict))
|
||||||
{
|
{
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
this->evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -151,7 +151,7 @@ public:
|
|||||||
//- Evaluate the patchField
|
//- Evaluate the patchField
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType = Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType = Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
|
|||||||
@ -364,7 +364,7 @@ Foam::interfaceTrackingFvMesh::pointDisplacement()
|
|||||||
{
|
{
|
||||||
OPstream toNeighbProc
|
OPstream toNeighbProc
|
||||||
(
|
(
|
||||||
Pstream::commsTypes::blocking,
|
Pstream::commsTypes::buffered,
|
||||||
procPatch.neighbProcNo()
|
procPatch.neighbProcNo()
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -375,7 +375,7 @@ Foam::interfaceTrackingFvMesh::pointDisplacement()
|
|||||||
{
|
{
|
||||||
IPstream fromNeighbProc
|
IPstream fromNeighbProc
|
||||||
(
|
(
|
||||||
Pstream::commsTypes::blocking,
|
Pstream::commsTypes::buffered,
|
||||||
procPatch.neighbProcNo()
|
procPatch.neighbProcNo()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -587,12 +587,12 @@ void Foam::motionSmootherAlgo::correctBoundaryConditions
|
|||||||
if (schedEval.init)
|
if (schedEval.init)
|
||||||
{
|
{
|
||||||
displacementBf[patchi]
|
displacementBf[patchi]
|
||||||
.initEvaluate(Pstream::commsTypes::blocking);
|
.initEvaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
displacementBf[patchi]
|
displacementBf[patchi]
|
||||||
.evaluate(Pstream::commsTypes::blocking);
|
.evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -608,12 +608,12 @@ void Foam::motionSmootherAlgo::correctBoundaryConditions
|
|||||||
if (schedEval.init)
|
if (schedEval.init)
|
||||||
{
|
{
|
||||||
displacementBf[patchi]
|
displacementBf[patchi]
|
||||||
.initEvaluate(Pstream::commsTypes::blocking);
|
.initEvaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
displacementBf[patchi]
|
displacementBf[patchi]
|
||||||
.evaluate(Pstream::commsTypes::blocking);
|
.evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -67,12 +67,12 @@ void Foam::motionSmootherAlgo::checkConstraints
|
|||||||
|
|
||||||
forAllReverse(bFld, patchi)
|
forAllReverse(bFld, patchi)
|
||||||
{
|
{
|
||||||
bFld[patchi].initEvaluate(Pstream::commsTypes::blocking); // buffered
|
bFld[patchi].initEvaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAllReverse(bFld, patchi)
|
forAllReverse(bFld, patchi)
|
||||||
{
|
{
|
||||||
bFld[patchi].evaluate(Pstream::commsTypes::blocking);
|
bFld[patchi].evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -292,7 +292,7 @@ void Foam::faBoundaryMesh::calcGeometry()
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
pBufs.commsType() == Pstream::commsTypes::blocking
|
pBufs.commsType() == Pstream::commsTypes::buffered
|
||||||
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -943,7 +943,7 @@ void Foam::faBoundaryMesh::movePoints(const pointField& p)
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
pBufs.commsType() == Pstream::commsTypes::blocking
|
pBufs.commsType() == Pstream::commsTypes::buffered
|
||||||
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -989,7 +989,7 @@ void Foam::faBoundaryMesh::updateMesh()
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
pBufs.commsType() == Pstream::commsTypes::blocking
|
pBufs.commsType() == Pstream::commsTypes::buffered
|
||||||
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
|| pBufs.commsType() == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1606,7 +1606,7 @@ void Foam::faMesh::calcPointAreaNormals(vectorField& result) const
|
|||||||
{
|
{
|
||||||
UOPstream::write
|
UOPstream::write
|
||||||
(
|
(
|
||||||
UPstream::commsTypes::blocking,
|
UPstream::commsTypes::buffered,
|
||||||
procPatch.neighbProcNo(),
|
procPatch.neighbProcNo(),
|
||||||
patchPointNormals
|
patchPointNormals
|
||||||
);
|
);
|
||||||
@ -1618,7 +1618,7 @@ void Foam::faMesh::calcPointAreaNormals(vectorField& result) const
|
|||||||
{
|
{
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
UPstream::commsTypes::blocking,
|
UPstream::commsTypes::buffered,
|
||||||
procPatch.neighbProcNo(),
|
procPatch.neighbProcNo(),
|
||||||
patchPointNormals
|
patchPointNormals
|
||||||
);
|
);
|
||||||
@ -1916,7 +1916,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit(vectorField& result) const
|
|||||||
{
|
{
|
||||||
OPstream toNeighbProc
|
OPstream toNeighbProc
|
||||||
(
|
(
|
||||||
Pstream::commsTypes::blocking,
|
Pstream::commsTypes::buffered,
|
||||||
procPatch.neighbProcNo(),
|
procPatch.neighbProcNo(),
|
||||||
toNgbProcLsPoints.size_bytes()
|
toNgbProcLsPoints.size_bytes()
|
||||||
+ toNgbProcLsPointStarts.size_bytes()
|
+ toNgbProcLsPointStarts.size_bytes()
|
||||||
@ -1945,7 +1945,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit(vectorField& result) const
|
|||||||
{
|
{
|
||||||
IPstream fromNeighbProc
|
IPstream fromNeighbProc
|
||||||
(
|
(
|
||||||
Pstream::commsTypes::blocking,
|
Pstream::commsTypes::buffered,
|
||||||
procPatch.neighbProcNo(),
|
procPatch.neighbProcNo(),
|
||||||
10*patchPointLabels.size()*sizeof(vector)
|
10*patchPointLabels.size()*sizeof(vector)
|
||||||
+ fromNgbProcLsPointStarts.size_bytes()
|
+ fromNgbProcLsPointStarts.size_bytes()
|
||||||
|
|||||||
@ -130,7 +130,7 @@ public:
|
|||||||
// HJ, 30/Jun/2009
|
// HJ, 30/Jun/2009
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType = Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType = Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- Return face-gradient transform diagonal
|
||||||
|
|||||||
@ -162,7 +162,7 @@ public:
|
|||||||
virtual void initEvaluateLocal
|
virtual void initEvaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
initEvaluate(commsType);
|
initEvaluate(commsType);
|
||||||
@ -172,7 +172,7 @@ public:
|
|||||||
virtual void evaluateLocal
|
virtual void evaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
evaluate(commsType);
|
evaluate(commsType);
|
||||||
|
|||||||
@ -136,7 +136,7 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -210,7 +210,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -231,7 +231,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
|
|||||||
@ -178,7 +178,7 @@ public:
|
|||||||
virtual void initEvaluate
|
virtual void initEvaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -133,7 +133,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
|
|||||||
@ -92,7 +92,7 @@ Foam::cyclicFaPatchField<Type>::cyclicFaPatchField
|
|||||||
|
|
||||||
if (IOobjectOption::isReadRequired(requireValue))
|
if (IOobjectOption::isReadRequired(requireValue))
|
||||||
{
|
{
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
this->evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -191,7 +191,7 @@ public:
|
|||||||
virtual void initEvaluateLocal
|
virtual void initEvaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ public:
|
|||||||
virtual void evaluateLocal
|
virtual void evaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -124,7 +124,7 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType = Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType = Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -155,7 +155,7 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
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
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
|
|||||||
@ -564,7 +564,7 @@ public:
|
|||||||
virtual void initEvaluate
|
virtual void initEvaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -572,7 +572,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Initialise the evaluation of the patch field after a local
|
//- Initialise the evaluation of the patch field after a local
|
||||||
@ -580,7 +580,7 @@ public:
|
|||||||
virtual void initEvaluateLocal
|
virtual void initEvaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -588,7 +588,7 @@ public:
|
|||||||
virtual void evaluateLocal
|
virtual void evaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -482,7 +482,7 @@ public:
|
|||||||
virtual void initEvaluateLocal
|
virtual void initEvaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -490,7 +490,7 @@ public:
|
|||||||
virtual void evaluateLocal
|
virtual void evaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
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
|
//- Initialise the evaluation of the patch field, generally a no-op
|
||||||
virtual void initEvaluate
|
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
|
//- Evaluate the patch field, generally a no-op
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType = Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType = Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,7 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- Return face-gradient transform diagonal
|
||||||
|
|||||||
@ -188,7 +188,7 @@ public:
|
|||||||
virtual void initEvaluateLocal
|
virtual void initEvaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
initEvaluate(commsType);
|
initEvaluate(commsType);
|
||||||
@ -198,7 +198,7 @@ public:
|
|||||||
virtual void evaluateLocal
|
virtual void evaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
evaluate(commsType);
|
evaluate(commsType);
|
||||||
|
|||||||
@ -191,7 +191,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- Return face-gradient transform diagonal
|
||||||
|
|||||||
@ -135,7 +135,7 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -210,7 +210,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
|
|||||||
@ -268,7 +268,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
|
|||||||
@ -176,7 +176,7 @@ public:
|
|||||||
virtual void initEvaluate
|
virtual void initEvaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -142,7 +142,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
|
|||||||
@ -70,7 +70,7 @@ Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
|
|||||||
|
|
||||||
if (needValue)
|
if (needValue)
|
||||||
{
|
{
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
this->evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -121,7 +121,7 @@ Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
|
|||||||
const int oldConsistency = consistency;
|
const int oldConsistency = consistency;
|
||||||
consistency = 0;
|
consistency = 0;
|
||||||
|
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
this->evaluate(Pstream::commsTypes::buffered);
|
||||||
|
|
||||||
consistency = oldConsistency;
|
consistency = oldConsistency;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,7 +66,7 @@ Foam::jumpCyclicAMIFvPatchField<Type>::jumpCyclicAMIFvPatchField
|
|||||||
cyclicAMIFvPatchField<Type>(p, iF, dict)
|
cyclicAMIFvPatchField<Type>(p, iF, dict)
|
||||||
{
|
{
|
||||||
// Call this evaluation in derived classes
|
// Call this evaluation in derived classes
|
||||||
//this->evaluate(Pstream::commsTypes::blocking);
|
//this->evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -199,7 +199,7 @@ public:
|
|||||||
virtual void initEvaluateLocal
|
virtual void initEvaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ public:
|
|||||||
virtual void evaluateLocal
|
virtual void evaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -145,7 +145,7 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- Return face-gradient transform diagonal
|
||||||
|
|||||||
@ -146,7 +146,7 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- Return face-gradient transform diagonal
|
||||||
|
|||||||
@ -192,7 +192,7 @@ Foam::codedFixedValueFvPatchField<Type>::codedFixedValueFvPatchField
|
|||||||
this->extrapolateInternal();
|
this->extrapolateInternal();
|
||||||
|
|
||||||
// Evaluate to assign a value
|
// Evaluate to assign a value
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
this->evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -245,7 +245,7 @@ public:
|
|||||||
//- Evaluate the patch field, sets updated() to false
|
//- Evaluate the patch field, sets updated() to false
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
|
|||||||
@ -251,7 +251,7 @@ public:
|
|||||||
// to false.
|
// to false.
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
|
|||||||
@ -89,7 +89,7 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
|
|||||||
|
|
||||||
if (!this->readValueEntry(dict))
|
if (!this->readValueEntry(dict))
|
||||||
{
|
{
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
this->evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -94,7 +94,7 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField
|
|||||||
{
|
{
|
||||||
if (!this->readValueEntry(dict))
|
if (!this->readValueEntry(dict))
|
||||||
{
|
{
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
this->evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,7 +73,7 @@ Foam::fixedJumpAMIFvPatchField<Type>::fixedJumpAMIFvPatchField
|
|||||||
|
|
||||||
if (!this->readValueEntry(dict))
|
if (!this->readValueEntry(dict))
|
||||||
{
|
{
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
this->evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -219,7 +219,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- Return face-gradient transform diagonal
|
||||||
|
|||||||
@ -93,7 +93,7 @@ flowRateInletVelocityFvPatchVectorField
|
|||||||
// Value field required if mass based
|
// Value field required if mass based
|
||||||
if (!this->readValueEntry(dict))
|
if (!this->readValueEntry(dict))
|
||||||
{
|
{
|
||||||
evaluate(Pstream::commsTypes::blocking);
|
evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -87,7 +87,7 @@ flowRateOutletVelocityFvPatchVectorField
|
|||||||
// Value field required if mass based
|
// Value field required if mass based
|
||||||
if (!this->readValueEntry(dict))
|
if (!this->readValueEntry(dict))
|
||||||
{
|
{
|
||||||
evaluate(Pstream::commsTypes::blocking);
|
evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -168,7 +168,7 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
|
|||||||
@ -72,7 +72,7 @@ matchedFlowRateOutletVelocityFvPatchVectorField
|
|||||||
// Value field required if mass based
|
// Value field required if mass based
|
||||||
if (!this->readValueEntry(dict))
|
if (!this->readValueEntry(dict))
|
||||||
{
|
{
|
||||||
evaluate(Pstream::commsTypes::blocking);
|
evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -215,7 +215,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- Return face-gradient transform diagonal
|
||||||
|
|||||||
@ -72,7 +72,7 @@ timeVaryingMappedFixedValueFvPatchField
|
|||||||
// by re-setting of fvatchfield::updated_ flag. This is
|
// by re-setting of fvatchfield::updated_ flag. This is
|
||||||
// so if first use is in the next time step it retriggers
|
// so if first use is in the next time step it retriggers
|
||||||
// a new update.
|
// a new update.
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
this->evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -77,7 +77,7 @@ Foam::uniformJumpFvPatchField<Type>::uniformJumpFvPatchField
|
|||||||
|
|
||||||
if (!this->readValueEntry(dict))
|
if (!this->readValueEntry(dict))
|
||||||
{
|
{
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
this->evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,7 +74,7 @@ Foam::uniformJumpAMIFvPatchField<Type>::uniformJumpAMIFvPatchField
|
|||||||
|
|
||||||
if (!this->readValueEntry(dict))
|
if (!this->readValueEntry(dict))
|
||||||
{
|
{
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
this->evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -635,7 +635,7 @@ public:
|
|||||||
virtual void initEvaluate
|
virtual void initEvaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -643,7 +643,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Initialise the evaluation of the patch field after a local
|
//- Initialise the evaluation of the patch field after a local
|
||||||
@ -651,7 +651,7 @@ public:
|
|||||||
virtual void initEvaluateLocal
|
virtual void initEvaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -659,7 +659,7 @@ public:
|
|||||||
virtual void evaluateLocal
|
virtual void evaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -511,7 +511,7 @@ public:
|
|||||||
virtual void initEvaluate
|
virtual void initEvaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -519,7 +519,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -528,7 +528,7 @@ public:
|
|||||||
virtual void initEvaluateLocal
|
virtual void initEvaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -536,7 +536,7 @@ public:
|
|||||||
virtual void evaluateLocal
|
virtual void evaluateLocal
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ void Foam::functionObjects::mapFields::evaluateConstraintTypes
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
commsType == UPstream::commsTypes::blocking
|
commsType == UPstream::commsTypes::buffered
|
||||||
|| commsType == UPstream::commsTypes::nonBlocking
|
|| commsType == UPstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -190,7 +190,7 @@ public:
|
|||||||
//- Update the patch field
|
//- Update the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
|
|||||||
@ -107,7 +107,7 @@ timeVaryingMappedFixedValuePointPatchField
|
|||||||
// of the pointPatchField::updated_ flag. This is
|
// of the pointPatchField::updated_ flag. This is
|
||||||
// so if first use is in the next time step it retriggers
|
// so if first use is in the next time step it retriggers
|
||||||
// a new update.
|
// a new update.
|
||||||
pointPatchField<Type>::evaluate(Pstream::commsTypes::blocking);
|
pointPatchField<Type>::evaluate(Pstream::commsTypes::buffered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -199,7 +199,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -203,7 +203,7 @@ public:
|
|||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
Pstream::commsTypes::blocking
|
Pstream::commsTypes::buffered
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -138,7 +138,7 @@ public:
|
|||||||
// adjoint pressure BC
|
// adjoint pressure BC
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType = Pstream::commsTypes::blocking
|
const Pstream::commsTypes commsType = Pstream::commsTypes::buffered
|
||||||
);
|
);
|
||||||
|
|
||||||
//virtual void updateCoeffs();
|
//virtual void updateCoeffs();
|
||||||
|
|||||||
@ -164,10 +164,9 @@ void Foam::isoSurfacePoint::syncUnseparatedPoints
|
|||||||
patchInfo[nbrPointi] = pointValues[meshPts[pointi]];
|
patchInfo[nbrPointi] = pointValues[meshPts[pointi]];
|
||||||
}
|
}
|
||||||
|
|
||||||
// buffered send
|
|
||||||
OPstream toNbr
|
OPstream toNbr
|
||||||
(
|
(
|
||||||
UPstream::commsTypes::blocking,
|
UPstream::commsTypes::buffered,
|
||||||
procPatch.neighbProcNo()
|
procPatch.neighbProcNo()
|
||||||
);
|
);
|
||||||
toNbr << patchInfo;
|
toNbr << patchInfo;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user