36 namespace fileOperations
42 hostUncollatedFileOperation,
48 hostUncollatedFileOperation,
55 fileOperationInitialise,
56 fileOperationInitialise_unthreaded,
95 return commAndIORanks;
103 void Foam::fileOperations::hostUncollatedFileOperation::init(
bool verbose)
110 <<
"I/O : " << this->
type() <<
nl;
125 masterUncollatedFileOperation
131 managedComm_(getManagedComm(comm_))
140 const bool distributedRoots,
159 managedComm_ = getManagedComm(comm_);
void size(const label n)
Older name for setAddressableSize.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
static labelList getGlobalHostIORanks()
Get list of global IO master ranks based on the hostname. It is assumed that each host range is conti...
static void freeCommunicator(const label communicator, const bool withComponents=true)
Free a previously allocated communicator.
int infoDetailLevel
Global for selective suppression of Info output.
constexpr char nl
The newline '\n' character (0x0a)
bool empty() const noexcept
True if List is empty (ie, size() is zero)
static bool & parRun() noexcept
Test if this a parallel run.
static label worldComm
Communicator for all ranks. May differ from commGlobal() if local worlds are in use.
Macros for easy insertion into run-time selection tables.
hostUncollatedFileOperation(bool verbose=false)
Default construct.
addToRunTimeSelectionTable(fileOperation, collatedFileOperation, word)
addNamedToRunTimeSelectionTable(fileOperationInitialise, fileOperationInitialise_collated, word, collated)
static Tuple2< label, labelList > getCommPattern()
static labelRange subRanks(const labelUList &mainIOranks)
Get (contiguous) range/bounds of ranks addressed within the given main io-ranks.
Ostream & flush(Ostream &os)
Flush stream.
void printRanks() const
Helper: output which ranks are IO.
const T2 & second() const noexcept
Access the second element.
const labelList ioRanks_
The list of IO ranks (global ranks)
virtual ~hostUncollatedFileOperation()
Destructor.
virtual void storeComm() const
Transfer ownership of communicator to this fileOperation. Use with caution.
virtual fileName::Type type(const fileName &, const bool followLink=true) const
Return the file type: DIRECTORY, FILE or SYMLINK.
static labelList getGlobalIORanks()
Get list of global IO ranks from FOAM_IORANKS env variable. If set, these correspond to the IO master...
defineTypeNameAndDebug(collatedFileOperation, 0)
const T1 & first() const noexcept
Access the first element.
fileOperations that performs all file operations on the master processor. Requires the calls to be pa...
static label allocateCommunicator(const label parent, const labelRange &subRanks, const bool withComponents=true)
Allocate new communicator with contiguous sub-ranks on the parent communicator.