33 bool Foam::UOPBstream::bufferIPCsend()
47 if (bufSize > std::streamsize(INT_MAX))
49 Perr<<
"UOPBstream::write() :" 60 reinterpret_cast<char*>(&bufSize),
61 sizeof(std::streamsize),
68 <<
"MPI_Bcast failure sending buffer size:" << bufSize <<
nl 89 <<
"MPI_Bcast failure sending buffer data:" 103 const int rootProcNo,
105 const std::streamsize bufSize,
115 <<
"MPI_Bcast failure sending buffer data:" << label(bufSize) <<
nl prefixOSstream Perr
OSstream wrapped stderr (std::cerr) with parallel prefix.
void size(const label n)
Older name for setAddressableSize.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const int comm_
The communicator index.
constexpr char nl
The newline '\n' character (0x0a)
T * data() noexcept
Return pointer to the underlying array serving as data storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void checkCommunicator(const label comm, const label toProcNo)
Fatal if comm is outside the allocated range.
static bool write(const int rootProcNo, const char *buf, const std::streamsize bufSize, const label comm=UPstream::worldComm)
Wrapped version of UPstream::broadcast with const-cast.
const int toProcNo_
Destination rank for the data.
DynamicList< char > & sendBuf_
Reference to the send buffer data.
errorManip< error > abort(error &err)
static bool broadcast(char *buf, const std::streamsize bufSize, const label communicator, const int rootProcNo=masterNo())
Broadcast buffer contents to all processes in given communicator. The sizes must match on all process...
static void printStack(Ostream &os, int size=-1)
Helper function to print a stack, with optional upper limit.