39 if (Pstream::master())
41 for (
label proci = 1; proci < Pstream::nProcs(); proci++)
44 os << masterLst[proci];
51 if (Pstream::master())
53 myResult = masterLst[Pstream::myProcNo()];
64 template<
class Type,
class fileOp>
73 Pout<<
"masterUncollatedFileOperation : Operation on " << fName <<
endl;
75 if (Pstream::parRun())
78 filePaths[Pstream::myProcNo()] = fName;
79 Pstream::gatherList(filePaths);
82 if (Pstream::master())
84 result = fop(filePaths[0]);
85 for (
label i = 1; i < filePaths.
size(); i++)
87 if (filePaths[i] != filePaths[0])
89 result[i] = fop(filePaths[i]);
94 return scatterList(result);
103 template<
class Type,
class fileOp>
113 Pout<<
"masterUncollatedFileOperation : Operation on src:" << src
114 <<
" dest:" << dest <<
endl;
116 if (Pstream::parRun())
119 srcs[Pstream::myProcNo()] = src;
120 Pstream::gatherList(srcs);
123 dests[Pstream::myProcNo()] = dest;
124 Pstream::gatherList(dests);
127 if (Pstream::master())
129 result = fop(srcs[0], dests[0]);
132 if (srcs[i] != srcs[0])
134 result[i] = fop(srcs[i], dests[i]);
139 return scatterList(result);
143 return fop(src, dest);
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
void finishedSends(const bool block=true)
Mark all sends as having been done. This will start receives.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Input inter-processor communications stream operating on external buffer.
Type masterOp(const fileName &, const fileOp &fop) const
Output inter-processor communications stream operating on external buffer.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
prefixOSstream Pout(cout, "Pout")
Type scatterList(const UList< Type > &) const