#include <event_delivery_manager.h>
Public Member Functions | |
| EventDeliveryManager () | |
| ~EventDeliveryManager () override | |
| void | initialize (const bool) override |
| Prepare manager for operation. | |
| void | finalize (const bool) override |
| Take down manager after operation. | |
| void | set_status (const Dictionary &) override |
| Set the status of the manager. | |
| void | get_status (Dictionary &) override |
| Retrieve the status of the manager. | |
| template<class EventT > | |
| void | send (Node &source, EventT &e, const long lag=0) |
| Standard routine for sending events. | |
| void | send_secondary (Node &source, SecondaryEvent &e) |
| Send a secondary event remote. | |
| void | send_local (size_t t, Node &source, Event &e) |
| Send event e to all targets of node source on thread t. | |
| void | send_remote (size_t tid, SpikeEvent &, const long lag=0) |
| Add node ID of event sender to the spike_register. | |
| void | send_off_grid_remote (size_t tid, SpikeEvent &e, const long lag=0) |
| Add node ID of event sender to the spike_register. | |
| void | send_to_node (Event &e) |
| Send event e directly to its target node. | |
| bool | get_off_grid_communication () const |
| return current communication style. | |
| void | set_off_grid_communication (bool off_grid_spiking) |
| set communication style to off_grid (true) or on_grid | |
| size_t | write_toggle () const |
| Return 0 for even, 1 for odd time slices. | |
| size_t | read_toggle () const |
| Return 1 - write_toggle(). | |
| long | get_modulo (long d) |
| Return (T+d) mod max_delay. | |
| long | get_slice_modulo (long d) |
| Index to slice-based buffer. | |
| void | configure_spike_data_buffers () |
| Resize spike_register and comm_buffer to correct dimensions. | |
| void | configure_spike_register () |
| void | resize_send_recv_buffers_target_data () |
| void | configure_secondary_buffers () |
| void | gather_spike_data () |
| Collocates spikes from register to MPI buffers, communicates via MPI and delivers events to targets. | |
| void | gather_target_data (const size_t tid) |
| Collocates presynaptic connection information, communicates via MPI and creates presynaptic connection infrastructure. | |
| void | gather_target_data_compressed (const size_t tid) |
| void | deliver_events (const size_t tid) |
| Delivers events to targets. | |
| void | gather_secondary_target_data () |
| Collocates presynaptic connection information for secondary events (MPI buffer offsets), communicates via MPI and create presynaptic connection infrastructure for secondary events. | |
| void | write_done_marker_secondary_events_ (const bool done) |
| void | gather_secondary_events (const bool done) |
| bool | deliver_secondary_events (const size_t tid, const bool called_from_wfr_update) |
| void | update_moduli () |
| Update modulo table based on current time settings. | |
| void | init_moduli () |
| Initialize modulo table. | |
| virtual void | reset_counters () |
| Set local spike counter to zero. | |
| virtual void | reset_timers_for_preparation () |
| Set time measurements for internal profiling to zero (reg. | |
| virtual void | reset_timers_for_dynamics () |
| Set time measurements for internal profiling to zero (reg. | |
| template<> | |
| void | send (Node &source, SpikeEvent &e, const long lag) |
| template<> | |
| void | send (Node &source, DSSpikeEvent &e, const long lag) |
Public Member Functions inherited from nest::ManagerInterface | |
| ManagerInterface (ManagerInterface const &)=delete | |
| void | operator= (ManagerInterface const &)=delete |
| ManagerInterface () | |
| virtual | ~ManagerInterface () |
| virtual void | prepare () |
| virtual void | cleanup () |
Private Member Functions | |
| template<typename SpikeDataT > | |
| void | gather_spike_data_ (std::vector< SpikeDataT > &send_buffer, std::vector< SpikeDataT > &recv_buffer) |
| void | resize_send_recv_buffers_spike_data_ () |
| template<typename SpikeDataWithRankT , typename SpikeDataT > | |
| void | collocate_spike_data_buffers_ (SendBufferPosition &send_buffer_position, std::vector< std::vector< SpikeDataWithRankT > * > &spike_register, std::vector< SpikeDataT > &send_buffer, std::vector< size_t > &num_spikes_per_rank) |
| Moves spikes from on grid and off grid spike registers to correct locations in MPI buffers. | |
| template<typename SpikeDataT > | |
| void | set_end_marker_ (const SendBufferPosition &send_buffer_position, std::vector< SpikeDataT > &send_buffer, size_t local_max_spikes_per_rank) |
| Set end marker for per-rank-chunks signalling completion and providing shrink/grow information. | |
| template<typename SpikeDataT > | |
| void | reset_complete_marker_spike_data_ (const SendBufferPosition &send_buffer_position, std::vector< SpikeDataT > &send_buffer) const |
| Resets marker in MPI buffer that signals end of communication across MPI ranks. | |
| template<typename SpikeDataT > | |
| size_t | get_global_max_spikes_per_rank_ (const SendBufferPosition &send_buffer_position, std::vector< SpikeDataT > &recv_buffer) const |
| Get required buffer size. | |
| template<typename SpikeDataT > | |
| void | deliver_events_ (const size_t tid, const std::vector< SpikeDataT > &recv_buffer) |
| Reads spikes from MPI buffers and delivers them to ringbuffer of nodes. | |
| void | reset_spike_register_ (const size_t tid) |
| Deletes all spikes from spike registers and resets spike counters. | |
| bool | collocate_target_data_buffers_ (const size_t tid, const AssignedRanks &assigned_ranks, TargetSendBufferPosition &send_buffer_position) |
| Fills MPI buffer for communication of connection information from presynaptic to postsynaptic side. | |
| bool | collocate_target_data_buffers_compressed_ (const size_t tid, const AssignedRanks &assigned_ranks, TargetSendBufferPosition &send_buffer_position) |
| void | set_complete_marker_target_data_ (const AssignedRanks &assigned_ranks, const TargetSendBufferPosition &send_buffer_position) |
| Sets marker in MPI buffer that signals end of communication across MPI ranks. | |
| bool | distribute_target_data_buffers_ (const size_t tid) |
| Reads TargetData objects from MPI buffers and creates Target objects on TargetTable (presynaptic part of connection infrastructure). | |
| template<class EventT > | |
| void | send_local_ (Node &source, EventT &e, const long lag) |
| Sends event e to all targets of node source. | |
| void | send_local_ (Node &source, SecondaryEvent &e, const long lag) |
Static Private Member Functions | |
| static bool | is_marked_for_removal_ (const Target &target) |
| Returns true if spike has been moved to MPI buffer, such that it can be removed by clean_spike_register. | |
Private Attributes | |
| bool | off_grid_spiking_ |
| indicates whether spikes are not constrained to the grid | |
| std::vector< long > | moduli_ |
| Table of pre-computed modulos. | |
| std::vector< long > | slice_moduli_ |
| Table of pre-computed slice-based modulos. | |
| std::vector< std::vector< SpikeDataWithRank > * > | emitted_spikes_register_ |
| Register of emitted spikes. | |
| std::vector< std::vector< OffGridSpikeDataWithRank > * > | off_grid_emitted_spikes_register_ |
| Register of emitted off-grid spikes. | |
| std::vector< unsigned int > | send_buffer_secondary_events_ |
| Buffer to collect the secondary events after serialization. | |
| std::vector< unsigned int > | recv_buffer_secondary_events_ |
| std::vector< unsigned long > | local_spike_counter_ |
| Number of generated spike events (both off- and on-grid) during the last call to simulate. | |
| std::vector< SpikeData > | send_buffer_spike_data_ |
| std::vector< SpikeData > | recv_buffer_spike_data_ |
| std::vector< OffGridSpikeData > | send_buffer_off_grid_spike_data_ |
| std::vector< OffGridSpikeData > | recv_buffer_off_grid_spike_data_ |
| std::vector< TargetData > | send_buffer_target_data_ |
| std::vector< TargetData > | recv_buffer_target_data_ |
| bool | buffer_size_target_data_has_changed_ |
| whether size of MPI buffer for communication of connections was changed | |
| size_t | global_max_spikes_per_rank_ |
| Largest number of spikes sent from any rank to any other rank in last spike exchange round. | |
| double | send_recv_buffer_shrink_limit_ |
| shrink buffer only if below this limit | |
| double | send_recv_buffer_shrink_spare_ |
| leave this fraction more space than minimally needed | |
| double | send_recv_buffer_grow_extra_ |
| when growing, add this fraction extra space | |
| BufferResizeLog | send_recv_buffer_resize_log_ |
| Log all resize events. | |
| PerThreadBoolIndicator | gather_completed_checker_ |
| Stopwatch< StopwatchGranularity::Detailed, StopwatchParallelism::MasterOnly > | sw_collocate_spike_data_ |
| Stopwatch< StopwatchGranularity::Detailed, StopwatchParallelism::MasterOnly > | sw_communicate_spike_data_ |
| Stopwatch< StopwatchGranularity::Detailed, StopwatchParallelism::MasterOnly > | sw_communicate_target_data_ |
| nest::EventDeliveryManager::EventDeliveryManager | ( | ) |
|
override |
|
private |
Moves spikes from on grid and off grid spike registers to correct locations in MPI buffers.
Accumulates count of spikes to be sent to any rank in num_spikes_per_rank. Passed as argument, so that values accumulate as we call once for plain and once for offgrid spikes.
References nest::SendBufferPosition::idx(), nest::SendBufferPosition::increase(), and nest::SendBufferPosition::is_chunk_filled().
Referenced by gather_spike_data_().
|
private |
Fills MPI buffer for communication of connection information from presynaptic to postsynaptic side.
Builds TargetData objects from SourceTable and connections information.
References nest::TargetSendBufferPosition::are_all_chunks_filled(), nest::TargetSendBufferPosition::begin(), nest::AssignedRanks::begin, nest::KernelManager::connection_manager, nest::TargetSendBufferPosition::end(), nest::AssignedRanks::end, nest::ConnectionManager::get_next_target_data(), nest::TargetSendBufferPosition::idx(), nest::TargetSendBufferPosition::increase(), nest::TargetSendBufferPosition::is_chunk_filled(), nest::kernel(), nest::ConnectionManager::no_targets_to_process(), nest::ConnectionManager::reject_last_target_data(), nest::ConnectionManager::save_source_table_entry_point(), and send_buffer_target_data_.
Referenced by gather_target_data().
|
private |
References nest::TargetSendBufferPosition::begin(), nest::AssignedRanks::begin, nest::KernelManager::connection_manager, nest::TargetSendBufferPosition::end(), nest::AssignedRanks::end, nest::ConnectionManager::fill_target_buffer(), nest::kernel(), and send_buffer_target_data_.
Referenced by gather_target_data_compressed().
| void nest::EventDeliveryManager::configure_secondary_buffers | ( | ) |
References nest::kernel(), recv_buffer_secondary_events_, and send_buffer_secondary_events_.
Referenced by nest::SimulationManager::update_connection_infrastructure().
| void nest::EventDeliveryManager::configure_spike_data_buffers | ( | ) |
Resize spike_register and comm_buffer to correct dimensions.
Resizes also off_grid_*_buffer_. This is done by simulate() when called for the first time. The spike buffers cannot be reconfigured later, whence neither the number of local threads or the min_delay can change after simulate() has been called. ConnectorModel::check_delay() and Network::set_status() ensure this.
References configure_spike_register(), nest::kernel(), resize_send_recv_buffers_spike_data_(), send_buffer_off_grid_spike_data_, and send_buffer_spike_data_.
Referenced by nest::SimulationManager::prepare(), and nest::SimulationManager::set_status().
| void nest::EventDeliveryManager::configure_spike_register | ( | ) |
References nest::VPManager::get_thread_id(), nest::kernel(), reset_spike_register_(), and nest::KernelManager::vp_manager.
Referenced by configure_spike_data_buffers().
| void nest::EventDeliveryManager::deliver_events | ( | const size_t | tid | ) |
Delivers events to targets.
References deliver_events_(), off_grid_spiking_, recv_buffer_off_grid_spike_data_, recv_buffer_spike_data_, and reset_spike_register_().
Referenced by nest::SimulationManager::update_().
|
private |
Reads spikes from MPI buffers and delivers them to ringbuffer of nodes.
References nest::KernelManager::connection_manager, nest::SimulationManager::get_clock(), nest::ConnectionManager::get_compressed_spike_data(), nest::ModelManager::get_connection_models(), nest::MPIManager::get_num_processes(), nest::MPIManager::get_send_recv_count_spike_data_per_rank(), nest::invalid_lcid, nest::kernel(), nest::KernelManager::model_manager, nest::KernelManager::mpi_manager, nest::ConnectionManager::send(), nest::Event::set_flush_event_flag(), nest::Event::set_offset(), nest::Event::set_sender_node_id_info(), nest::Event::set_stamp(), nest::KernelManager::simulation_manager, and nest::ConnectionManager::use_compressed_spikes().
Referenced by deliver_events().
| bool nest::EventDeliveryManager::deliver_secondary_events | ( | const size_t | tid, |
| const bool | called_from_wfr_update | ||
| ) |
References nest::KernelManager::connection_manager, nest::ConnectionManager::deliver_secondary_events(), nest::kernel(), and recv_buffer_secondary_events_.
Referenced by nest::SimulationManager::update_().
|
private |
Reads TargetData objects from MPI buffers and creates Target objects on TargetTable (presynaptic part of connection infrastructure).
References nest::ConnectionManager::add_target(), nest::KernelManager::connection_manager, nest::MPIManager::get_num_processes(), nest::MPIManager::get_send_recv_count_target_data_per_rank(), nest::TargetData::get_source_tid(), nest::TargetData::is_end_marker(), nest::kernel(), nest::KernelManager::mpi_manager, and recv_buffer_target_data_.
Referenced by gather_target_data(), and gather_target_data_compressed().
|
overridevirtual |
Take down manager after operation.
After this method has completed, all dynamic data structures created by the manager shall be deallocated and containers emptied. Plain variables need not be reset.
| adjust_number_of_threads_or_rng_only | Pass true if calling from kernel_manager::change_number_of_threads() to limit operations to those necessary for thread adjustment. |
Implements nest::ManagerInterface.
References emitted_spikes_register_, off_grid_emitted_spikes_register_, recv_buffer_off_grid_spike_data_, recv_buffer_secondary_events_, recv_buffer_spike_data_, send_buffer_off_grid_spike_data_, send_buffer_secondary_events_, and send_buffer_spike_data_.
| void nest::EventDeliveryManager::gather_secondary_events | ( | const bool | done | ) |
References nest::MPIManager::communicate_secondary_events_Alltoallv(), nest::kernel(), nest::KernelManager::mpi_manager, recv_buffer_secondary_events_, send_buffer_secondary_events_, and write_done_marker_secondary_events_().
Referenced by nest::SimulationManager::update_().
| void nest::EventDeliveryManager::gather_secondary_target_data | ( | ) |
Collocates presynaptic connection information for secondary events (MPI buffer offsets), communicates via MPI and create presynaptic connection infrastructure for secondary events.
| void nest::EventDeliveryManager::gather_spike_data | ( | ) |
Collocates spikes from register to MPI buffers, communicates via MPI and delivers events to targets.
References gather_spike_data_(), off_grid_spiking_, recv_buffer_off_grid_spike_data_, recv_buffer_spike_data_, send_buffer_off_grid_spike_data_, and send_buffer_spike_data_.
Referenced by nest::SimulationManager::update_().
|
private |
References nest::BufferResizeLog::add_entry(), collocate_spike_data_buffers_(), nest::MPIManager::communicate_off_grid_spike_data_Alltoall(), nest::MPIManager::communicate_spike_data_Alltoall(), emitted_spikes_register_, get_global_max_spikes_per_rank_(), nest::KernelManager::get_mpi_synchronization_stopwatch(), nest::MPIManager::get_send_recv_count_spike_data_per_rank(), global_max_spikes_per_rank_, nest::kernel(), nest::KernelManager::mpi_manager, off_grid_emitted_spikes_register_, off_grid_spiking_, reset_complete_marker_spike_data_(), resize_send_recv_buffers_spike_data_(), send_recv_buffer_grow_extra_, send_recv_buffer_resize_log_, send_recv_buffer_shrink_limit_, send_recv_buffer_shrink_spare_, nest::MPIManager::set_buffer_size_spike_data(), set_end_marker_(), nest::Stopwatch< detailed_timer, threaded_timer >::start(), nest::Stopwatch< detailed_timer, threaded_timer >::stop(), sw_collocate_spike_data_, sw_communicate_spike_data_, and nest::MPIManager::synchronize().
Referenced by gather_spike_data().
| void nest::EventDeliveryManager::gather_target_data | ( | const size_t | tid | ) |
Collocates presynaptic connection information, communicates via MPI and creates presynaptic connection infrastructure.
References nest::PerThreadBoolIndicator::all_false(), nest::PerThreadBoolIndicator::all_true(), nest::PerThreadBoolIndicator::any_false(), buffer_size_target_data_has_changed_, nest::ConnectionManager::clean_source_table(), nest::ConnectionManager::clear_source_table(), collocate_target_data_buffers_(), nest::MPIManager::communicate_target_data_Alltoall(), nest::KernelManager::connection_manager, distribute_target_data_buffers_(), gather_completed_checker_, nest::VPManager::get_assigned_ranks(), nest::KernelManager::get_omp_synchronization_construction_stopwatch(), nest::MPIManager::increase_buffer_size_target_data(), nest::kernel(), nest::PerThreadBoolIndicator::logical_and(), nest::KernelManager::mpi_manager, nest::ConnectionManager::prepare_target_table(), recv_buffer_target_data_, nest::ConnectionManager::reset_source_table_entry_point(), resize_send_recv_buffers_target_data(), nest::ConnectionManager::restore_source_table_entry_point(), nest::ConnectionManager::save_source_table_entry_point(), send_buffer_target_data_, set_complete_marker_target_data_(), nest::PerThreadBoolIndicator::set_false(), nest::PerThreadBoolIndicator::set_true(), nest::Stopwatch< detailed_timer, threaded_timer >::start(), nest::Stopwatch< detailed_timer, threaded_timer >::stop(), sw_communicate_target_data_, and nest::KernelManager::vp_manager.
Referenced by nest::SimulationManager::update_connection_infrastructure().
| void nest::EventDeliveryManager::gather_target_data_compressed | ( | const size_t | tid | ) |
References nest::PerThreadBoolIndicator::all_false(), nest::PerThreadBoolIndicator::all_true(), nest::PerThreadBoolIndicator::any_false(), buffer_size_target_data_has_changed_, nest::ConnectionManager::clear_source_table(), collocate_target_data_buffers_compressed_(), nest::MPIManager::communicate_target_data_Alltoall(), nest::KernelManager::connection_manager, distribute_target_data_buffers_(), gather_completed_checker_, nest::VPManager::get_assigned_ranks(), nest::KernelManager::get_omp_synchronization_construction_stopwatch(), nest::MPIManager::increase_buffer_size_target_data(), nest::kernel(), nest::PerThreadBoolIndicator::logical_and(), nest::KernelManager::mpi_manager, nest::ConnectionManager::prepare_target_table(), recv_buffer_target_data_, resize_send_recv_buffers_target_data(), send_buffer_target_data_, set_complete_marker_target_data_(), nest::PerThreadBoolIndicator::set_false(), nest::PerThreadBoolIndicator::set_true(), nest::Stopwatch< detailed_timer, threaded_timer >::start(), nest::Stopwatch< detailed_timer, threaded_timer >::stop(), sw_communicate_target_data_, and nest::KernelManager::vp_manager.
Referenced by nest::SimulationManager::update_connection_infrastructure().
|
private |
Get required buffer size.
References nest::SendBufferPosition::end(), nest::MPIManager::get_num_processes(), nest::MPIManager::get_send_recv_count_spike_data_per_rank(), nest::kernel(), and nest::KernelManager::mpi_manager.
Referenced by gather_spike_data_().
|
inline |
Return (T+d) mod max_delay.
References moduli_.
Referenced by nest::RingBuffer::get_index_(), nest::MultRBuffer::get_index_(), nest::ListRingBuffer::get_index_(), nest::ignore_and_fire::handle(), nest::iaf_psc_alpha::handle(), nest::iaf_psc_exp::handle(), nest::iaf_tum_2000::handle(), nest::ignore_and_fire::handle(), nest::iaf_psc_alpha::handle(), nest::iaf_psc_exp::handle(), nest::iaf_tum_2000::handle(), nest::iaf_psc_exp::update(), nest::iaf_tum_2000::update(), and nest::iaf_psc_alpha::update().
|
inline |
return current communication style.
A result of true means off_grid, false means on_grid communication.
References off_grid_spiking_.
|
inline |
Index to slice-based buffer.
Return ((T+d)/min_delay) % ceil(max_delay/min_delay).
References slice_moduli_.
Referenced by nest::SliceRingBuffer::add_spike(), nest::SliceRingBuffer::discard_events(), and nest::SliceRingBuffer::prepare_delivery().
|
overridevirtual |
Retrieve the status of the manager.
Implements nest::ManagerInterface.
References nest::Stopwatch< detailed_timer, threaded_timer >::get_status(), nest::names::local_spike_counter(), local_spike_counter_, nest::names::off_grid_spiking(), off_grid_spiking_, send_recv_buffer_grow_extra_, send_recv_buffer_resize_log_, send_recv_buffer_shrink_limit_, send_recv_buffer_shrink_spare_, nest::names::spike_buffer_grow_extra(), nest::names::spike_buffer_resize_log(), nest::names::spike_buffer_shrink_limit(), nest::names::spike_buffer_shrink_spare(), sw_collocate_spike_data_, sw_communicate_spike_data_, sw_communicate_target_data_, nest::names::time_collocate_spike_data(), nest::names::time_collocate_spike_data_cpu(), nest::names::time_communicate_spike_data(), nest::names::time_communicate_spike_data_cpu(), nest::names::time_communicate_target_data(), nest::names::time_communicate_target_data_cpu(), and nest::BufferResizeLog::to_dict().
| void nest::EventDeliveryManager::init_moduli | ( | ) |
Initialize modulo table.
TODO: can probably be private
References nest::KernelManager::connection_manager, nest::SimulationManager::get_clock(), nest::ConnectionManager::get_max_delay(), nest::ConnectionManager::get_min_delay(), nest::Time::get_steps(), nest::kernel(), moduli_, nest::KernelManager::simulation_manager, and slice_moduli_.
Referenced by initialize(), and nest::SimulationManager::prepare().
|
overridevirtual |
Prepare manager for operation.
After this method has completed, the manager should be completely initialized and "ready for action".
| adjust_number_of_threads_or_rng_only | Pass true if calling from kernel_manager::change_number_of_threads() or RandomManager::get_status() to limit operations to those necessary for thread adjustment or switch or re-seeding of RNG. |
Implements nest::ManagerInterface.
References buffer_size_target_data_has_changed_, nest::BufferResizeLog::clear(), emitted_spikes_register_, gather_completed_checker_, nest::VPManager::get_num_threads(), nest::VPManager::get_thread_id(), init_moduli(), nest::PerThreadBoolIndicator::initialize(), nest::kernel(), local_spike_counter_, off_grid_emitted_spikes_register_, off_grid_spiking_, reset_counters(), reset_timers_for_dynamics(), reset_timers_for_preparation(), send_recv_buffer_grow_extra_, send_recv_buffer_resize_log_, send_recv_buffer_shrink_limit_, send_recv_buffer_shrink_spare_, and nest::KernelManager::vp_manager.
|
inlinestaticprivate |
Returns true if spike has been moved to MPI buffer, such that it can be removed by clean_spike_register.
Required static function by std::remove_if.
|
inline |
Return 1 - write_toggle().
This is useful for buffers that need to be read alternatingly by slice. The value is given by 1-write_toggle().
References write_toggle().
|
private |
Resets marker in MPI buffer that signals end of communication across MPI ranks.
References nest::SendBufferPosition::end(), nest::MPIManager::get_num_processes(), nest::kernel(), and nest::KernelManager::mpi_manager.
Referenced by gather_spike_data_().
|
virtual |
Set local spike counter to zero.
References local_spike_counter_.
Referenced by initialize(), and nest::SimulationManager::run().
|
inlineprivate |
Deletes all spikes from spike registers and resets spike counters.
References emitted_spikes_register_, and off_grid_emitted_spikes_register_.
Referenced by configure_spike_register(), and deliver_events().
|
virtual |
Set time measurements for internal profiling to zero (reg.
sim. dyn.)
References nest::Stopwatch< detailed_timer, threaded_timer >::reset(), sw_collocate_spike_data_, and sw_communicate_spike_data_.
Referenced by nest::KernelManager::change_number_of_threads(), initialize(), and nest::SimulationManager::prepare().
|
virtual |
Set time measurements for internal profiling to zero (reg.
prep.)
References nest::Stopwatch< detailed_timer, threaded_timer >::reset(), and sw_communicate_target_data_.
Referenced by nest::KernelManager::change_number_of_threads(), and initialize().
|
private |
References nest::kernel(), recv_buffer_off_grid_spike_data_, recv_buffer_spike_data_, send_buffer_off_grid_spike_data_, and send_buffer_spike_data_.
Referenced by configure_spike_data_buffers(), and gather_spike_data_().
| void nest::EventDeliveryManager::resize_send_recv_buffers_target_data | ( | ) |
References nest::kernel(), recv_buffer_target_data_, and send_buffer_target_data_.
Referenced by gather_target_data(), gather_target_data_compressed(), and nest::SimulationManager::update_connection_infrastructure().
|
inline |
|
inline |
Standard routine for sending events.
This method decides if the event has to be delivered locally or globally. It exists to keep a clean and unitary interface for the event sending mechanism.
References send_local_().
Referenced by nest::iaf_psc_exp_ps::emit_instant_spike_(), nest::iaf_psc_exp_ps_lossless::emit_instant_spike_(), nest::iaf_psc_alpha_ps::emit_instant_spike_(), nest::iaf_psc_delta_ps::emit_instant_spike_(), nest::iaf_psc_exp_ps::emit_spike_(), nest::iaf_psc_exp_ps_lossless::emit_spike_(), nest::iaf_psc_delta_ps::emit_spike_(), nest::iaf_psc_alpha_ps::emit_spike_(), nest::iaf_chs_2007::update(), nest::iaf_psc_exp::update(), nest::iaf_tum_2000::update(), nest::ignore_and_fire::update(), nest::ac_generator::update(), nest::amat2_psc_exp::update(), nest::binary_neuron< TGainfunction >::update(), nest::cm_default::update(), nest::dc_generator::update(), nest::eprop_iaf::update(), nest::eprop_iaf_adapt::update(), nest::eprop_iaf_adapt_bsshslm_2020::update(), nest::eprop_iaf_bsshslm_2020::update(), nest::eprop_iaf_psc_delta::update(), nest::eprop_iaf_psc_delta_adapt::update(), nest::gamma_sup_generator::update(), nest::gif_psc_exp::update(), nest::gif_psc_exp_multisynapse::update(), nest::glif_psc::update(), nest::glif_psc_double_alpha::update(), nest::iaf_psc_alpha::update(), nest::iaf_psc_alpha_multisynapse::update(), nest::iaf_psc_delta::update(), nest::iaf_psc_exp_htum::update(), nest::iaf_psc_exp_multisynapse::update(), nest::inhomogeneous_poisson_generator::update(), nest::izhikevich::update(), nest::mat2_psc_exp::update(), nest::mip_generator::update(), nest::multimeter::update(), nest::noise_generator::update(), nest::parrot_neuron::update(), nest::parrot_neuron_ps::update(), nest::poisson_generator::update(), nest::poisson_generator_ps::update(), nest::pp_psc_delta::update(), nest::ppd_sup_generator::update(), nest::pulsepacket_generator::update(), nest::sinusoidal_poisson_generator::update(), nest::spike_dilutor::update(), nest::spike_generator::update(), nest::spike_train_injector::update(), and nest::step_current_generator::update().
|
inline |
References nest::KernelManager::connection_manager, nest::kernel(), local_spike_counter_, send_local_(), send_off_grid_remote(), send_remote(), and nest::ConnectionManager::send_to_devices().
Send event e to all targets of node source on thread t.
|
inlineprivate |
Sends event e to all targets of node source.
Delivers events from devices directly to targets.
References nest::KernelManager::connection_manager, nest::kernel(), and nest::ConnectionManager::send_from_device().
Referenced by send(), send(), send(), and send_secondary().
|
inlineprivate |
References nest::KernelManager::connection_manager, nest::kernel(), and nest::ConnectionManager::send_from_device().
|
inline |
Add node ID of event sender to the spike_register.
Store event offset with node ID. An event sent through this method will remain in the queue until the network time has advanced by min_delay_ steps. After this period the buffers are collocated and sent to the partner machines.
Old documentation from network.h: Place an event in the global event queue. Add event to the queue to be delivered when it is due. At the delivery time, the target list of the sender is iterated and the event is delivered to all targets. The event is guaranteed to arrive at the receiver when all elements are updated and the system is in a synchronised (single threaded) state.
References nest::KernelManager::connection_manager, nest::ConnectionManager::get_remote_targets_of_local_node(), nest::kernel(), nest::VPManager::node_id_to_lid(), off_grid_emitted_spikes_register_, and nest::KernelManager::vp_manager.
Referenced by send().
|
inline |
Add node ID of event sender to the spike_register.
An event sent through this method will remain in the queue until the network time has advanced by min_delay_ steps. After this period the buffers are collocated and sent to the partner machines.
Old documentation from network.h: Place an event in the global event queue. Add event to the queue to be delivered when it is due. At the delivery time, the target list of the sender is iterated and the event is delivered to all targets. The event is guaranteed to arrive at the receiver when all elements are updated and the system is in a synchronised (single threaded) state.
References nest::KernelManager::connection_manager, emitted_spikes_register_, nest::ConnectionManager::get_remote_targets_of_local_node(), nest::kernel(), nest::VPManager::node_id_to_lid(), and nest::KernelManager::vp_manager.
Referenced by send().
|
inline |
Send a secondary event remote.
References nest::KernelManager::connection_manager, nest::ConnectionManager::get_secondary_send_buffer_positions(), nest::VPManager::get_thread_id(), nest::kernel(), nest::VPManager::node_id_to_lid(), send_buffer_secondary_events_, send_local_(), nest::ConnectionManager::send_to_devices(), and nest::KernelManager::vp_manager.
Referenced by nest::eprop_readout::update(), nest::eprop_readout_bsshslm_2020::update(), nest::step_rate_generator::update(), nest::rate_neuron_ipn< TNonlinearities >::update_(), nest::rate_neuron_opn< TNonlinearities >::update_(), and nest::rate_transformer_node< TNonlinearities >::update_().
|
inline |
Send event e directly to its target node.
This should be used only where necessary, e.g. if a node wants to reply to a *RequestEvent immediately.
|
private |
Sets marker in MPI buffer that signals end of communication across MPI ranks.
References nest::AssignedRanks::begin, nest::TargetSendBufferPosition::end(), nest::AssignedRanks::end, and send_buffer_target_data_.
Referenced by gather_target_data(), and gather_target_data_compressed().
|
private |
Set end marker for per-rank-chunks signalling completion and providing shrink/grow information.
References nest::SendBufferPosition::begin(), nest::SendBufferPosition::end(), nest::MPIManager::get_num_processes(), nest::MPIManager::get_send_recv_count_spike_data_per_rank(), nest::SendBufferPosition::idx(), nest::kernel(), and nest::KernelManager::mpi_manager.
Referenced by gather_spike_data_().
|
inline |
set communication style to off_grid (true) or on_grid
References off_grid_spiking_.
Referenced by nest::NodeManager::add_node(), and nest::spike_train_injector::pre_run_hook().
|
overridevirtual |
Set the status of the manager.
Implements nest::ManagerInterface.
References nest::names::off_grid_spiking(), off_grid_spiking_, send_recv_buffer_grow_extra_, send_recv_buffer_shrink_limit_, send_recv_buffer_shrink_spare_, nest::names::spike_buffer_grow_extra(), nest::names::spike_buffer_shrink_limit(), nest::names::spike_buffer_shrink_spare(), and Dictionary::update_value().
| void nest::EventDeliveryManager::update_moduli | ( | ) |
Update modulo table based on current time settings.
This function is called after all nodes have been updated. We can compute the value of (T+d) mod max_delay without explicit reference to the network clock, because compute_moduli_ is called whenever the network clock advances. The various modulos for all available delays are stored in a lookup-table and this table is rotated once per time slice.
Update table of fixed modulos, including slice-based.
References nest::KernelManager::connection_manager, nest::SimulationManager::get_clock(), nest::ConnectionManager::get_max_delay(), nest::ConnectionManager::get_min_delay(), nest::Time::get_steps(), nest::kernel(), moduli_, nest::KernelManager::simulation_manager, and slice_moduli_.
Referenced by nest::SimulationManager::advance_time_().
| void nest::EventDeliveryManager::write_done_marker_secondary_events_ | ( | const bool | done | ) |
References nest::MPIManager::get_done_marker_position_in_secondary_events_send_buffer(), nest::MPIManager::get_num_processes(), nest::kernel(), nest::KernelManager::mpi_manager, and send_buffer_secondary_events_.
Referenced by gather_secondary_events().
|
inline |
Return 0 for even, 1 for odd time slices.
This is useful for buffers that need to be written alternatingly by time slice. The value is given by get_slice_() % 2.
References nest::SimulationManager::get_slice(), nest::kernel(), and nest::KernelManager::simulation_manager.
Referenced by read_toggle().
|
private |
whether size of MPI buffer for communication of connections was changed
Referenced by gather_target_data(), gather_target_data_compressed(), and initialize().
|
private |
Register of emitted spikes.
All spikes to be delivered non-locally are first written to this register by the thread generating the spike. They are later transferred to communication buffers and exchanged globally.
The outer dimension represents the thread generating the spikes, the second dimension the individual spikes.
Referenced by finalize(), gather_spike_data_(), initialize(), reset_spike_register_(), and send_remote().
|
private |
Referenced by gather_target_data(), gather_target_data_compressed(), and initialize().
|
private |
Largest number of spikes sent from any rank to any other rank in last spike exchange round.
The spike buffer section for any rank must be at least this size. Therefore, this number controls buffer resizing.
Referenced by gather_spike_data_().
|
private |
Number of generated spike events (both off- and on-grid) during the last call to simulate.
Referenced by get_status(), initialize(), reset_counters(), and send().
|
private |
Table of pre-computed modulos.
This table is used to map time steps, given as offset from now, to ring-buffer bins. There are min_delay+max_delay bins in a ring buffer, and the moduli_ array is rotated by min_delay elements after each slice is completed.
Referenced by get_modulo(), init_moduli(), and update_moduli().
|
private |
Register of emitted off-grid spikes.
All off-grid spikes to be delivered non-locally are first written to this register by the thread generating the spike. They are later transferred to communication buffers and exchanged globally.
The outer dimension represents the thread generating the spikes, the second dimension the individual spikes.
Referenced by finalize(), gather_spike_data_(), initialize(), reset_spike_register_(), and send_off_grid_remote().
|
private |
indicates whether spikes are not constrained to the grid
Referenced by deliver_events(), gather_spike_data(), gather_spike_data_(), get_off_grid_communication(), get_status(), initialize(), set_off_grid_communication(), and set_status().
|
private |
Referenced by deliver_events(), finalize(), gather_spike_data(), and resize_send_recv_buffers_spike_data_().
|
private |
Referenced by configure_secondary_buffers(), deliver_secondary_events(), finalize(), and gather_secondary_events().
|
private |
Referenced by deliver_events(), finalize(), gather_spike_data(), and resize_send_recv_buffers_spike_data_().
|
private |
|
private |
Referenced by configure_spike_data_buffers(), finalize(), gather_spike_data(), and resize_send_recv_buffers_spike_data_().
|
private |
Buffer to collect the secondary events after serialization.
Referenced by configure_secondary_buffers(), finalize(), gather_secondary_events(), send_secondary(), and write_done_marker_secondary_events_().
|
private |
Referenced by configure_spike_data_buffers(), finalize(), gather_spike_data(), and resize_send_recv_buffers_spike_data_().
|
private |
|
private |
when growing, add this fraction extra space
Referenced by gather_spike_data_(), get_status(), initialize(), and set_status().
|
private |
Log all resize events.
This is maintained by the main thread, which is responsible for communication and resizing.
Referenced by gather_spike_data_(), get_status(), and initialize().
|
private |
shrink buffer only if below this limit
Referenced by gather_spike_data_(), get_status(), initialize(), and set_status().
|
private |
leave this fraction more space than minimally needed
Referenced by gather_spike_data_(), get_status(), initialize(), and set_status().
|
private |
Table of pre-computed slice-based modulos.
This table is used to map time steps, give as offset from now, to slice-based ring-buffer bins. There are ceil(max_delay/min_delay) bins in a slice-based ring buffer, one per slice within max_delay. Since max_delay may not be a multiple of min_delay, we cannot simply rotate the table content after each slice, but have to recompute the table anew.
Referenced by get_slice_modulo(), init_moduli(), and update_moduli().
|
private |
Referenced by gather_spike_data_(), get_status(), and reset_timers_for_dynamics().
|
private |
Referenced by gather_spike_data_(), get_status(), and reset_timers_for_dynamics().
|
private |
Referenced by gather_target_data(), gather_target_data_compressed(), get_status(), and reset_timers_for_preparation().