|
core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
|
#include <grid_halo_topology.hpp>
Classes | |
| struct | FlatTopology |
Public Member Functions | |
| GridHaloTopology ()=default | |
| void | buildTopology (const decomp::BlockDecomposer< Dim > &dec, int rank, int ghostWidth, const std::array< bool, Dim > &periodic, MPI_Comm comm=MPI_COMM_WORLD) |
Build the halo topology for rank's block of dec, with the given ghost width and per-axis periodicity. | |
| template<typename Field > | |
| void | start (Field &field, int tag=0) |
| Post all sends/recvs; returns immediately so the caller can compute the block interior. | |
| template<typename Field > | |
| void | wait (Field &field) |
| Complete a started exchange: wait for receives and scatter them into the ghost cells. | |
| template<typename Field > | |
| void | exchangeNbx (Field &field, int tag=0) |
| Convenience: full blocking exchange via the NBX-style engine (start + wait). | |
| template<typename Field > | |
| void | exchangePersistent (Field &field) |
| Full exchange via MPI_Neighbor_alltoallv on a cached distributed-graph communicator. | |
| template<typename Field > | |
| void | reverseAdd (Field &field, int tag=0) |
| FlatTopology | flatten () const |
| const decomp::BlockIndexer< Dim > & | indexer () const |
| std::size_t | numNeighbors () const |
| std::size_t | numGhostRecv () const |
| ~GridHaloTopology () | |
| GridHaloTopology (const GridHaloTopology &)=delete | |
| GridHaloTopology & | operator= (const GridHaloTopology &)=delete |
Definition at line 48 of file grid_halo_topology.hpp.
|
default |
|
inline |
Definition at line 304 of file grid_halo_topology.hpp.
|
delete |
|
inline |
Build the halo topology for rank's block of dec, with the given ghost width and per-axis periodicity.
Communicates once (NBX) to establish matched send lists.
Definition at line 54 of file grid_halo_topology.hpp.
References peclet::core::wrap().
|
inline |
Post all sends/recvs; returns immediately so the caller can compute the block interior.
Definition at line 138 of file grid_halo_topology.hpp.
References MPI_BYTE, MPI_Irecv(), MPI_Isend(), and MPI_REQUEST_NULL.
Referenced by peclet::core::halo::GridHaloTopology< Dim >::exchangeNbx().
|
inline |
Complete a started exchange: wait for receives and scatter them into the ghost cells.
Definition at line 167 of file grid_halo_topology.hpp.
References MPI_STATUS_IGNORE, MPI_STATUSES_IGNORE, MPI_UNDEFINED, MPI_Waitall(), and MPI_Waitany().
Referenced by peclet::core::halo::GridHaloTopology< Dim >::exchangeNbx().
|
inline |
Convenience: full blocking exchange via the NBX-style engine (start + wait).
Definition at line 186 of file grid_halo_topology.hpp.
References peclet::core::halo::GridHaloTopology< Dim >::start(), and peclet::core::halo::GridHaloTopology< Dim >::wait().
|
inline |
Full exchange via MPI_Neighbor_alltoallv on a cached distributed-graph communicator.
Fastest for the fixed neighbour pattern of a static grid. Identical result to exchangeNbx.
Definition at line 197 of file grid_halo_topology.hpp.
References MPI_BYTE, and MPI_Neighbor_alltoallv().
|
inline |
Definition at line 228 of file grid_halo_topology.hpp.
References MPI_BYTE, MPI_Irecv(), MPI_Isend(), MPI_REQUEST_NULL, MPI_STATUS_IGNORE, MPI_STATUSES_IGNORE, MPI_UNDEFINED, MPI_Waitall(), and MPI_Waitany().
|
inline |
Definition at line 276 of file grid_halo_topology.hpp.
References peclet::core::halo::GridHaloTopology< Dim >::FlatTopology::comm.
Referenced by peclet::core::halo::GridHalo< T >::init().
|
inline |
Definition at line 295 of file grid_halo_topology.hpp.
|
inline |
Definition at line 296 of file grid_halo_topology.hpp.
|
inline |
Definition at line 297 of file grid_halo_topology.hpp.
|
delete |
References MPI_Comm_free(), MPI_COMM_NULL, and MPI_Finalized().