Add dry run feature (#151)
Add a dry run mode, inspired by the dry run mode implemented in NEST. A dry run of a model simulates running a large distributed model by running only the work of one of the ranks, with artificial spike input from the other "dummy" ranks. This is implemented as a new global communication back end, dryrun_global_policy, the implementation of which is straightforward: a new implementation of gather_spikes that takes the local spikes and replicates them n times where n is the total number of simulated ranks. the global_policy::size() method returns the number of ranks in the simulated run the new back end has to store some state that records the number of simulated ranks and cells per rank, which are set using the new global_policy::set_sizes() method Some CMake modificatins were required: make the selection of the global communication backend have the same interface as that for selecting the threading back end. small improvements to the selection of the threading back end to make the cthread option visible in ccmake, and have consistent CMake variable naming. Command line options were also extended: a --dry-run-size or -D option can be used to supple the number of dry run ranks on the command line. the miniapp driver was updated to set the dry run size and cell count via the new global_policy::set_sizes() interface.
Showing
- CMakeLists.txt 24 additions, 9 deletionsCMakeLists.txt
- miniapp/io.cpp 12 additions, 2 deletionsminiapp/io.cpp
- miniapp/io.hpp 3 additions, 0 deletionsminiapp/io.hpp
- miniapp/miniapp.cpp 19 additions, 8 deletionsminiapp/miniapp.cpp
- src/CMakeLists.txt 6 additions, 1 deletionsrc/CMakeLists.txt
- src/communication/dryrun_global_policy.cpp 12 additions, 0 deletionssrc/communication/dryrun_global_policy.cpp
- src/communication/dryrun_global_policy.hpp 87 additions, 0 deletionssrc/communication/dryrun_global_policy.hpp
- src/communication/global_policy.hpp 25 additions, 9 deletionssrc/communication/global_policy.hpp
- src/communication/mpi_global_policy.hpp 10 additions, 11 deletionssrc/communication/mpi_global_policy.hpp
- src/communication/serial_global_policy.hpp 11 additions, 9 deletionssrc/communication/serial_global_policy.hpp
- src/mechanism.hpp 2 additions, 0 deletionssrc/mechanism.hpp
- src/model.hpp 1 addition, 1 deletionsrc/model.hpp
Please register or sign in to comment