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;
|
||||
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),
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -568,10 +568,9 @@ void syncPoints
|
||||
}
|
||||
}
|
||||
|
||||
// buffered send
|
||||
OPstream toNbr
|
||||
(
|
||||
UPstream::commsTypes::blocking,
|
||||
UPstream::commsTypes::buffered,
|
||||
procPatch.neighbProcNo()
|
||||
);
|
||||
toNbr << patchInfo;
|
||||
|
||||
@ -48,7 +48,7 @@ void evaluateConstraintTypes(GeometricField<Type, fvPatchField, volMesh>& fld)
|
||||
|
||||
if
|
||||
(
|
||||
commsType == UPstream::commsTypes::blocking
|
||||
commsType == UPstream::commsTypes::buffered
|
||||
|| commsType == UPstream::commsTypes::nonBlocking
|
||||
)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user