Go to the documentation of this file.
36 namespace fileOperations
42 hostCollatedFileOperation,
51 hostCollatedFileOperationInitialise,
61 Foam::labelList Foam::fileOperations::hostCollatedFileOperation::subRanks
66 DynamicList<label> subRanks(64);
68 string ioRanksString(
getEnv(
"FOAM_IORANKS"));
69 if (!ioRanksString.empty())
71 IStringStream is(ioRanksString);
77 <<
"Rank 0 (master) should be in the IO ranks. Currently "
93 rank <
n && !isIOrank[rank];
106 const string myHostName(
hostName());
116 if (hosts[proci] == myHostName)
157 Info<<
" IO nodes:" <<
nl;
158 for (
const string& ranks : ioRanks)
162 Info<<
" " << ranks <<
nl;
List< label > labelList
A List of labels.
hostCollatedFileOperation(const bool verbose)
Construct null.
static labelList ioRanks()
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static bool & parRun()
Is this a parallel run?
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.
string getEnv(const std::string &envName)
Get environment value for given envName.
#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.
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
virtual ~hostCollatedFileOperation()
Destructor.
pid_t pid()
Return the PID of this process.
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...
int infoDetailLevel
Global for selective suppression of Info output.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
static bool master(const label communicator=0)
Am I the master process.
#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 label worldComm
Default communicator (all processors)
string hostName(const bool full=false)
Return the system's host name, as per hostname(1)
defineTypeNameAndDebug(collatedFileOperation, 0)