37 std::streamsize count,
38 const UPstream::dataTypes dataTypeId,
39 const int communicator,
57 <<
"Broadcast size " << label(count)
72 Perr<<
"[mpi_broadcast] :"
73 <<
" type:" << int(dataTypeId)
74 <<
" count:" << label(count)
80 int returnCode = MPI_SUCCESS;
93 UPstream::commInterNode_,
94 UPstream::commLocalNode_
102 Perr<<
"[mpi_broadcast] :"
103 <<
" type:" << int(dataTypeId)
104 <<
" count:" << label(count)
105 <<
" comm:" << subComm
109 returnCode = MPI_Bcast
125 returnCode = MPI_Bcast
137 return (returnCode == MPI_SUCCESS);
Wrapper for internally indexed communicator label. Always invokes UPstream::allocateCommunicatorCompo...
static bool mpi_broadcast(void *buf, std::streamsize count, const UPstream::dataTypes dataTypeId, const int communicator, const int root=0)
Broadcast buffer contents to all ranks (default: from rank=0). The sizes must match on all processes.
static bool usingTopoControl(UPstream::topoControls ctrl) noexcept
Test for selection of given topology-aware routine.
static bool is_parallel(const label communicator=worldComm)
True if parallel algorithm or exchange is required.
static bool usingNodeComms(const int communicator)
True if node topology-aware routines have been enabled, it is running in parallel,...
@ broadcast
broadcast [MPI]
static void addBroadcastTime()
Add time increment to broadcast time.
static void beginTiming()
Update timer prior to measurement.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
MPI_Datatype getDataType(UPstream::dataTypes id)
Lookup of dataTypes enumeration as an MPI_Datatype.
DynamicList< MPI_Comm > MPICommunicators_
prefixOSstream Perr
OSstream wrapped stderr (std::cerr) with parallel prefix.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FOAM_UNLIKELY(cond)