TECA
The Toolkit for Extreme Climate Analysis
teca_mpi_util Namespace Reference

Codes dealing with MPI. More...

Functions

TECA_EXPORT int equipartition_communicator (MPI_Comm comm, int new_comm_size, MPI_Comm *new_comm)
 
TECA_EXPORT int split_communicator (MPI_Comm comm, int group_size, MPI_Comm *new_comm)
 
TECA_EXPORT int mpi_rank_0 (MPI_Comm comm)
 return non-zero if this process is MPI rank 0 More...
 

Detailed Description

Codes dealing with MPI.

Function Documentation

◆ equipartition_communicator()

TECA_EXPORT int teca_mpi_util::equipartition_communicator ( MPI_Comm  comm,
int  new_comm_size,
MPI_Comm *  new_comm 
)

Subset the the communicator comm into a new communicator with new_comm_size ranks. ranks are selected from comm with a uniform stride spreading them approximatelyt equally across nodes.

◆ mpi_rank_0()

TECA_EXPORT int teca_mpi_util::mpi_rank_0 ( MPI_Comm  comm)

return non-zero if this process is MPI rank 0

◆ split_communicator()

TECA_EXPORT int teca_mpi_util::split_communicator ( MPI_Comm  comm,
int  group_size,
MPI_Comm *  new_comm 
)

Split the communicator into a number of new communicators such that each new communicator has group_size ranks.