KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
Loading...
Searching...
No Matches
kamping::plugin::DispatchAlltoall< Comm, DefaultContainerType > Class Template Reference

Plugin providing an alltoallv exchange method which calls one of multiple underlying alltoallv exchange algorithms depending on the communication volume. More...

#include <alltoall_dispatch.hpp>

Inheritance diagram for kamping::plugin::DispatchAlltoall< Comm, DefaultContainerType >:
Collaboration diagram for kamping::plugin::DispatchAlltoall< Comm, DefaultContainerType >:

Public Member Functions

template<typename... Args>
auto alltoallv_dispatch (Args... args) const
 Alltoallv exchange method which uses the communication volume to either exchange the data using GridCommunicator::alltoallv() (latency in about sqrt(comm.size())) or builtin MPI_Alltoallv (potentially linear latency).
 
void initialize () const
 Initialized the grid communicator. If not explicitly called by the user this will be done during the first call to alltoallv_dispatch which internally uses grid communication.
 

Detailed Description

template<typename Comm, template< typename... > typename DefaultContainerType>
class kamping::plugin::DispatchAlltoall< Comm, DefaultContainerType >

Plugin providing an alltoallv exchange method which calls one of multiple underlying alltoallv exchange algorithms depending on the communication volume.

See also
DispatchAlltoall::alltoallv_dispatch() for more information.

Member Function Documentation

◆ alltoallv_dispatch()

template<typename Comm , template< typename... > typename DefaultContainerType>
template<typename... Args>
auto kamping::plugin::DispatchAlltoall< Comm, DefaultContainerType >::alltoallv_dispatch ( Args... args) const
inline

Alltoallv exchange method which uses the communication volume to either exchange the data using GridCommunicator::alltoallv() (latency in about sqrt(comm.size())) or builtin MPI_Alltoallv (potentially linear latency).

If the bottleneck send communication volume on all ranks is smaller than a given threshold (in number bytes), our grid alltoall communication is used. Otherwise we use the builtin MPI alltoallv exchange.

The following parameters are required:

  • kamping::send_buf() containing the data that is sent to each rank. The size of this buffer has to be at least the sum of the send_counts argument.
  • kamping::send_counts() containing the number of elements to send to each rank.

The following buffers are optional:

Template Parameters
ArgsAutomatically deducted template parameters.
Parameters
argsAll required and any number of the optional parameters described above.

remove comm_volume_threshold and unpacked send_counts from caller provided argument list before forwarding it underlying allotall exchanges


The documentation for this class was generated from the following file: