MPI support functionality.
More...
|
int | rank (MPI_Comm comm) |
| Return process rank for the communicator.
|
|
int | size (MPI_Comm comm) |
| Return size of the group (number of processes) associated with the communicator.
|
|
template<typename T > |
graph::AdjacencyList< T > | all_to_all (MPI_Comm comm, const graph::AdjacencyList< T > &send_data) |
| Send in_values[p0] to process p0 and receive values from process p1 in out_values[p1].
|
|
std::vector< int > | compute_graph_edges (MPI_Comm comm, const std::set< int > &edges) |
|
template<typename T > |
graph::AdjacencyList< T > | neighbor_all_to_all (MPI_Comm neighbor_comm, const graph::AdjacencyList< T > &send_data) |
| Neighborhood all-to-all. Send data to neighbors. Send in_values[n0] to neighbor process n0 and receive values from neighbor process n1 in out_values[n1].
|
|
std::tuple< std::vector< int >, std::vector< int > > | neighbors (MPI_Comm neighbor_comm) |
|
constexpr std::array< std::int64_t, 2 > | local_range (int rank, std::int64_t N, int size) |
| Return local range for given process, splitting [0, N - 1] into size() portions of almost equal size. More...
|
|
constexpr int | index_owner (int size, std::size_t index, std::size_t N) |
| Return which process owns index (inverse of local_range) More...
|
|
template<typename T > |
constexpr MPI_Datatype | mpi_type () |
| MPI Type.
|
|
MPI support functionality.
◆ compute_graph_edges()
std::vector< int > dolfinx::MPI::compute_graph_edges |
( |
MPI_Comm |
comm, |
|
|
const std::set< int > & |
edges |
|
) |
| |
- Todo:
- Experimental. Maybe be moved or removed.
Compute communication graph edges. The caller provides edges that it can define, and will receive edges to it that are defined by other ranks.
- Note
- This function involves global communication
- Parameters
-
[in] | comm | The MPI communicator |
[in] | edges | Communication edges between the caller and the ranks in edges . |
- Returns
- Ranks that have defined edges from them to this rank
◆ index_owner()
constexpr int dolfinx::MPI::index_owner |
( |
int |
size, |
|
|
std::size_t |
index, |
|
|
std::size_t |
N |
|
) |
| |
|
constexpr |
Return which process owns index (inverse of local_range)
- Parameters
-
[in] | size | Number of MPI ranks |
[in] | index | The index to determine owning rank |
[in] | N | Total number of indices |
- Returns
- The rank of the owning process
◆ local_range()
constexpr std::array<std::int64_t, 2> dolfinx::MPI::local_range |
( |
int |
rank, |
|
|
std::int64_t |
N, |
|
|
int |
size |
|
) |
| |
|
constexpr |
Return local range for given process, splitting [0, N - 1] into size() portions of almost equal size.
- Parameters
-
[in] | rank | MPI rank of the caller |
[in] | N | The value to partition |
[in] | size | The number of MPI ranks across which to partition N |
◆ neighbors()
std::tuple< std::vector< int >, std::vector< int > > dolfinx::MPI::neighbors |
( |
MPI_Comm |
neighbor_comm | ) |
|
- Todo:
- Clarify directions
Return list of neighbors for a neighborhood communicator
- Parameters
-
[in] | neighbor_comm | Neighborhood communicator |
- Returns
- source ranks, destination ranks