|
Nektar++
|
ITransport implementation built on MPI_Alltoall (of counts) followed by MPI_Alltoallv (of data).
More...
#include <Transport.hpp>
Public Member Functions | |
| AlltoallvTransport (CommSharedPtr comm) | |
Construct a transport bound to comm. | |
| int | Rank () const override |
| int | Size () const override |
| CommSharedPtr | Comm () const override |
| void | Exchange (std::vector< RoutedMessage > &outbound, std::vector< RoutedMessage > &inbound) override |
Personalised all-to-all via MPI_Alltoall and MPI_Alltoallv. | |
Public Member Functions inherited from Nektar::LibUtilities::ITransport | |
| virtual | ~ITransport ()=default |
Private Attributes | |
| CommSharedPtr | m_comm |
| int | m_nproc = 0 |
| int | m_rank = 0 |
ITransport implementation built on MPI_Alltoall (of counts) followed by MPI_Alltoallv (of data).
Simple and robust, but the count exchange is \( O(P) \) memory per rank (see the note in Exchange()), so this transport mechanism is suitable for below a few thousand ranks, and can be used as the correctness reference for #CrystalRouterTransport.
Definition at line 437 of file Transport.hpp.
|
inlineexplicit |
Construct a transport bound to comm.
| comm | Communicator whose ranks participate in each Exchange(). |
Definition at line 445 of file Transport.hpp.
|
inlineoverridevirtual |
Implements Nektar::LibUtilities::ITransport.
Definition at line 459 of file Transport.hpp.
References m_comm.
|
inlineoverridevirtual |
Personalised all-to-all via MPI_Alltoall and MPI_Alltoallv.
| [in] | outbound | Messages to send, at most one per destination rank; multiple messages to the same destination are concatenated. Left empty on return (see ITransport::Exchange). |
| [out] | inbound | One message per rank that sent to this rank. |
sendCounts/recvCounts/sdispls/rdispls arrays below are sized O(P) – this is the one place in the module where memory scales with rank count rather than local entity count. It is bounded by the MPI_Alltoall of counts, not by the (much larger) data exchange, and is the documented trade-off of this transport; use CrystalRouterTransport instead once P becomes large. Implements Nektar::LibUtilities::ITransport.
Definition at line 478 of file Transport.hpp.
References ASSERTL0, ASSERTL1, Nektar::LibUtilities::RoutedMessage::bytes, Nektar::LibUtilities::RoutedMessage::dest, m_comm, m_nproc, m_rank, and Nektar::LibUtilities::RoutedMessage::src.
|
inlineoverridevirtual |
Implements Nektar::LibUtilities::ITransport.
Definition at line 451 of file Transport.hpp.
References m_rank.
|
inlineoverridevirtual |
Implements Nektar::LibUtilities::ITransport.
Definition at line 455 of file Transport.hpp.
References m_nproc.
|
private |
Definition at line 574 of file Transport.hpp.
Referenced by Comm(), and Exchange().
|
private |
Definition at line 575 of file Transport.hpp.
Referenced by Exchange(), and Size().
|
private |
Definition at line 576 of file Transport.hpp.
Referenced by Exchange(), and Rank().