![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Asynchronous, split-phase ghost-communication engine. More...
#include "BoxGeometry.hpp"#include "ghosts/HaloPlan.hpp"#include "ghosts/particle_packing.hpp"#include <boost/mpi/request.hpp>#include <memory>#include <vector>
Include dependency graph for HaloExchange.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | GhostComm::ExchangeBuffers |
| Persistent per-neighbor buffer pool for halo exchanges. More... | |
| struct | GhostComm::GhostExchange |
| Opaque handle for one in-flight halo exchange. More... | |
Namespaces | |
| namespace | GhostComm |
Functions | |
| GhostExchange | GhostComm::halo_exchange_start (HaloPlan const &plan, BoxGeometry const &box, unsigned data_parts, ExchangeOp op, ExchangeBuffers &bufs) |
| Begin a halo exchange using a caller-owned buffer pool. | |
| GhostExchange | GhostComm::halo_exchange_start (HaloPlan const &plan, BoxGeometry const &box, unsigned data_parts, ExchangeOp op) |
| Convenience overload that allocates a temporary ExchangeBuffers. | |
| void | GhostComm::halo_exchange_finish (GhostExchange &state) |
| Complete a halo exchange: run same-rank copies (overlapping the in-flight messages), wait for all requests, then unpack or reduce. | |
| void | GhostComm::halo_exchange (HaloPlan const &plan, BoxGeometry const &box, unsigned data_parts, ExchangeOp op, ExchangeBuffers &bufs) |
| Blocking wrapper using a caller-owned buffer pool (no per-call alloc after warm-up). | |
| void | GhostComm::halo_exchange (HaloPlan const &plan, BoxGeometry const &box, unsigned data_parts, ExchangeOp op) |
| Blocking convenience wrapper: start + finish (allocates a temporary ExchangeBuffers; use the pool overload on hot paths). | |
Asynchronous, split-phase ghost-communication engine.
Drive a GhostComm::HaloPlan with non-blocking point-to-point MPI (plus same-rank copies), reusing the byte-identical serialization from particle_packing.hpp. The engine is split into a halo_exchange_start phase (post all receives, pack and post all sends) and a halo_exchange_finish phase (same-rank copies, wait, unpack/reduce) so that callers can overlap other work with in-flight messages.
Deadlock-freedom is guaranteed by posting every irecv before any isend and matching each message by (peer, tag); message sizes are known a-priori from the receiving cells' packed size (see GhostComm::calc_transmit_size), except for the PARTNUM bootstrap.
Definition in file HaloExchange.hpp.