115 const label myProcID,
167 void operator()(
T&
x,
const T&
y)
const 214 static void setParRun(
const label nProcs);
224 static void collectReceives
232 static void allocatePstreamCommunicator
234 const label parentIndex,
239 static void freePstreamCommunicator
286 commsType_(commsType)
297 const bool doPstream =
true 303 const label communicator,
304 const bool doPstream =
true 316 communicator(
const communicator&);
317 void operator=(
const communicator&);
328 comm_(allocateCommunicator(parent, subRanks, doPstream))
336 operator label()
const 355 const label currentComm,
356 const int currentProcID
365 static bool init(
int& argc,
char**& argv);
388 static void freeTag(
const char*,
const int tag);
402 return procIDs_[communicator].
size();
414 return myProcNo_[communicator] ==
masterNo();
420 return myProcNo_[communicator];
425 return parentCommunicator_(communicator);
431 return procIDs_[communicator];
443 return nProcs(communicator) - 1;
449 const label communicator = 0
452 return linearCommunication_[communicator];
458 const label communicator = 0
461 return treeCommunication_[communicator];
487 static void exit(
int errnum = 1);
499 const label communicator = 0
static bool floatTransfer
Should compact transfer be used in which floats replace doubles.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static int masterNo()
Process index of the master.
commsTypes
Types of communications.
static int firstSlave()
Process index of first slave.
commsTypes commsType_
Communications type of this stream.
void size(const label)
Override size to be inconsistent with allocated storage.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
static int nProcsSimpleSum
Number of processors at which the sum algorithm changes from linear.
static bool master(const label communicator=0)
Am I the master process.
static bool finishedRequest(const label i)
Non-blocking comms: has request i finished?
static label procNo(const label comm, const int baseProcID)
Return processor number in communicator (given physical processor.
static label nRequests()
Get number of outstanding requests.
static int & msgType()
Message tag of standard messages.
static label worldComm
Default communicator (all processors)
static const List< commsStruct > & linearCommunication(const label communicator=0)
Communication schedule for linear all-to-master (proc 0)
Various functions to operate on Lists.
static void freeCommunicators(const bool doPstream)
Free all communicators.
const labelList & allBelow() const
static int nPollProcInterfaces
Number of polling cycles in processor updates.
static label parent(const label communicator)
static int allocateTag(const char *)
static void freeTag(const char *, const int tag)
bool operator==(const commsStruct &) const
A class for handling words, derived from string.
bool operator!=(const commsStruct &) const
static void resetRequests(const label sz)
Truncate number of outstanding requests.
static bool init(int &argc, char **&argv)
Initialisation function called from main.
static const List< commsStruct > & treeCommunication(const label communicator=0)
Communication schedule for tree all-to-master (proc 0)
combineReduce operator for lists. Used for counting.
An STL-conforming hash table.
static label warnComm
Debugging: warn for use of any communicator differing from warnComm.
Structure for communicating between processors.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
static void exit(int errnum=1)
Exit program.
static int baseProcNo(const label myComm, const int procID)
Return physical processor number (i.e. processor number in.
static const NamedEnum< commsTypes, 3 > commsTypeNames
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
const labelList & allNotBelow() const
static void abort()
Abort program.
static commsTypes defaultCommsType
Default commsType.
static bool & parRun()
Is this a parallel run?
static label nProcs(const label communicator=0)
Number of processes in parallel run.
commsTypes commsType() const
Get the communications type of the stream.
UPstream(const commsTypes commsType)
Construct given optional buffer size.
commsStruct()
Construct null.
const labelList & below() const
static void allToAll(const labelUList &sendData, labelUList &recvData, const label communicator=0)
Exchange label with all processors (in the communicator).
friend Ostream & operator<<(Ostream &, const commsStruct &)
static label allocateCommunicator(const label parent, const labelList &subRanks, const bool doPstream=true)
Allocate a new communicator.
static void waitRequest(const label i)
Wait until request i has finished.
Inter-processor communications stream.
static List< int > & procID(label communicator)
Process ID of given process index.
static void addValidParOptions(HashTable< string > &validParOptions)
Add the valid option this type of communications library.
static void freeCommunicator(const label communicator, const bool doPstream=true)
Free a previously allocated communicator.
static int lastSlave(const label communicator=0)
Process index of last slave.