115 const label myProcID,
188 static bool haveThreads_;
227 static void collectReceives
235 static void allocatePstreamCommunicator
237 const label parentIndex,
242 static void freePstreamCommunicator
301 const bool doPstream =
true
307 const label communicator,
308 const bool doPstream =
true
339 operator label()
const
361 const label currentComm,
362 const int currentProcID
371 static bool init(
int& argc,
char**& argv,
const bool needsThread);
394 static void freeTag(
const char*,
const int tag);
499 static void exit(
int errnum = 1);
511 const label communicator = 0
520 const char* sendData,
528 const label communicator = 0
534 const char* sendData,
540 const label communicator = 0
546 const char* sendData,
552 const label communicator = 0
557 Ostream&
operator<<(Ostream&,
const UPstream::commsStruct&);
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
An STL-conforming hash table.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Structure for communicating between processors.
bool operator!=(const commsStruct &) const
const labelList & allNotBelow() const
bool operator==(const commsStruct &) const
friend Ostream & operator<<(Ostream &, const commsStruct &)
commsStruct()
Construct null.
const labelList & allBelow() const
const labelList & below() const
Helper class for allocating/freeing communicators.
communicator(const label parent, const labelList &subRanks, const bool doPstream)
void operator=(const communicator &)=delete
Disallow default bitwise assignment.
combineReduce operator for lists. Used for counting.
void operator()(T &x, const T &y) const
Inter-processor communications stream.
static bool haveThreads()
Have support for threads.
commsTypes
Types of communications.
static bool init(int &argc, char **&argv, const bool needsThread)
Initialisation function called from main.
static label warnComm
Debugging: warn for use of any communicator differing from warnComm.
static void freeTag(const char *, const int tag)
static void freeCommunicators(const bool doPstream)
Free all communicators.
static int masterNo()
Process index of the master.
static void freeCommunicator(const label communicator, const bool doPstream=true)
Free a previously allocated communicator.
static int allocateTag(const char *)
static bool master(const label communicator=0)
Am I the master process.
static bool floatTransfer
Should compact transfer be used in which floats replace doubles.
static List< int > & procID(label communicator)
Process ID of given process index.
UPstream(const commsTypes commsType)
Construct given optional buffer size.
static const NamedEnum< commsTypes, 3 > commsTypeNames
commsTypes commsType_
Communications type of this stream.
static void allToAll(const labelUList &sendData, labelUList &recvData, const label communicator=0)
Exchange label with all processors (in the communicator).
static int lastSlave(const label communicator=0)
Process index of last slave.
static label worldComm
Default communicator (all processors)
static label nRequests()
Get number of outstanding requests.
static label parent(const label communicator)
static int nProcsSimpleSum
Number of processors at which the sum algorithm changes from linear.
static int nPollProcInterfaces
Number of polling cycles in processor updates.
static void gather(const char *sendData, int sendSize, char *recvData, const UList< int > &recvSizes, const UList< int > &recvOffsets, const label communicator=0)
Receive data from all processors on the master.
commsTypes commsType() const
Get the communications type of the stream.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static void addValidParOptions(HashTable< string > &validParOptions)
Add the valid option this type of communications library.
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
static label allocateCommunicator(const label parent, const labelList &subRanks, const bool doPstream=true)
Allocate a new communicator.
static void resetRequests(const label sz)
Truncate number of outstanding requests.
static void scatter(const char *sendData, const UList< int > &sendSizes, const UList< int > &sendOffsets, char *recvData, int recvSize, const label communicator=0)
Send data to all processors from the root of the communicator.
static void abort()
Abort program.
static int firstSlave()
Process index of first slave.
static bool & parRun()
Is this a parallel run?
static label procNo(const label comm, const int baseProcID)
Return processor number in communicator (given physical processor.
static void exit(int errnum=1)
Exit program.
static int & msgType()
Message tag of standard messages.
static commsTypes defaultCommsType
Default commsType.
static const List< commsStruct > & linearCommunication(const label communicator=0)
Communication schedule for linear all-to-master (proc 0)
static bool finishedRequest(const label i)
Non-blocking comms: has request i finished?
static void waitRequest(const label i)
Wait until request i has finished.
static const List< commsStruct > & treeCommunication(const label communicator=0)
Communication schedule for tree all-to-master (proc 0)
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
static int baseProcNo(const label myComm, const int procID)
Return physical processor number (i.e. processor number in.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)