Go to the documentation of this file.
115 const label myProcID,
218 const label parentIndex,
281 const bool doPstream =
true
287 const label communicator,
288 const bool doPstream =
true
320 operator label()
const
339 const label currentComm,
340 const int currentProcID
349 static bool init(
int& argc,
char**& argv);
372 static void freeTag(
const char*,
const int tag);
475 static void exit(
int errnum = 1);
484 Ostream&
operator<<(Ostream&,
const UPstream::commsStruct&);
static int allocateTag(const char *)
static DynamicList< List< int > > procIDs_
static label warnComm
Debugging: warn for use of any communicator differing from warnComm.
static void resetRequests(const label sz)
Truncate number of outstanding requests.
A class for handling words, derived from string.
commsStruct()
Construct null.
static int baseProcNo(const label myComm, const int procID)
Return physical processor number (i.e. processor number in.
#define forAll(list, i)
Loop across all elements in list.
static void exit(int errnum=1)
Exit program.
communicator(const communicator &)
Disallow copy and assignment.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static bool & parRun()
Is this a parallel run?
static DynamicList< List< commsStruct > > linearCommunication_
friend Ostream & operator<<(Ostream &, const commsStruct &)
static const NamedEnum< commsTypes, 3 > commsTypeNames
static LIFOStack< label > freeComms_
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
static void abort()
Abort program.
static void freePstreamCommunicator(const label index)
Free a communicator.
static commsTypes defaultCommsType
Default commsType.
label above_
procID of above processor
UPstream(const commsTypes commsType)
Construct given optional buffer size.
void operator=(const communicator &)
static void allocatePstreamCommunicator(const label parentIndex, const label index)
Allocate a communicator with index.
bool operator==(const commsStruct &) const
labelList below_
procIDs of processors directly below me
const labelList & allBelow() const
void operator()(T &x, const T &y) const
labelList allBelow_
procIDs of all processors below (so not just directly below)
static label allocateCommunicator(const label parent, const labelList &subRanks, const bool doPstream=true)
Allocate a new communicator.
static void setParRun(const label nProcs)
Set data for parallel running. Special case nProcs=0 to switch off.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Inter-processor communications stream.
static int lastSlave(const label communicator=0)
Process index of last slave.
static bool floatTransfer
Should compact transfer be used in which floats replace doubles.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
static void waitRequest(const label i)
Wait until request i has finished.
commsTypes commsType() const
Get the communications type of the stream.
labelList allNotBelow_
procIDs of all processors not below. (inverse set of
static void addValidParOptions(HashTable< string > &validParOptions)
Add the valid option this type of communications library.
static List< int > & procID(label communicator)
Process ID of given process index.
static void freeCommunicator(const label communicator, const bool doPstream=true)
Free a previously allocated communicator.
static int masterNo()
Process index of the master.
Ostream & operator<<(Ostream &, const edgeMesh &)
const labelList & allNotBelow() const
static int firstSlave()
Process index of first slave.
Structure for communicating between processors.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
static bool master(const label communicator=0)
Am I the master process.
static int nProcsSimpleSum
Number of processors at which the sum algorithm changes from linear.
An STL-conforming hash table.
combineReduce operator for lists. Used for counting.
static int & msgType()
Message tag of standard messages.
commsTypes
Types of communications.
static label nRequests()
Get number of outstanding requests.
static void collectReceives(const label procID, const List< DynamicList< label > > &receives, DynamicList< label > &allReceives)
Helper function for tree communication schedule determination.
commsTypes commsType_
Communications type of this stream.
static label worldComm
Default communicator (all processors)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static label procNo(const label comm, const int baseProcID)
Return processor number in communicator (given physical processor.
commsTypes commsType(const commsTypes ct)
Set the communications type of the stream.
static bool finishedRequest(const label i)
Non-blocking comms: has request i finished?
static void freeCommunicators(const bool doPstream)
Free all communicators.
static List< commsStruct > calcLinearComm(const label nProcs)
Calculate linear communication schedule.
static DynamicList< int > myProcNo_
Various functions to operate on Lists.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static label parent(const label communicator)
Helper class for allocating/freeing communicators.
static const List< commsStruct > & linearCommunication(const label communicator=0)
Communication schedule for linear all-to-master (proc 0)
static DynamicList< label > parentCommunicator_
bool operator!=(const commsStruct &) const
static List< commsStruct > calcTreeComm(const label nProcs)
Calculate tree communication schedule.
static int nPollProcInterfaces
Number of polling cycles in processor updates.
const labelList & below() const
static const List< commsStruct > & treeCommunication(const label communicator=0)
Communication schedule for tree all-to-master (proc 0)
static bool init(int &argc, char **&argv)
Initialisation function called from main.
static DynamicList< List< commsStruct > > treeCommunication_
static void freeTag(const char *, const int tag)