KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
|
Plugin providing a sparse alltoall exchange method. More...
#include <alltoall_sparse.hpp>
Public Member Functions | |
template<typename... Args> | |
void | alltoallv_sparse (Args... args) const |
Sparse alltoall exchange using the NBX algorithm(Hoefler et al., "Scalable communication protocols for
dynamic sparse data", ACM Sigplan Noctices 45.5, 2010.) | |
Plugin providing a sparse alltoall exchange method.
void kamping::plugin::SparseAlltoall< Comm, DefaultContainerType >::alltoallv_sparse | ( | Args... | args | ) | const |
Sparse alltoall exchange using the NBX algorithm(Hoefler et al., "Scalable communication protocols for dynamic sparse data", ACM Sigplan Noctices 45.5, 2010.)
This function provides a sparse interface for personalized all-to-all communication using direct message exchange and thus achieving linear complexity in the number of messages to be sent (in contrast to MPI_Alltoallv
which exhibits complexity (at least) linear in the size of the communicator due to its interface). To achieve this time complexity we can no longer rely on an array of size of the communicator for send counts. Instead we use a sparse representation of the data to be sent.
The following parameters are required:
send_buf()
encapsulates a container consisting of destination-message pairs. Each such pair has to be decomposable via structured bindings with the first parameter being convertible to int and the second parameter being the actual message to be sent for which we require the usual send_buf properties (i.e., either scalar types or existance data()
and size()
member function and the exposure of a value_type
)). Messages of size 0 are not sent.cb
which is responsible to process the received messages via a sparse_alltoall::ProbedMessage object. The callback function cb
gets called for each probed message ready to be received via cb(probed_message)
. See sparse_alltoall::ProbedMessage for the member functions to be called on the object.The following buffers are optional:
MPI
datatype to use as send type. If omitted, the MPI
datatype is derived automatically based on each message's underlying value_type
.Args | Automatically deducted template parameters. |
args | All required and any number of the optional parameters described above. |