ECP-VELOC Components
User documentation for all components
|
Split mpi ranks into different communicators given a string. More...
Go to the source code of this file.
Functions | |
void | rankstr_mpi (const char *str, MPI_Comm comm, int tag1, int tag2, int *groups, int *groupid) |
void | rankstr_mpi_comm_split (MPI_Comm comm, const char *str, int key, int tag1, int tag2, MPI_Comm *newcomm) |
void rankstr_mpi | ( | const char * | str, |
MPI_Comm | comm, | ||
int | tag1, | ||
int | tag2, | ||
int * | groups, | ||
int * | groupid | ||
) |
Given a communicator and a string, compute number of unique strings across all procs in comm and compute an id for input string such that the id value matches another process if and only if that process specified an identical string. The groupid value will range from 0 to groups-1.
[in] | str | [IN] - input string (pointer) |
[in] | comm | [IN] - communicator of processes (handle) |
[in] | tag1 | [IN] - tag to use for point-to-point communication on comm |
[in] | tag2 | [IN] - another tag, distinct from tag1, for point-to-point on comm |
[out] | groups | [OUT] - number of unique strings (non-negative integer) |
[out] | groupid | [OUT] - id for input string (non-negative integer) |
void rankstr_mpi_comm_split | ( | MPI_Comm | comm, |
const char * | str, | ||
int | key, | ||
int | tag1, | ||
int | tag2, | ||
MPI_Comm * | newcomm | ||
) |
split input comm into sub communicators, each of which contains all procs specifying the same value of str, and reordered according to key, ranks providing str == NULL will return newcomm == MPI_COMM_NULL
[in] | comm | [IN] - communicator of processes (handle) |
[in] | str | [IN] - input string (pointer) |
[in] | key | [IN] - key to order ranks in new communicator |
[in] | tag1 | [IN] - tag to use for point-to-point communication on comm |
[in] | tag2 | [IN] - another tag, distinct from tag1, for point-to-point on comm |
[out] | newcomm | [OUT] - output communicator |