fileOperations that performs all file operations on the master processor. Requires the calls to be parallel synchronised! More...
Classes | |
class | chModOp |
class | cpOp |
class | existsOp |
class | fileOrNullOp |
class | fileSizeOp |
class | isDirOp |
class | isFileOp |
class | lastModifiedHROp |
class | lastModifiedOp |
class | lnOp |
class | mkDirOp |
class | modeOp |
class | mvBakOp |
class | mvOp |
class | readDirOp |
class | rmDirOp |
class | rmOp |
class | typeOp |
Public Member Functions | |
TypeName ("masterUncollated") | |
Runtime type information. More... | |
masterUncollatedFileOperation (bool verbose) | |
Default construct. More... | |
masterUncollatedFileOperation (const label comm, bool verbose) | |
Construct from communicator. More... | |
virtual | ~masterUncollatedFileOperation () |
Destructor. More... | |
virtual bool | mkDir (const fileName &, mode_t=0777) const |
Make directory. More... | |
virtual bool | chMod (const fileName &, const mode_t) const |
Set the file mode. More... | |
virtual mode_t | mode (const fileName &, const bool followLink=true) const |
Return the file mode. More... | |
virtual fileName::Type | type (const fileName &, const bool followLink=true) const |
Return the file type: DIRECTORY, FILE or LINK. More... | |
virtual bool | exists (const fileName &, const bool checkGzip=true, const bool followLink=true) const |
Does the name exist (as DIRECTORY or FILE) in the file system? More... | |
virtual bool | isDir (const fileName &, const bool followLink=true) const |
Does the name exist as a DIRECTORY in the file system? More... | |
virtual bool | isFile (const fileName &, const bool checkGzip=true, const bool followLink=true) const |
Does the name exist as a FILE in the file system? More... | |
virtual off_t | fileSize (const fileName &, const bool followLink=true) const |
Return size of file. More... | |
virtual time_t | lastModified (const fileName &, const bool followLink=true) const |
Return time of last file modification. More... | |
virtual double | highResLastModified (const fileName &, const bool followLink=true) const |
Return time of last file modification. More... | |
virtual fileNameList | readDir (const fileName &, const fileName::Type=fileName::FILE, const bool filtergz=true, const bool followLink=true) const |
Read a directory and return the entries as a string list. More... | |
virtual bool | cp (const fileName &src, const fileName &dst, const bool followLink=true) const |
Copy, recursively if necessary, the source to the destination. More... | |
virtual bool | ln (const fileName &src, const fileName &dst) const |
Create a softlink. dst should not exist. Returns true if. More... | |
virtual bool | mv (const fileName &src, const fileName &dst, const bool followLink=false) const |
Rename src to dst. More... | |
virtual bool | mvBak (const fileName &, const std::string &ext="bak") const |
Rename to a corresponding backup file. More... | |
virtual bool | rm (const fileName &) const |
Remove a file, returning true if successful otherwise false. More... | |
virtual bool | rmDir (const fileName &dir, const bool silent=false) const |
Remove a directory and its contents. More... | |
virtual fileName | filePath (const bool checkGlobal, const IOobject &io, const word &typeName, const bool search) const |
Search for an object. checkGlobal : also check undecomposed case. More... | |
virtual fileName | dirPath (const bool checkGlobal, const IOobject &io, const bool search) const |
Search for a directory. checkGlobal : also check undecomposed. More... | |
virtual fileNameList | readObjects (const objectRegistry &db, const fileName &instance, const fileName &local, word &newInstance) const |
Search directory for objects. Used in IOobjectList. More... | |
virtual bool | readHeader (IOobject &, const fileName &, const word &typeName) const |
Read object header from supplied file. More... | |
virtual autoPtr< ISstream > | readStream (regIOobject &, const fileName &, const word &typeName, const bool valid=true) const |
Reads header for regIOobject and returns an ISstream. More... | |
virtual bool | read (regIOobject &, const bool masterOnly, const IOstreamOption::streamFormat format, const word &typeName) const |
Top-level read. More... | |
virtual bool | writeObject (const regIOobject &io, IOstreamOption streamOpt=IOstreamOption(), const bool valid=true) const |
Writes a regIOobject (so header, contents and divider). More... | |
virtual autoPtr< ISstream > | NewIFstream (const fileName &) const |
Generate an ISstream that reads a file. More... | |
virtual autoPtr< OSstream > | NewOFstream (const fileName &pathname, IOstreamOption streamOpt=IOstreamOption(), const bool valid=true) const |
Generate an OSstream that writes a file. More... | |
virtual label | addWatch (const fileName &) const |
Add watching of a file. Returns handle. More... | |
virtual bool | removeWatch (const label) const |
Remove watch on a file (using handle) More... | |
virtual label | findWatch (const labelList &watchIndices, const fileName &) const |
Find index (or -1) of file in list of handles. More... | |
virtual void | addWatches (regIOobject &, const fileNameList &) const |
Helper: add watches for list of regIOobjects. More... | |
virtual fileName | getFile (const label) const |
Get name of file being watched (using handle) More... | |
virtual void | updateStates (const bool masterOnly, const bool syncPar) const |
Update state of all files. More... | |
virtual fileMonitor::fileState | getState (const label) const |
Get current state of file (using handle) More... | |
virtual void | setUnmodified (const label) const |
Set current state of file (using handle) to unmodified. More... | |
virtual instantList | findTimes (const fileName &, const word &) const |
Get sorted list of times. More... | |
virtual IOobject | findInstance (const IOobject &io, const scalar startValue, const word &stopInstance) const |
Find instance where IOobject is. Fails if cannot be found. More... | |
virtual void | setTime (const Time &) const |
Callback for time change. More... | |
virtual void | flush () const |
Forcibly wait until all output done. Flush any cached data. More... | |
const HashPtrTable< instantList > & | times () const |
Return cached times. More... | |
![]() | |
TypeName ("fileOperation") | |
Runtime type information. More... | |
fileOperation (const label comm, const bool distributedRoots=false) | |
Construct from communicator, optionally with distributed roots. More... | |
declareRunTimeSelectionTable (autoPtr, fileOperation, word,(bool verbose),(verbose)) | |
virtual | ~fileOperation ()=default |
Destructor. More... | |
bool | distributed () const noexcept |
Distributed roots (parallel run) More... | |
bool | distributed (bool on) const noexcept |
Set distributed roots on/off (mutable) More... | |
virtual fileName | objectPath (const IOobject &io, const word &typeName) const |
Generate disk file name for object. Opposite of filePath. More... | |
virtual fileName | filePath (const fileName &) const |
Search for a file or directory. Use IOobject version in. More... | |
virtual word | processorsDir (const IOobject &io) const |
Actual name of processors dir (for use in mode PROCOBJECT,. More... | |
virtual word | processorsDir (const fileName &) const |
Actual name of processors dir (for use in mode PROCOBJECT,. More... | |
virtual void | setNProcs (const label nProcs) |
Set number of processor directories/results. Only used in. More... | |
virtual label | nProcs (const fileName &dir, const fileName &local="") const |
Get number of processor directories/results. Used for e.g. More... | |
fileName | processorsCasePath (const IOobject &, const word &procDir) const |
Generate path (like io.path) from root+casename with any. More... | |
fileName | processorsPath (const IOobject &, const word &instance, const word &procDir) const |
Generate path (like io.path) with provided instance and any. More... | |
fileName | processorsPath (const fileName &, const word &procDir) const |
Operating on fileName: replace processorXXX with procDir. More... | |
Static Public Member Functions | |
static bool | uniformFile (const fileNameList &) |
Same file? More... | |
![]() | |
static autoPtr< fileOperation > | NewUncollated () |
Static construct the commonly used uncollatedFileOperation. More... | |
static autoPtr< fileOperation > | New (const word &handlerType, bool verbose=false) |
Select fileHandler-type. More... | |
static instantList | sortTimes (const fileNameList &dirEntries, const word &constantName="constant") |
Sort directory entries according to time value,. More... | |
static label | splitProcessorPath (const fileName &objectPath, fileName &path, fileName &procDir, fileName &local, procRangeType &group, label &nProcs) |
Split objectPath into part before 'processor' and part after. More... | |
static label | detectProcessorPath (const fileName &objPath) |
Detect processor number from '/aa/bb/processorDDD/cc'. More... | |
Static Public Attributes | |
static float | maxMasterFileBufferSize |
Max size of parallel communications. Switches from non-blocking. More... | |
![]() | |
static const Enum< pathType > | pathTypeNames_ |
static word | processorsBaseDir = "processors" |
Return the processors directory name (usually "processors") More... | |
static word | defaultFileHandler |
Name of the default fileHandler. More... | |
static autoPtr< fileOperation > | fileHandlerPtr_ |
Static fileOperation. More... | |
Protected Member Functions | |
template<class Type > | |
Type | scatterList (const UList< Type > &, const int, const label comm) const |
template<class Type , class fileOp > | |
Type | masterOp (const fileName &, const fileOp &fop, const int tag, const label comm) const |
template<class Type , class fileOp > | |
Type | masterOp (const fileName &, const fileName &, const fileOp &fop, const int tag, const label comm) const |
virtual fileName | filePathInfo (const bool checkGlobal, const bool isFile, const IOobject &, const bool search, pathType &searchType, word &processorsDir, word &instance) const |
Search (locally!) for object; return info on how it was found. More... | |
fileName | localObjectPath (const IOobject &, const pathType &searchType, const word &processorsDir, const word &instancePath) const |
Construct filePath. More... | |
bool | exists (const dirIndexList &, IOobject &io) const |
Helper: check IO for local existence. Like filePathInfo but. More... | |
![]() | |
fileMonitor & | monitor () const |
Get or create fileMonitor singleton. More... | |
refPtr< dirIndexList > | lookupAndCacheProcessorsPath (const fileName &objectPath, const bool syncPar) const |
Lookup name of processorsDDD using cache. More... | |
virtual refPtr< dirIndexList > | lookupProcessorsPath (const fileName &objectPath) const |
Lookup name of processorsDDD using cache. More... | |
bool | exists (IOobject &io) const |
Static Protected Member Functions | |
static labelList | subRanks (const label n) |
Get the list of processors that are part of this communicator. More... | |
static word | findInstancePath (const instantList &timeDirs, const instant &t) |
Equivalent of Time::findInstance. More... | |
static void | readAndSend (const fileName &filePath, const labelUList &procs, PstreamBuffers &pBufs) |
Read file contents and send to processors. More... | |
static autoPtr< ISstream > | read (IOobject &io, const label comm, const bool uniform, const fileNameList &filePaths, const boolList &procValid) |
Read files on comms master. More... | |
![]() | |
static labelList | ioRanks () |
Retrieve list of IO ranks from FOAM_IORANKS env variable. More... | |
static void | mergeTimes (const instantList &extraTimes, const word &constantName, instantList ×) |
Merge two times. More... | |
static bool | isFileOrDir (const bool isFile, const fileName &) |
Helper: check for file (isFile) or directory (!isFile) More... | |
Protected Attributes | |
const label | myComm_ |
Any communicator allocated by me. More... | |
HashPtrTable< instantList > | times_ |
Cached times for a given directory. More... | |
![]() | |
const label | comm_ |
Communicator to use. More... | |
bool | distributed_ |
Distributed roots (parallel run) More... | |
HashTable< dirIndexList > | procsDirs_ |
Detected processors directories. More... | |
autoPtr< fileMonitor > | monitorPtr_ |
File-change monitor for all registered files. More... | |
Additional Inherited Members | |
![]() | |
enum | pathType : int { NOTFOUND = 0, ABSOLUTE, OBJECT, WRITEOBJECT, PROCUNCOLLATED, PROCBASEOBJECT = PROCUNCOLLATED + 1, PROCOBJECT = PROCBASEOBJECT + 1, PARENTOBJECT, FINDINSTANCE, PROCUNCOLLATEDINSTANCE, PROCBASEINSTANCE, PROCINSTANCE } |
Enumeration for the location of an IOobject. More... | |
typedef Tuple2< fileName, Tuple2< pathType, int > > | dirIndex |
Augment fileName with pathType and local offset. More... | |
typedef List< dirIndex > | dirIndexList |
typedef IntRange< int > | procRangeType |
fileOperations that performs all file operations on the master processor. Requires the calls to be parallel synchronised!
The main logic is in ::filePath which returns a
system/controlDict: filePath worldmaster: <globalRoot>/system/controlDict localmaster: ,, slave : ,,
processor0/uniform/time filePath worldmaster: <globalRoot>/processorXXX/uniform/time localmaster: ,, slave : ,,
processors0/0/p processors10/0/p processors10_2-4/0/p
Definition at line 84 of file masterUncollatedFileOperation.H.
|
explicit |
Default construct.
Definition at line 724 of file masterUncollatedFileOperation.C.
References DetailInfo, Foam::endl(), Foam::infoDetailLevel, and WarningInFunction.
masterUncollatedFileOperation | ( | const label | comm, |
bool | verbose | ||
) |
Construct from communicator.
Definition at line 772 of file masterUncollatedFileOperation.C.
References DetailInfo, Foam::endl(), Foam::infoDetailLevel, and WarningInFunction.
|
virtual |
Destructor.
Definition at line 815 of file masterUncollatedFileOperation.C.
References UPstream::freeCommunicator(), masterUncollatedFileOperation::myComm_, and UPstream::worldComm.
|
staticprotected |
Get the list of processors that are part of this communicator.
Definition at line 84 of file masterUncollatedFileOperation.C.
References DynamicList< T, SizeMin >::append(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::identity(), n, and Foam::nl.
|
protected |
Definition at line 36 of file masterUncollatedFileOperationTemplates.C.
References PstreamBuffers::finishedSends(), and os().
|
protected |
Definition at line 71 of file masterUncollatedFileOperationTemplates.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::name(), and Foam::Pout.
|
protected |
Definition at line 114 of file masterUncollatedFileOperationTemplates.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), and Foam::Pout.
|
staticprotected |
Equivalent of Time::findInstance.
Definition at line 134 of file masterUncollatedFileOperation.C.
References Instant< T >::equal(), and forAllReverse.
|
protectedvirtual |
Search (locally!) for object; return info on how it was found.
Does not do any parallel communication. checkGlobal : also check undecomposed case isFile : true:check for file false:check for directory searchType : how was found processorsDir : name of processor directory instance : instance
Definition at line 159 of file masterUncollatedFileOperation.C.
References IOobject::caseName(), TimePaths::constant(), IOobject::db(), objectRegistry::dbDir(), TimePaths::globalCaseName(), IOobject::headerClassName(), IOobject::instance(), fileName::isAbsolute(), Foam::isFile(), IOobject::local(), IOobject::name(), IOobject::objectPath(), Time::path(), TimePaths::processorCase(), IOobject::rootPath(), Foam::search(), TimePaths::system(), and IOobject::time().
|
protected |
Construct filePath.
Definition at line 336 of file masterUncollatedFileOperation.C.
References IOobject::caseName(), IOobject::db(), objectRegistry::dbDir(), TimePaths::globalCaseName(), IOobject::headerClassName(), IOobject::instance(), IOobject::local(), Foam::name(), IOobject::name(), NotImplemented, IOobject::path(), IOobject::rootPath(), and IOobject::time().
Referenced by collatedFileOperation::objectPath().
|
staticprotected |
Read file contents and send to processors.
Handles compressed or uncompressed files
Definition at line 496 of file masterUncollatedFileOperation.C.
References bool, IOstreamOption::compression(), Foam::BitOps::count(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::fileSize(), IOstream::good(), os(), Foam::Pout, and IFstream::stdStream().
|
staticprotected |
Read files on comms master.
Definition at line 569 of file masterUncollatedFileOperation.C.
References DynamicList< T, SizeMin >::append(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, PstreamBuffers::finishedSends(), IOobject::name(), IOobject::objectPath(), Foam::Pout, UIPstream::read(), IOobject::readHeader(), and autoPtr< T >::reset().
|
protected |
Helper: check IO for local existence. Like filePathInfo but.
without parent searchign and instance searching
Definition at line 1387 of file masterUncollatedFileOperation.C.
References IOobject::instance(), Foam::isFile(), IOobject::name(), word::null, IOobject::objectPath(), TimePaths::processorCase(), and IOobject::time().
TypeName | ( | "masterUncollated" | ) |
Runtime type information.
Make directory.
Implements fileOperation.
Definition at line 827 of file masterUncollatedFileOperation.C.
References Foam::mode(), and UPstream::msgType().
Set the file mode.
Implements fileOperation.
Definition at line 843 of file masterUncollatedFileOperation.C.
References Foam::mode(), and UPstream::msgType().
Return the file mode.
Implements fileOperation.
Definition at line 859 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Return the file type: DIRECTORY, FILE or LINK.
Implements fileOperation.
Definition at line 875 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Does the name exist (as DIRECTORY or FILE) in the file system?
Optionally enable/disable check for gzip file.
Implements fileOperation.
Definition at line 894 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
Does the name exist as a DIRECTORY in the file system?
Implements fileOperation.
Definition at line 911 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Does the name exist as a FILE in the file system?
Optionally enable/disable check for gzip file.
Implements fileOperation.
Definition at line 927 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
Return size of file.
Implements fileOperation.
Definition at line 944 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
Return time of last file modification.
Implements fileOperation.
Definition at line 960 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
Return time of last file modification.
Implements fileOperation.
Definition at line 976 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Read a directory and return the entries as a string list.
Implements fileOperation.
Definition at line 1039 of file masterUncollatedFileOperation.C.
References UPstream::msgType(), and Foam::type().
Copy, recursively if necessary, the source to the destination.
Implements fileOperation.
Definition at line 1057 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
Create a softlink. dst should not exist. Returns true if.
successful.
Implements fileOperation.
Definition at line 1075 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
Rename src to dst.
Implements fileOperation.
Definition at line 1092 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
Rename to a corresponding backup file.
If the backup file already exists, attempt with "01" .. "99" suffix
Implements fileOperation.
Definition at line 992 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
Remove a file, returning true if successful otherwise false.
Implements fileOperation.
Definition at line 1008 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
Remove a directory and its contents.
silent | do not report missing directory |
Implements fileOperation.
Definition at line 1023 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Search for an object. checkGlobal : also check undecomposed case.
Implements fileOperation.
Definition at line 1110 of file masterUncollatedFileOperation.C.
References fileOperation::ABSOLUTE, TimePaths::constant(), Foam::expressions::patchExpr::debug, Foam::endl(), fileOperation::FINDINSTANCE, IOobject::local(), UPstream::master(), UPstream::msgType(), fileOperation::NOTFOUND, fileOperation::OBJECT, IOobject::objectPath(), fileOperation::PARENTOBJECT, UPstream::parRun(), Time::path(), fileOperation::pathTypeNames_, Foam::Pout, fileOperation::PROCBASEINSTANCE, fileOperation::PROCBASEOBJECT, fileOperation::PROCINSTANCE, fileOperation::PROCOBJECT, fileOperation::PROCUNCOLLATED, fileOperation::PROCUNCOLLATEDINSTANCE, Pstream::scatter(), Foam::search(), IOobject::time(), and fileOperation::WRITEOBJECT.
|
virtual |
Search for a directory. checkGlobal : also check undecomposed.
case
Implements fileOperation.
Definition at line 1259 of file masterUncollatedFileOperation.C.
References fileOperation::ABSOLUTE, Foam::expressions::patchExpr::debug, Foam::endl(), fileOperation::FINDINSTANCE, IOobject::local(), UPstream::master(), UPstream::msgType(), fileOperation::NOTFOUND, fileOperation::OBJECT, IOobject::objectPath(), fileOperation::PARENTOBJECT, UPstream::parRun(), Foam::Pout, fileOperation::PROCBASEINSTANCE, fileOperation::PROCBASEOBJECT, fileOperation::PROCINSTANCE, fileOperation::PROCOBJECT, fileOperation::PROCUNCOLLATED, fileOperation::PROCUNCOLLATEDINSTANCE, Pstream::scatter(), Foam::search(), and fileOperation::WRITEOBJECT.
|
virtual |
Search directory for objects. Used in IOobjectList.
Use non-time searching version
Reimplemented from fileOperation.
Definition at line 1641 of file masterUncollatedFileOperation.C.
References TimePaths::constant(), Foam::expressions::patchExpr::debug, Foam::endl(), Instant< T >::equal(), fileOperation::findTimes(), forAllReverse, UPstream::master(), Foam::name(), word::null, IOobject::objectPath(), UPstream::parRun(), Time::path(), Foam::Pout, fileOperation::readObjects(), Pstream::scatter(), and objectRegistry::time().
Read object header from supplied file.
Implements fileOperation.
Definition at line 1727 of file masterUncollatedFileOperation.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), forAll, Pstream::gatherList(), IOstream::good(), IOobject::headerClassName(), UPstream::master(), UPstream::msgType(), UPstream::myProcNo(), IOobject::note(), UPstream::nProcs(), IOobject::objectPath(), Foam::Pout, decomposedBlockData::readHeader(), Pstream::scatter(), List< T >::setSize(), and UPstream::worldComm.
|
virtual |
Reads header for regIOobject and returns an ISstream.
to read the contents.
Implements fileOperation.
Definition at line 1834 of file masterUncollatedFileOperation.C.
References autoPtr< T >::clear(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::fileSize(), Pstream::gatherList(), regIOobject::global(), autoPtr< T >::good(), Foam::constant::atomic::group, decomposedBlockData::isCollatedType(), UPstream::master(), UPstream::msgType(), UPstream::myProcNo(), IOobject::name(), UPstream::nonBlocking, UPstream::nProcs(), IOobject::objectPath(), UPstream::parRun(), path(), Foam::Pout, Foam::read(), decomposedBlockData::readBlock(), decomposedBlockData::readBlocks(), IOobject::readHeader(), autoPtr< T >::reset(), Pstream::scatter(), UPstream::scheduled, and UPstream::worldComm.
|
virtual |
Top-level read.
Implements fileOperation.
Definition at line 2041 of file masterUncollatedFileOperation.C.
References UPstream::commsStruct::above(), UPstream::commsStruct::below(), regIOobject::close(), Foam::expressions::patchExpr::debug, Foam::endl(), forAll, format(), IOobject::globalObject(), IOobject::headerClassName(), UPstream::linearCommunication(), UPstream::master(), UPstream::msgType(), UPstream::myProcNo(), IOobject::name(), IOobject::note(), UPstream::nProcs(), UPstream::nProcsSimpleSum, UPstream::parRun(), Foam::Pout, regIOobject::readData(), Pstream::scatter(), UPstream::scheduled, UPstream::treeCommunication(), UPstream::worldComm, and regIOobject::writeData().
|
virtual |
Writes a regIOobject (so header, contents and divider).
Returns success state.
Reimplemented from fileOperation.
Reimplemented in collatedFileOperation.
Definition at line 2142 of file masterUncollatedFileOperation.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), IOobject::objectPath(), os(), Foam::Pout, setTime(), IOobject::time(), regIOobject::writeData(), IOobject::writeEndDivider(), and IOobject::writeHeader().
|
virtual |
Generate an ISstream that reads a file.
Implements fileOperation.
Definition at line 2292 of file masterUncollatedFileOperation.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), PstreamBuffers::finishedSends(), Pstream::gatherList(), Foam::identity(), UPstream::master(), UPstream::masterNo(), UPstream::msgType(), UPstream::myProcNo(), UPstream::nonBlocking, UPstream::nProcs(), UPstream::parRun(), Foam::Pout, UIPstream::read(), autoPtr< T >::reset(), UPstream::subProcs(), and UPstream::worldComm.
|
virtual |
Generate an OSstream that writes a file.
Implements fileOperation.
Definition at line 2398 of file masterUncollatedFileOperation.C.
|
virtual |
Add watching of a file. Returns handle.
Reimplemented from fileOperation.
Definition at line 2425 of file masterUncollatedFileOperation.C.
References UPstream::master(), and Pstream::scatter().
|
virtual |
Remove watch on a file (using handle)
Reimplemented from fileOperation.
Definition at line 2440 of file masterUncollatedFileOperation.C.
References UPstream::master(), and Pstream::scatter().
Find index (or -1) of file in list of handles.
Reimplemented from fileOperation.
Definition at line 2455 of file masterUncollatedFileOperation.C.
References forAll, UPstream::master(), and Pstream::scatter().
|
virtual |
Helper: add watches for list of regIOobjects.
Reimplemented from fileOperation.
Definition at line 2479 of file masterUncollatedFileOperation.C.
References DynamicList< T, SizeMin >::append(), f(), and regIOobject::watchIndices().
|
virtual |
Get name of file being watched (using handle)
Reimplemented from fileOperation.
Definition at line 2516 of file masterUncollatedFileOperation.C.
References UPstream::master(), and Pstream::scatter().
Update state of all files.
Reimplemented from fileOperation.
Definition at line 2531 of file masterUncollatedFileOperation.C.
References UPstream::master().
|
virtual |
Get current state of file (using handle)
Reimplemented from fileOperation.
Definition at line 2545 of file masterUncollatedFileOperation.C.
References UPstream::master(), Pstream::scatter(), and fileMonitor::UNMODIFIED.
|
virtual |
Set current state of file (using handle) to unmodified.
Reimplemented from fileOperation.
Definition at line 2560 of file masterUncollatedFileOperation.C.
References UPstream::master().
|
static |
Same file?
Definition at line 478 of file masterUncollatedFileOperation.C.
|
virtual |
Get sorted list of times.
Reimplemented from fileOperation.
Definition at line 2184 of file masterUncollatedFileOperation.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), fileOperation::findTimes(), UPstream::master(), Foam::nl, UPstream::parRun(), Foam::Pout, and Pstream::scatter().
|
virtual |
Find instance where IOobject is. Fails if cannot be found.
and readOpt() is MUST_READ/MUST_READ_IF_MODIFIED. Otherwise returns stopInstance.
Reimplemented from fileOperation.
Definition at line 1436 of file masterUncollatedFileOperation.C.
References TimePaths::constant(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::exists(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, IOobject::instance(), IOobject::local(), UPstream::master(), UPstream::msgType(), IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED, Foam::name(), IOobject::name(), IOobject::objectPath(), UPstream::parRun(), Foam::Pout, IOobject::readOpt(), Pstream::scatter(), IOobject::time(), Time::timeName(), TimePaths::times(), and UPstream::worldComm.
|
virtual |
Callback for time change.
Reimplemented from fileOperation.
Definition at line 2232 of file masterUncollatedFileOperation.C.
References List< T >::append(), TimePaths::constant(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::findSortedIndex(), Time::path(), Foam::Pout, fileOperation::setTime(), Foam::stableSort(), Time::subCycling(), Time::timeName(), and dimensioned< Type >::value().
|
virtual |
Forcibly wait until all output done. Flush any cached data.
Reimplemented from fileOperation.
Reimplemented in collatedFileOperation.
Definition at line 2417 of file masterUncollatedFileOperation.C.
References fileOperation::flush().
Referenced by collatedFileOperation::flush().
|
inline |
Return cached times.
Definition at line 765 of file masterUncollatedFileOperation.H.
References masterUncollatedFileOperation::times_.
|
protected |
Any communicator allocated by me.
Definition at line 93 of file masterUncollatedFileOperation.H.
Referenced by masterUncollatedFileOperation::~masterUncollatedFileOperation().
|
mutableprotected |
Cached times for a given directory.
Definition at line 96 of file masterUncollatedFileOperation.H.
Referenced by masterUncollatedFileOperation::times().
|
static |
Max size of parallel communications. Switches from non-blocking.
to scheduled when reading/writing files. Read as float to enable easy specification of large sizes.
Definition at line 484 of file masterUncollatedFileOperation.H.