35 bool Foam::UOPstream::bufferIPCsend()
56 const std::streamsize bufSize,
58 const label communicator,
59 UPstream::Request* req,
67 Pout<<
"UOPstream::write : starting write to:" << toProcNo
69 <<
" comm:" << communicator <<
" size:" << label(bufSize)
75 Pout<<
"UOPstream::write : starting write to:" << toProcNo
77 <<
" comm:" << communicator <<
" size:" << label(bufSize)
86 int returnCode = MPI_ERR_UNKNOWN;
92 returnCode = MPI_Bsend
94 const_cast<char*>(buf),
107 Pout<<
"UOPstream::write : finished write to:" << toProcNo
108 <<
" tag:" << tag <<
" size:" << label(bufSize)
117 returnCode = MPI_Ssend
119 const_cast<char*>(buf),
129 returnCode = MPI_Send
131 const_cast<char*>(buf),
145 Pout<<
"UOPstream::write : finished write to:" << toProcNo
146 <<
" tag:" << tag <<
" size:" << label(bufSize)
157 returnCode = MPI_Issend
159 const_cast<char*>(buf),
170 returnCode = MPI_Isend
172 const_cast<char*>(buf),
184 Pout<<
"UOPstream::write : started write to:" << toProcNo
185 <<
" tag:" << tag <<
" size:" << label(bufSize)
198 <<
"Unsupported communications type " << int(commsType)
202 return (returnCode == MPI_SUCCESS);
void size(const label n)
Older name for setAddressableSize.
sendModes
Different MPI-send modes (ignored for commsTypes::blocking)
"blocking" : (MPI_Bsend, MPI_Recv)
DynamicList< MPI_Request > outstandingRequests_
Outstanding non-blocking operations.
static const Enum< commsTypes > commsTypeNames
Enumerated names for the communication types.
commsTypes
Communications types.
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.
DynamicList< MPI_Comm > MPICommunicators_
Ostream & endl(Ostream &os)
Add newline and flush stream.
void reset_request(UPstream::Request *requestPtr, label *requestIdx=nullptr)
Reset UPstream::Request to null and/or the index of the outstanding request to -1.
void checkCommunicator(const label comm, const label toProcNo)
Fatal if comm is outside the allocated range.
"scheduled" : (MPI_Send, MPI_Recv)
const int toProcNo_
Destination rank for the data.
DynamicList< char > & sendBuf_
Reference to the send buffer data.
static void addScatterTime()
Add time increment to scatter time.
static label warnComm
Debugging: warn for use of any communicator differing from warnComm.
errorManip< error > abort(error &err)
commsTypes commsType() const noexcept
Get the communications type of the stream.
static void beginTiming()
Update timer prior to measurement.
int debug
Static debugging option.
static void addRequestTime()
Add time increment to request time.
void push_request(MPI_Request request, UPstream::Request *requestPtr=nullptr, label *requestIdx=nullptr)
Transcribe MPI_Request to UPstream::Request (does not affect the stack of outstanding requests) or el...
static bool write(const UPstream::commsTypes commsType, const int toProcNo, const char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, UPstream::Request *req=nullptr, const UPstream::sendModes sendMode=UPstream::sendModes::normal)
Write buffer contents to given processor.
"nonBlocking" : (MPI_Isend, MPI_Irecv)
static void printStack(Ostream &os, int size=-1)
Helper function to print a stack, with optional upper limit.
const T * cdata() const noexcept
Return pointer to the underlying array serving as data storage.
const int tag_
Message tag for communication.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.