115 const label myProcID,
167 void operator()(
T&
x,
const T&
y)
const 188 static bool haveThreads_;
217 static void setParRun(
const label nProcs,
const bool haveThreads);
227 static void collectReceives
235 static void allocatePstreamCommunicator
237 const label parentIndex,
242 static void freePstreamCommunicator
290 commsType_(commsType)
301 const bool doPstream =
true 307 const label communicator,
308 const bool doPstream =
true 320 communicator(
const communicator&);
321 void operator=(
const communicator&);
332 comm_(allocateCommunicator(parent, subRanks, doPstream))
340 operator label()
const 359 const label currentComm,
360 const int currentProcID
369 static bool init(
int& argc,
char**& argv,
const bool needsThread);
392 static void freeTag(
const char*,
const int tag);
412 return procIDs_[communicator].
size();
424 return myProcNo_[communicator] ==
masterNo();
430 return myProcNo_[communicator];
435 return parentCommunicator_(communicator);
441 return procIDs_[communicator];
453 return nProcs(communicator) - 1;
459 const label communicator = 0
462 return linearCommunication_[communicator];
468 const label communicator = 0
471 return treeCommunication_[communicator];
497 static void exit(
int errnum = 1);
509 const label communicator = 0
518 const char* sendData,
526 const label communicator = 0
532 const char* sendData,
538 const label communicator = 0
544 const char* sendData,
550 const label communicator = 0
static bool floatTransfer
Should compact transfer be used in which floats replace doubles.
commsTypes commsType() const
Get the communications type of the stream.
#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.
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.
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.
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)
static bool init(int &argc, char **&argv, const bool needsThread)
Initialisation function called from main.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
A class for handling words, derived from string.
static void resetRequests(const label sz)
Truncate number of outstanding requests.
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 bool haveThreads()
Have support for threads.
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.
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.
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.
UPstream(const commsTypes commsType)
Construct given optional buffer size.
Ostream & operator<<(Ostream &, const ensightPart &)
static void allToAll(const labelUList &sendData, labelUList &recvData, const label communicator=0)
Exchange label with all processors (in the communicator).
static label allocateCommunicator(const label parent, const labelList &subRanks, const bool doPstream=true)
Allocate a new communicator.
bool operator!=(const particle &, const particle &)
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.