ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Communication::MpiCallbacks manages MPI communication using a visitor pattern. More...
#include <utils/NumeratedContainer.hpp>
#include <utils/tuple.hpp>
#include <utils/type_traits.hpp>
#include <boost/mpi/collectives/broadcast.hpp>
#include <boost/mpi/communicator.hpp>
#include <boost/mpi/environment.hpp>
#include <boost/mpi/packed_iarchive.hpp>
#include <cassert>
#include <memory>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
Go to the source code of this file.
Classes | |
class | Communication::MpiCallbacks |
The interface of the MPI callback mechanism. More... | |
class | Communication::MpiCallbacks::CallbackHandle< Args > |
RAII handle for a callback. More... | |
class | Communication::RegisterCallback |
Helper class to add callbacks before main. More... | |
Namespaces | |
namespace | Communication |
Macros | |
#define | REGISTER_CALLBACK(cb) |
Register a static callback without return value. | |
Typedefs | |
template<class... Args> | |
using | Communication::CallbackHandle = MpiCallbacks::CallbackHandle< Args... > |
Communication::MpiCallbacks manages MPI communication using a visitor pattern.
The program runs on the head node and is responsible for calling callback functions on the worker nodes when necessary, e.g. to broadcast global variables or run an algorithm in parallel.
Callbacks are registered on the head node as function pointers via the REGISTER_CALLBACK. The visitor pattern allows using arbitrary function signatures.
Definition in file MpiCallbacks.hpp.
#define REGISTER_CALLBACK | ( | cb | ) |
Register a static callback without return value.
This registers a function as an mpi callback. The macro should be used at global scope.
cb | A function |
Definition at line 510 of file MpiCallbacks.hpp.