TECA
The Toolkit for Extreme Climate Analysis
teca_mpi_util.h
Go to the documentation of this file.
1
#ifndef teca_mpi_util_h
2
#define teca_mpi_util_h
3
4
/// @file
5
6
#include "teca_mpi.h"
7
8
/// Codes dealing with MPI
9
namespace
teca_mpi_util
10
{
11
/** Subset the the communicator comm into a new communicator with new_comm_size
12
* ranks. ranks are selected from comm with a uniform stride spreading them
13
* approximatelyt equally across nodes.
14
*/
15
int
equipartition_communicator
(MPI_Comm comm,
16
int
new_comm_size, MPI_Comm *new_comm);
17
18
/** Split the communicator into a number of new communicators such that each
19
* new communicator has group_size ranks.
20
*/
21
int
split_communicator
(MPI_Comm comm,
22
int
group_size, MPI_Comm *new_comm);
23
24
/// return non-zero if this process is MPI rank 0
25
int
mpi_rank_0
(MPI_Comm comm);
26
};
27
28
#endif
teca_mpi_util::mpi_rank_0
int mpi_rank_0(MPI_Comm comm)
return non-zero if this process is MPI rank 0
teca_mpi_util::equipartition_communicator
int equipartition_communicator(MPI_Comm comm, int new_comm_size, MPI_Comm *new_comm)
teca_mpi_util::split_communicator
int split_communicator(MPI_Comm comm, int group_size, MPI_Comm *new_comm)
teca_mpi_util
Codes dealing with MPI.
Definition:
teca_mpi_util.h:9
rtd_doxygen
core
teca_mpi_util.h
Generated on Thu Oct 14 2021 20:46:27 for TECA by
1.8.17