Utility class for managing intra-participant communication operations.
More...
#include <IntraComm.hpp>
|
static void | configure (Rank rank, int size) |
| Configures the intra-participant communication.
|
|
static Rank | getRank () |
| Current rank.
|
|
static int | getSize () |
| Number of ranks. This includes ranks from both participants, e.g. minimal size is 2.
|
|
static com::PtrCommunication & | getCommunication () |
| Intra-participant communication.
|
|
static auto | allSecondaryRanks () |
| Returns an iterable range over salve ranks [1, _size)
|
|
static auto | allRanks () |
| Returns an iterable range over all ranks [0, _size)
|
|
static bool | isPrimary () |
| True if this process is running the primary rank.
|
|
static bool | isSecondary () |
| True if this process is running a secondary rank.
|
|
static bool | isParallel () |
| True if this process is running in parallel.
|
|
static double | l2norm (const Eigen::VectorXd &vec) |
| The l2 norm of a vector is calculated on distributed data.
|
|
static double | dot (const Eigen::VectorXd &vec1, const Eigen::VectorXd &vec2) |
|
static void | reset () |
|
static void | reduceSum (precice::span< const double > sendData, precice::span< double > rcvData) |
|
static void | reduceSum (const int &sendData, int &rcvData) |
|
static void | reduceSum (const double &sendData, double &rcvData) |
|
static void | allreduceSum (precice::span< const double > sendData, precice::span< double > rcvData) |
|
static void | allreduceSum (double &sendData, double &rcvData) |
|
static void | allreduceSum (int &sendData, int &rcvData) |
|
static void | broadcast (bool &value) |
|
static void | broadcast (double &value) |
|
static void | broadcast (int &value) |
|
static void | broadcast (precice::span< double > values) |
|
static void | synchronize () |
|
static void | barrier () |
| Synchronizes all ranks.
|
|
Utility class for managing intra-participant communication operations.
Definition at line 19 of file IntraComm.hpp.
◆ allRanks()
static auto precice::utils::IntraComm::allRanks |
( |
| ) |
|
|
inlinestatic |
Returns an iterable range over all ranks [0, _size)
Definition at line 43 of file IntraComm.hpp.
◆ allreduceSum() [1/3]
void precice::utils::IntraComm::allreduceSum |
( |
double & | sendData, |
|
|
double & | rcvData ) |
|
static |
◆ allreduceSum() [2/3]
void precice::utils::IntraComm::allreduceSum |
( |
int & | sendData, |
|
|
int & | rcvData ) |
|
static |
◆ allreduceSum() [3/3]
◆ allSecondaryRanks()
static auto precice::utils::IntraComm::allSecondaryRanks |
( |
| ) |
|
|
inlinestatic |
Returns an iterable range over salve ranks [1, _size)
Definition at line 37 of file IntraComm.hpp.
◆ barrier()
void precice::utils::IntraComm::barrier |
( |
| ) |
|
|
static |
◆ broadcast() [1/4]
void precice::utils::IntraComm::broadcast |
( |
bool & | value | ) |
|
|
static |
◆ broadcast() [2/4]
void precice::utils::IntraComm::broadcast |
( |
double & | value | ) |
|
|
static |
◆ broadcast() [3/4]
void precice::utils::IntraComm::broadcast |
( |
int & | value | ) |
|
|
static |
◆ broadcast() [4/4]
void precice::utils::IntraComm::broadcast |
( |
precice::span< double > | values | ) |
|
|
static |
◆ configure()
void precice::utils::IntraComm::configure |
( |
Rank | rank, |
|
|
int | size ) |
|
static |
Configures the intra-participant communication.
Definition at line 31 of file IntraComm.cpp.
◆ dot()
double precice::utils::IntraComm::dot |
( |
const Eigen::VectorXd & | vec1, |
|
|
const Eigen::VectorXd & | vec2 ) |
|
static |
◆ getCommunication()
Intra-participant communication.
Definition at line 31 of file IntraComm.hpp.
◆ getRank()
Rank precice::utils::IntraComm::getRank |
( |
| ) |
|
|
static |
◆ getSize()
int precice::utils::IntraComm::getSize |
( |
| ) |
|
|
static |
Number of ranks. This includes ranks from both participants, e.g. minimal size is 2.
Definition at line 47 of file IntraComm.cpp.
◆ isParallel()
bool precice::utils::IntraComm::isParallel |
( |
| ) |
|
|
static |
True if this process is running in parallel.
Definition at line 62 of file IntraComm.cpp.
◆ isPrimary()
bool precice::utils::IntraComm::isPrimary |
( |
| ) |
|
|
static |
True if this process is running the primary rank.
Definition at line 52 of file IntraComm.cpp.
◆ isSecondary()
bool precice::utils::IntraComm::isSecondary |
( |
| ) |
|
|
static |
True if this process is running a secondary rank.
Definition at line 57 of file IntraComm.cpp.
◆ l2norm()
double precice::utils::IntraComm::l2norm |
( |
const Eigen::VectorXd & | vec | ) |
|
|
static |
The l2 norm of a vector is calculated on distributed data.
Definition at line 67 of file IntraComm.cpp.
◆ reduceSum() [1/3]
void precice::utils::IntraComm::reduceSum |
( |
const double & | sendData, |
|
|
double & | rcvData ) |
|
static |
◆ reduceSum() [2/3]
void precice::utils::IntraComm::reduceSum |
( |
const int & | sendData, |
|
|
int & | rcvData ) |
|
static |
◆ reduceSum() [3/3]
◆ reset()
void precice::utils::IntraComm::reset |
( |
| ) |
|
|
static |
◆ synchronize()
void precice::utils::IntraComm::synchronize |
( |
| ) |
|
|
static |
◆ _communication
◆ _isPrimaryRank
bool precice::utils::IntraComm::_isPrimaryRank = false |
|
staticprivate |
True if this process is running the primary rank.
Definition at line 104 of file IntraComm.hpp.
◆ _isSecondaryRank
bool precice::utils::IntraComm::_isSecondaryRank = false |
|
staticprivate |
True if this process is running a secondary rank.
Definition at line 107 of file IntraComm.hpp.
◆ _log
◆ _rank
Rank precice::utils::IntraComm::_rank = -1 |
|
staticprivate |
◆ _size
int precice::utils::IntraComm::_size = -1 |
|
staticprivate |
Number of ranks. This includes ranks from both participants, e.g. minimal size is 2.
Definition at line 101 of file IntraComm.hpp.
The documentation for this class was generated from the following files: