49 os << allValues[proci];
69 template<
class Type,
class FileOp>
80 Pout<<
"masterUncollatedFileOperation::masterOp : Operation " 81 <<
typeid(FileOp).
name()
82 <<
" on " << fName <<
endl;
90 List<Type> result(filePaths.size());
93 result = fop(filePaths[0]);
94 for (label i = 1; i < filePaths.size(); i++)
96 if (filePaths[i] != filePaths[0])
98 result[i] = fop(filePaths[i]);
103 return scatterList(result, tag, comm);
112 template<
class Type,
class FileOp>
124 Pout<<
"masterUncollatedFileOperation : Operation on src:" << src
125 <<
" dest:" << dest <<
endl;
133 List<fileName> dests(srcs.size());
140 result = fop(srcs[0], dests[0]);
141 for (label i = 1; i < srcs.size(); i++)
143 if (srcs[i] != srcs[0])
145 result[i] = fop(srcs[i], dests[i]);
150 return scatterList(result, tag, comm);
154 return fop(src, dest);
A class for handling file names.
void finishedScatters(const bool wait=true)
Mark all sends to sub-procs as done.
Type masterOp(const fileName &fName, const FileOp &fop, const int tag, const label comm) const
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool & parRun() noexcept
Test if this a parallel run.
static int myProcNo(const label communicator=worldComm)
Number of this process (starting from masterNo() = 0)
Input inter-processor communications stream using MPI send/recv etc. - operating on external buffer...
static label nProcs(const label communicator=worldComm)
Number of ranks in parallel run (for given communicator) is 1 for serial run.
static void gatherList(const List< commsStruct > &comms, List< T > &values, const int tag, const label comm)
Gather data, but keep individual values separate. Uses the specified communication schedule...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Type scatterList(const UList< Type > &, const int, const label comm) const
static constexpr int masterNo() noexcept
Process index of the master (always 0)
Output inter-processor communications stream using MPI send/recv etc. - operating on external buffer...
int debug
Static debugging option.
OBJstream os(runTime.globalPath()/outputName)
Buffers for inter-processor communications streams (UOPstream, UIPstream).
static bool master(const label communicator=worldComm)
Am I the master rank.
"nonBlocking" : (MPI_Isend, MPI_Irecv)
static rangeType subProcs(const label communicator=worldComm)
Range of process indices for sub-processes.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.