48 commsType_(commsType),
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.
void finishedSends(const bool block=true)
Mark all sends as having been done. This will start receives.
errorManipArg< error, int > exit(error &err, const int errNo=1)
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,.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
commsTypes
Types of communications.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void exchangeSizes(const Container &sendData, labelList &sizes, const label comm=UPstream::worldComm)
Helper: exchange sizes of sendData. sendData is the data per.
static DynamicList< char > nullBuf
streamFormat
Enumeration for the format of data in the stream.
errorManip< error > abort(error &err)
Creates a single block of cells from point coordinates, numbers of cells in each direction and an exp...
~PstreamBuffers()
Destructor.
static const NamedEnum< commsTypes, 3 > commsTypeNames
void clear()
Clear storage and reset.
static label nProcs(const label communicator=0)
Number of processes in parallel run.