Threaded file writer. More...
Public Member Functions | |
TypeName ("OFstreamCollator") | |
OFstreamCollator (const off_t maxBufferSize) | |
OFstreamCollator (const off_t maxBufferSize, const label comm) | |
virtual | ~OFstreamCollator () |
bool | write (const word &objectType, const fileName &, const string &data, IOstreamOption streamOpt, const bool append, const bool useThread=true, const dictionary &headerEntries=dictionary::null) |
void | waitAll () |
Threaded file writer.
Collects all data from all processors and writes as single 'decomposedBlockData' file. The operation is determined by the buffer size (maxThreadFileBufferSize setting):
Definition at line 66 of file OFstreamCollator.H.
|
explicit |
Definition at line 279 of file OFstreamCollator.C.
OFstreamCollator | ( | const off_t | maxBufferSize, |
const label | comm | ||
) |
Definition at line 296 of file OFstreamCollator.C.
|
virtual |
Definition at line 317 of file OFstreamCollator.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), UPstream::freeCommunicator(), and Foam::Pout.
TypeName | ( | "OFstreamCollator" | ) |
bool write | ( | const word & | objectType, |
const fileName & | fName, | ||
const string & | data, | ||
IOstreamOption | streamOpt, | ||
const bool | append, | ||
const bool | useThread = true , |
||
const dictionary & | headerEntries = dictionary::null |
||
) |
Definition at line 339 of file OFstreamCollator.C.
References Foam::abort(), append(), UList::cdata(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, decomposedBlockData::gather(), UPstream::haveThreads(), UPstream::master(), Foam::max(), UPstream::msgType(), UPstream::nonBlocking, UPstream::nRequests(), string::null, Foam::Pout, autoPtr::ptr(), UIPstream::read(), Pstream::scatter(), PtrList::set(), PtrList::setSize(), UList::size_bytes(), UPstream::waitRequests(), UOPstream::write(), and Foam::writeData().
Referenced by threadedCollatedOFstream::~threadedCollatedOFstream().
void waitAll | ( | ) |
Definition at line 578 of file OFstreamCollator.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), UPstream::master(), and Foam::Pout.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.