37namespace fileOperations
62Foam::labelList Foam::fileOperations::hostCollatedFileOperation::subRanks
67 DynamicList<label> subRanks(64);
70 if (!mainRanks.empty())
72 if (!mainRanks.found(0))
75 <<
"Rank 0 (master) should be in the IO ranks. Currently "
81 const bitSet isIOrank(
n, mainRanks);
92 rank <
n && !isIOrank[rank];
105 const string myHostName(
hostName());
114 if (hosts[proci] == myHostName)
Macros for easy insertion into run-time selection tables.
#define addNamedToRunTimeSelectionTable(baseType, thisType, argNames, lookupName)
Add to construction table with 'lookupName' as the key.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
void append(const T &val)
Append an element at the end of the list.
label nProcs() const noexcept
Number of ranks associated with PstreamBuffers.
Inter-processor communications stream.
static void allGatherList(const List< commsStruct > &comms, List< T > &values, const int tag, const label comm)
void size(const label n)
Older name for setAddressableSize.
Inter-processor communications stream.
static void freeCommunicator(const label communicator, const bool doPstream=true)
Free a previously allocated communicator.
static label worldComm
Default communicator (all processors)
An encapsulation of filesystem-related operations.
static labelList ioRanks()
Retrieve list of IO ranks from FOAM_IORANKS env variable.
Version of masterUncollatedFileOperation that collates regIOobjects into a container in the processor...
const labelList ioRanks_
Ranks of IO handlers.
void printBanner(const bool printRanks=false) const
Print banner information, optionally with io ranks.
Version of collatedFileOperation with multiple read/write ranks.
virtual ~hostCollatedFileOperation()
Destructor.
int myProcNo() const noexcept
Return processor number.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< label > labelList
A List of labels.
string hostName()
Return the system's host name, as per hostname(1)
int infoDetailLevel
Global for selective suppression of Info output.
List< string > stringList
A List of strings.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.