48 commsType_(commsType),
55 recvBufPos_(
UPstream::nProcs(comm), 0),
56 finishedSendsCalled_(false)
67 if (recvBufPos_[proci] < recvBuf_[proci].size())
70 <<
"Message from processor " << proci
71 <<
" not fully consumed. messageSize:" << recvBuf_[proci].size()
72 <<
" bytes of which only " << recvBufPos_[proci]
84 finishedSendsCalled_ =
true;
88 Pstream::exchange<DynamicList<char>,
char>
102 finishedSendsCalled_ =
true;
108 Pstream::exchange<DynamicList<char>,
char>
121 <<
"Obtaining sizes not supported in "
123 <<
" since transfers already in progress. Use non-blocking instead."
143 finishedSendsCalled_ =
false;
#define forAll(list, i)
Loop across all elements in list.
streamFormat
Enumeration for the format of data in the stream.
PstreamBuffers(const UPstream::commsTypes commsType, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, IOstream::streamFormat format=IOstream::BINARY, IOstream::versionNumber version=IOstream::currentVersion)
Construct given comms type,.
static DynamicList< char > nullBuf
void finishedSends(const bool block=true)
Mark all sends as having been done. This will start receives.
void clear()
Clear storage and reset.
~PstreamBuffers()
Destructor.
static void exchangeSizes(const Container &sendData, labelList &sizes, const label comm=UPstream::worldComm)
Helper: exchange sizes of sendData. sendData is the data per.
Inter-processor communications stream.
commsTypes
Types of communications.
static const NamedEnum< commsTypes, 3 > commsTypeNames
Creates a single block of cells from point coordinates, numbers of cells in each direction and an exp...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
word format(conversionProperties.lookup("format"))