Go to the documentation of this file.
47 const scalar localValue
70 reinterpret_cast<char*
>(&slaveValue),
92 reinterpret_cast<const char*
>(&
sum),
106 reinterpret_cast<const char*
>(&localValue),
118 reinterpret_cast<char*
>(&
sum),
130 int main(
int argc,
char *argv[])
144 for (
label i = 0; i <
n/2; i++)
148 for (
label i =
n/2; i <
n; i++)
158 Pout<<
"localValue :" << localValue <<
endl;
167 Pout<<
"allocated comm :" << comm <<
endl;
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static bool & parRun()
Is this a parallel run?
Ostream & endl(Ostream &os)
Add newline and flush stream.
static label read(const commsTypes commsType, const int fromProcNo, char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label communicator=0)
Read into given buffer from given processor and return the.
static bool write(const commsTypes commsType, const int toProcNo, const char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label communicator=0)
Write given buffer to given processor.
static label allocateCommunicator(const label parent, const labelList &subRanks, const bool doPstream=true)
Allocate a new communicator.
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 lastSlave(const label communicator=0)
Process index of last slave.
static void freeCommunicator(const label communicator, const bool doPstream=true)
Free a previously allocated communicator.
static int masterNo()
Process index of the master.
static int firstSlave()
Process index of first slave.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
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 & msgType()
Message tag of standard messages.
prefixOSstream Pout(cout, "Pout")
static label worldComm
Default communicator (all processors)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
void sumReduce(T &Value, label &Count, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
int main(int argc, char *argv[])