libsc
2.8.7
The SC library provides support for parallel scientific applications.
|
Self-contained implementation of MPI_Allgather. More...
#include <sc.h>
Go to the source code of this file.
Macros | |
#define | SC_ALLGATHER_ALLTOALL_MAX 5 |
The largest group size that uses direct all-to-all. | |
Functions | |
void | sc_allgather_alltoall (sc_MPI_Comm mpicomm, char *data, int datasize, int groupsize, int myoffset, int myrank) |
Allgather by direct point-to-point communication. More... | |
void | sc_allgather_recursive (sc_MPI_Comm mpicomm, char *data, int datasize, int groupsize, int myoffset, int myrank) |
Perform recursive bisection allgather. More... | |
int | sc_allgather (void *sendbuf, int sendcount, sc_MPI_Datatype sendtype, void *recvbuf, int recvcount, sc_MPI_Datatype recvtype, sc_MPI_Comm mpicomm) |
Drop-in allgather replacement. More... | |
Self-contained implementation of MPI_Allgather.
The algorithm uses a binary communication tree. The recursion terminates at a specified depth by an all-to-all step.
int sc_allgather | ( | void * | sendbuf, |
int | sendcount, | ||
sc_MPI_Datatype | sendtype, | ||
void * | recvbuf, | ||
int | recvcount, | ||
sc_MPI_Datatype | recvtype, | ||
sc_MPI_Comm | mpicomm | ||
) |
Drop-in allgather replacement.
[in] | sendbuf | Send buffer conforming to MPI specification. |
[in] | sendcount | Number of data items to send. |
[in] | sendtype | Valid MPI Datatype. |
[out] | recvbuf | Receive buffer conforming to MPI specification. |
[in] | recvcount | Number of data items to receive. |
[in] | recvtype | Valid MPI Datatype. |
[in] | mpicomm | Valid MPI communicator. |
void sc_allgather_alltoall | ( | sc_MPI_Comm | mpicomm, |
char * | data, | ||
int | datasize, | ||
int | groupsize, | ||
int | myoffset, | ||
int | myrank | ||
) |
Allgather by direct point-to-point communication.
This function is only efficient for small group sizes.
[in] | mpicomm | Valid MPI communicator. |
[in,out] | data | Send and receive buffer for a subgroup of the communicator. |
[in] | datasize | Number of bytes to send. |
[in] | groupsize | Number of processes in the subgroup. |
[in] | myoffset | Offset of the subgroup in the communicator. |
[in] | myrank | MPI rank in the communicator. |
void sc_allgather_recursive | ( | sc_MPI_Comm | mpicomm, |
char * | data, | ||
int | datasize, | ||
int | groupsize, | ||
int | myoffset, | ||
int | myrank | ||
) |
Perform recursive bisection allgather.
When size becomes less equal SC_ALLGATHER_ALLTOALL_MAX, call sc_allgather_alltoall.
[in] | mpicomm | Valid MPI communicator. |
[in,out] | data | Send and receive buffer for a subgroup of the communicator. |
[in] | datasize | Number of bytes to send. |
[in] | groupsize | Number of processes in the subgroup. |
[in] | myoffset | Offset of the subgroup in the communicator. |
[in] | myrank | MPI rank in the communicator. |