ezarpack/mpi/mpi_util.hpp
- MPI utility functions¶
-
inline int ezarpack::mpi::size(MPI_Comm const &comm)¶
Get size of an MPI communicator.
- Parameters:
comm – MPI communicator.
-
inline int ezarpack::mpi::rank(MPI_Comm const &comm)¶
Get rank of the calling process within an MPI communicator.
- Parameters:
comm – MPI communicator.
-
inline int ezarpack::mpi::compute_local_block_size(int N, int comm_size, int comm_rank)¶
Compute the size of a vector block owned by an MPI process for the most even distribution of the vector among all processes.
- Parameters:
N – size of the full vector.
comm_size – Size of the MPI communicator.
comm_rank – Rank within the MPI communicator.
-
inline int ezarpack::mpi::compute_local_block_start(int N, int comm_size, int comm_rank)¶
Compute the starting index of a vector block owned by an MPI process for the most even distribution of the vector among all processes.
- Parameters:
N – size of the full vector.
comm_size – Size of the MPI communicator.
comm_rank – Rank within the MPI communicator.