40 <<
"Cannot all-gather values for non-contiguous types" <<
endl 59 allValues[0] = localValue;
76 <<
"Cannot gather values for non-contiguous types" <<
endl 92 reinterpret_cast<const char*>(&localValue),
93 allValues.data_bytes(),
103 allValues[0] = localValue;
120 <<
"Cannot scatter values for non-contiguous types" <<
endl 134 <<
"Attempting to send " << allValues.
size()
135 <<
" values to " << nproc <<
" processors" <<
endl 142 reinterpret_cast<char*
>(&localValue),
153 localValue = allValues[0];
void size(const label n)
Older name for setAddressableSize.
void resize(const label len)
Adjust allocated size of list.
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.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool empty() const noexcept
True if List is empty (ie, size() is zero)
static List< T > listGatherValues(const T &localValue, const label communicator=worldComm)
Gather individual values into list locations.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void mpiAllGather(char *allData, int count, const label communicator=worldComm)
Gather/scatter identically-sized char data.
static List< T > allGatherValues(const T &localValue, const label communicator=worldComm)
Allgather individual values into list locations.
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Can be negative if the process i...
char * data_bytes() noexcept
Return pointer to the underlying array serving as data storage,.
const char * cdata_bytes() const noexcept
Return pointer to the underlying array serving as data storage,.
static label nProcs(const label communicator=worldComm)
Number of ranks in parallel run (for given communicator). It is 1 for serial run. ...
static bool is_rank(const label communicator=worldComm)
True if process corresponds to any rank (master or sub-rank) in the given communicator.
static bool is_parallel(const label communicator=worldComm)
True if parallel algorithm or exchange is required.
static void mpiGather(const char *sendData, char *recvData, int count, const label communicator=worldComm)
Receive identically-sized char data from all ranks.
errorManip< error > abort(error &err)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
static void mpiScatter(const char *sendData, char *recvData, int count, const label communicator=worldComm)
Send identically-sized char data to all ranks.
A template class to specify that a data type can be considered as being contiguous in memory...
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
static T listScatterValues(const UList< T > &allValues, const label communicator=worldComm)
Scatter individual values from list locations.
static constexpr const zero Zero
Global zero (0)