BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
commtools.cpp File Reference
#include <cstring>
#include <cstdlib>
#include "commtools.hpp"
#include "cl_StringList.hpp"
Include dependency graph for commtools.cpp:

Namespaces

namespace  belfem
 USER GUIDES:

Functions

proc_t belfem::comm_size ()
 Returns the number of processes in the communicator.
proc_t belfem::comm_rank ()
 Returns the rank of the current process in the communicator.
void belfem::comm_check (const int aErrorCode)
 Checks the MPI error code and reports any errors.
void belfem::comm_barrier ()
 Synchronizes all processes in the communicator.
void belfem::comm_abort (const int aErrorCode=1)
 Kill the whole job.
int belfem::comm_tag (const proc_t aSource, const proc_t aTarget)
 Generates a unique tag for MPI communication between two processes.
void belfem::comm_drain_check (const char *aLabel)
 Debug-build tripwire for the two-tags-per-pair ordering contract of the point-to-point fabric ( see comm_tag() in commtools.cpp ).
Cell< int > belfem::comm_split (const index_t aLength)
 Splits a message into chunks for MPI communication.
index_t belfem::comm_splitcount (const Vector< index_t > &aLengths, const proc_t aRoot)
 Calculates the total number of chunks needed for a set of message lengths.
index_t belfem::comm_splitcount (index_t aLength)
void belfem::broadcast (Cell< string > &aData, const proc_t aRoot)
void belfem::send (const string &aMessage, const proc_t aTarget)
void belfem::receive (string &aMessage, const proc_t aSource)