67 FatalErrorIn(
"mpiOPstreamImpl::flush(const PstreamImpl::commsTypes, "
68 "const int, const char*, const int)")
69 <<
"MPI_Bsend cannot send outgoing message"
81 const std::streamsize bufSize
84 bool transferFailed =
true;
86 if (commsType == PstreamImpl::blocking)
88 transferFailed = MPI_Bsend
90 const_cast<char*>(buf),
93 Pstream::procID(toProcNo),
98 else if (commsType == PstreamImpl::scheduled)
100 transferFailed = MPI_Send
102 const_cast<char*>(buf),
105 Pstream::procID(toProcNo),
110 else if (commsType == PstreamImpl::nonBlocking)
114 transferFailed = MPI_Isend
116 const_cast<char*>(buf),
119 Pstream::procID(toProcNo),
131 "mpiOPstreamImpl::write"
132 "(const int fromProcNo, char* buf, std::streamsize bufSize)"
133 ) <<
"Unsupported communications type " << commsType
137 return !transferFailed;
157 "mpiOPstreamImpl::waitRequests()"
158 ) <<
"MPI_Waitall returned with error" <<
Foam::endl;
172 "OPstream::finishedRequest(const label)"
173 "mpiOPstreamImpl::finishedRequest(const label)"
176 <<
" outstanding send requests and you are asking for i=" << i
178 <<
"Maybe you are mixing blocking/non-blocking comms?"