Runtime distributed context (#485)
Move from choosing the distributed communication model from a compile time choice (the old `arb::communication::communication_policy` type) to a run time decision. * Add `arb::distributed_context` class that provides the required interface for distributed communication implementations, using type-erasure to provide value semantics. * Add two implementations for the distributed context: `arb::mpi_context` and `arb::local_context`. * Allow distribution over a user-supplied MPI communicator by providing it as an argument to `arb::mpi_context`. * Add `mpi_error` exception type to wrap MPI errors. * Move contents of the `arb::communication` namespace to the `arb` namespace. * Add preprocessor for-each utility `ARB_PP_FOREACH`. * Rewrite all examples and tests to use the new distributed context interface. * Add documentation for distributed context class and semantics, and update documentation for load balancer and simulation classes accordingly. Fixes #472
Showing
- CMakeLists.txt 2 additions, 15 deletionsCMakeLists.txt
- doc/cpp_distributed_context.rst 183 additions, 0 deletionsdoc/cpp_distributed_context.rst
- doc/cpp_domdec.rst 6 additions, 3 deletionsdoc/cpp_domdec.rst
- doc/cpp_recipe.rst 1 addition, 1 deletiondoc/cpp_recipe.rst
- doc/cpp_simulation.rst 21 additions, 14 deletionsdoc/cpp_simulation.rst
- doc/index.rst 1 addition, 0 deletionsdoc/index.rst
- example/brunel/brunel_miniapp.cpp 22 additions, 22 deletionsexample/brunel/brunel_miniapp.cpp
- example/brunel/partitioner.hpp 5 additions, 4 deletionsexample/brunel/partitioner.hpp
- example/generators/event_gen.cpp 8 additions, 2 deletionsexample/generators/event_gen.cpp
- example/miniapp/miniapp.cpp 24 additions, 36 deletionsexample/miniapp/miniapp.cpp
- src/CMakeLists.txt 0 additions, 3 deletionssrc/CMakeLists.txt
- src/communication/communicator.hpp 10 additions, 10 deletionssrc/communication/communicator.hpp
- src/communication/distributed_context.hpp 139 additions, 0 deletionssrc/communication/distributed_context.hpp
- src/communication/dryrun_global_policy.cpp 0 additions, 10 deletionssrc/communication/dryrun_global_policy.cpp
- src/communication/dryrun_global_policy.hpp 0 additions, 92 deletionssrc/communication/dryrun_global_policy.hpp
- src/communication/global_policy.hpp 0 additions, 56 deletionssrc/communication/global_policy.hpp
- src/communication/local_context.hpp 55 additions, 0 deletionssrc/communication/local_context.hpp
- src/communication/mpi.cpp 50 additions, 33 deletionssrc/communication/mpi.cpp
- src/communication/mpi.hpp 208 additions, 190 deletionssrc/communication/mpi.hpp
- src/communication/mpi_context.hpp 65 additions, 0 deletionssrc/communication/mpi_context.hpp
Please register or sign in to comment