37 namespace fileOperations
43 hostCollatedFileOperation,
51 fileOperationInitialise,
52 hostCollatedFileOperationInitialise,
62 Foam::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)
126 void Foam::fileOperations::hostCollatedFileOperation::init(
bool verbose)
132 this->printBanner(ioRanks_.size());
142 collatedFileOperation
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void append(const T &val)
Append an element at the end of the list.
int infoDetailLevel
Global for selective suppression of Info output.
constexpr char nl
The newline '\n' character (0x0a)
static int myProcNo(const label communicator=worldComm)
Number of this process (starting from masterNo() = 0)
Macros for easy insertion into run-time selection tables.
addNamedToRunTimeSelectionTable(fileOperationInitialise, collatedFileOperationInitialise, word, collated)
#define forAll(list, i)
Loop across all elements in list.
addToRunTimeSelectionTable(fileOperation, collatedFileOperation, word)
static void allGatherList(List< T > &values, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Gather data, but keep individual values separate. Uses linear/tree communication. ...
static label nProcs(const label communicator=worldComm)
Number of ranks in parallel run (for given communicator) is 1 for serial run.
Inter-processor communications stream.
string hostName()
Return the system's host name, as per hostname(1)
static bool isUserComm(label communicator) noexcept
True if communicator appears to be user-allocated.
hostCollatedFileOperation(const bool verbose)
Default construct.
List< string > stringList
A List of strings.
virtual ~hostCollatedFileOperation()
Destructor.
defineTypeNameAndDebug(collatedFileOperation, 0)
List< label > labelList
A List of labels.
static labelList ioRanks()
Retrieve list of IO ranks from FOAM_IORANKS env variable.
Inter-processor communications stream.
static void freeCommunicator(const label communicator, const bool doPstream=true)
Free a previously allocated communicator.