Go to the documentation of this file.
37 namespace fileOperations
43 hostCollatedFileOperation,
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());
115 if (hosts[proci] == myHostName)
146 this->printBanner(ioRanks_.size());
List< label > labelList
A List of labels.
hostCollatedFileOperation(const bool verbose)
Default construct.
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
addNamedToRunTimeSelectionTable(fileOperationInitialise, collatedFileOperationInitialise, word, collated)
void append(const T &val)
Append an element at the end of the list.
List< string > stringList
A List of strings.
#define forAll(list, i)
Loop across all elements in list.
static label allocateCommunicator(const label parent, const labelList &subRanks, const bool doPstream=true)
Allocate a new communicator.
virtual ~hostCollatedFileOperation()
Destructor.
addToRunTimeSelectionTable(fileOperation, collatedFileOperation, word)
static void freeCommunicator(const label communicator, const bool doPstream=true)
Free a previously allocated communicator.
Macros for easy insertion into run-time selection tables.
Version of masterUncollatedFileOperation that collates regIOobjects into a container in the processor...
General fileOperation initialiser. Handles -ioRanks option, using it to set the FOAM_IORANKS environm...
int infoDetailLevel
Global for selective suppression of Info output.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
static int myProcNo(const label communicator=worldComm)
Number of this process (starting from masterNo() = 0)
static label worldComm
Default communicator (all processors)
static bool & parRun() noexcept
Test if this a parallel run.
string hostName(bool full=false)
Return the system's host name, as per hostname(1)
static labelList ioRanks()
Retrieve list of IO ranks from FOAM_IORANKS env variable.
static label nProcs(const label communicator=worldComm)
Number of processes in parallel run, and 1 for serial run.
defineTypeNameAndDebug(collatedFileOperation, 0)