|
Nektar++
|
Classes | |
| struct | CrystalStep |
| Crystal-router routing decision for one bisection step. More... | |
| class | IFixedExchange |
| A fixed-pattern exchange over a known neighbour set. More... | |
| class | NeighbourCollectiveFixedExchange |
ExchangeBackend::eNeighbourCollective: one MPI_Neighbor_alltoallv over a distributed-graph communicator built at construction. More... | |
| class | PairwiseFixedExchange |
| ExchangeBackend::ePairwise: one non-blocking send and receive per neighbour. More... | |
| class | TransportFixedExchange |
| ExchangeBackend::eTransport: replay the fixed pattern through an arbitrary ITransport, one RoutedMessage per neighbour. More... | |
Functions | |
| template<class T > | |
| T | EpsilonDifference (T lhs, T rhs) |
| template<typename T > | |
| T | LoadAt (const std::vector< std::byte > &buf, size_t i) |
Read element i of a trivially-copyable T from a byte buffer. | |
| template<typename T > | |
| void | StoreAt (std::vector< std::byte > &buf, size_t i, const T &v) |
Write element i of a trivially-copyable T into a byte buffer. | |
| ExchangeBackend | ResolveBackend (ExchangeBackend backend, const CommSharedPtr &comm) |
The backend a plan can actually use, given what comm supports. | |
| std::unique_ptr< IFixedExchange > | MakeFixedExchange (ExchangeBackend backend, const std::shared_ptr< ITransport > &transport, const std::vector< int > &nbrs) |
Construct the IFixedExchange for backend over nbrs. | |
| template<typename T > | |
| void | PackPod (std::vector< std::byte > &buf, const T &v) |
| Append a trivially-copyable POD value to a byte buffer. | |
| template<typename T > | |
| T | UnpackPod (const std::byte *&cur) |
| Read a trivially-copyable POD value from a cursor and advance it. | |
| CrystalStep | CrystalPlanStep (int lo, int hi, int rank) |
| Compute this rank's routing decision for one bisection step of the crystal router. | |
| bool | CrystalDestInMyHalf (const CrystalStep &s, int dest) |
Test whether a message destined for dest belongs in the querying rank's half of the current bisection. | |
| int | RendezvousRank (int64_t id, int nproc) |
| Bit-mixing hash (splitmix64 finaliser) mapping an entity id to its rendezvous rank, so sequential IDs spread across rendezvous ranks and don't create hot spots. | |
| std::vector< RoutedMessage > | DrainBucketsToMessages (std::unordered_map< int, std::vector< std::byte > > &buckets, int selfRank) |
| Move sparse per-destination byte buckets into transport messages, clearing the buckets. | |
| CommSharedPtr | BuildNeighbourComm (const CommSharedPtr &base, int selfRank, const std::unordered_map< int64_t, std::vector< int > > &sharers) |
| Build a persistent distributed-graph communicator over the discovered topological neighbours (self excluded). | |
|
inline |
Build a persistent distributed-graph communicator over the discovered topological neighbours (self excluded).
| base | Base communicator to derive the graph communicator from. |
| selfRank | This rank's index; excluded from its own neighbour list. |
| sharers | Resolved sharer lists, keyed by entity id (as populated by ConnectivityResolver::Resolve()). |
DistGraphCreateAdjacent) whose neighbours are the union of all ranks appearing in sharers, excluding selfRank. Definition at line 998 of file Transport.hpp.
References sharers.
|
inline |
Test whether a message destined for dest belongs in the querying rank's half of the current bisection.
| s | Routing decision for the current step, from CrystalPlanStep(). |
| dest | Destination rank of the message being tested. |
true if dest is in the same half as the querying rank (so the message should be kept for a later round), false if it must be sent across to the other half this round. Definition at line 358 of file Transport.hpp.
References CrystalDestInMyHalf(), Nektar::LibUtilities::detail::CrystalStep::inLow, and Nektar::LibUtilities::detail::CrystalStep::mid.
Referenced by CrystalDestInMyHalf(), and Nektar::LibUtilities::CrystalRouterTransport::Route().
|
inline |
Compute this rank's routing decision for one bisection step of the crystal router.
| lo | Lower bound (inclusive) of the current group of ranks. |
| hi | Upper bound (inclusive) of the current group of ranks. |
| rank | The rank computing its own routing decision (normally the calling rank's own rank). |
rank falls in and who it should exchange (or one-way forward) messages with this round. Definition at line 274 of file Transport.hpp.
References ASSERTL1, CrystalPlanStep(), Nektar::LibUtilities::detail::CrystalStep::forwardTo, Nektar::LibUtilities::detail::CrystalStep::hi, hi, Nektar::LibUtilities::detail::CrystalStep::highSize, Nektar::LibUtilities::detail::CrystalStep::inLow, Nektar::LibUtilities::detail::CrystalStep::lo, lo, Nektar::LibUtilities::detail::CrystalStep::lowSize, Nektar::LibUtilities::detail::CrystalStep::mid, Nektar::LibUtilities::detail::CrystalStep::partner, rank, and Nektar::LibUtilities::detail::CrystalStep::recvForwardFrom.
Referenced by CrystalPlanStep(), and Nektar::LibUtilities::CrystalRouterTransport::Route().
|
inline |
Move sparse per-destination byte buckets into transport messages, clearing the buckets.
| [in,out] | buckets | Per-destination-rank byte buffers, keyed only by ranks this rank actually has data for (i.e. sparse, not O(nproc)); cleared on return. |
| selfRank | This rank's index, stamped into each produced message's src field. |
Definition at line 974 of file Transport.hpp.
References msgs.
Referenced by Nektar::LibUtilities::ConnectivityResolver::Resolve(), and Nektar::LibUtilities::SharedPayloadResolver< PayloadT >::Resolve().
|
inline |
Definition at line 49 of file RealComparison.hpp.
Referenced by Nektar::LibUtilities::IsRealEqual().
|
inline |
Read element i of a trivially-copyable T from a byte buffer.
Definition at line 121 of file SharedIdPlan.hpp.
|
inline |
Construct the IFixedExchange for backend over nbrs.
Definition at line 376 of file SharedIdPlan.hpp.
References ASSERTL0, Nektar::LibUtilities::eCrystalRouter, Nektar::LibUtilities::ePairwise, and Nektar::LibUtilities::eTransport.
Referenced by Nektar::LibUtilities::SharedIdPlan::Build().
|
inline |
Append a trivially-copyable POD value to a byte buffer.
| T | Trivially-copyable value type. |
| buf | Buffer to append to; grown by sizeof(T) bytes. |
| v | Value to serialise. |
Definition at line 200 of file Transport.hpp.
|
inline |
Bit-mixing hash (splitmix64 finaliser) mapping an entity id to its rendezvous rank, so sequential IDs spread across rendezvous ranks and don't create hot spots.
| id | Global entity id. |
| nproc | Number of ranks to hash into, i.e. Comm()->GetSize(). |
id, in [0, nproc). Definition at line 952 of file Transport.hpp.
References id.
Referenced by Nektar::LibUtilities::ConnectivityResolver::Register().
|
inline |
The backend a plan can actually use, given what comm supports.
ExchangeBackend::eNeighbourCollective needs MPI_Dist_graph_create_adjacent, which arrived in MPI-3. Some MPI libraries still in service predate it – Microsoft MPI among them – so there is nothing to build the neighbourhood communicator with. Fall back to ExchangeBackend::ePairwise, which moves exactly the same data with one send and receive per neighbour; results are identical either way, only the MPI calls differ. MultiRegions::AssemblyCommDG drops its own neighbourhood method on the same test.
| backend | Backend the caller asked for. |
| comm | Communicator the plan will run over; null for a transport with no underlying Comm, where nothing is downgraded. |
backend, or ePairwise if it cannot be honoured. Definition at line 364 of file SharedIdPlan.hpp.
References Nektar::LibUtilities::eNeighbourCollective, and Nektar::LibUtilities::ePairwise.
|
inline |
Write element i of a trivially-copyable T into a byte buffer.
Definition at line 130 of file SharedIdPlan.hpp.
|
inline |
Read a trivially-copyable POD value from a cursor and advance it.
| T | Trivially-copyable value type. |
| cur | Cursor into a byte buffer, positioned at the start of a value of type T; advanced by sizeof(T) bytes on return. |
Definition at line 217 of file Transport.hpp.