NEST
2.6.0,not_revisioned_source_dir@0
|
Schedule update of Nodes and Events during simulation. More...
#include <scheduler.h>
Public Member Functions | |
Scheduler (Network &) | |
virtual | ~Scheduler () |
void | reset () |
Bring scheduler back to its initial state. More... | |
void | clear_pending_spikes () |
Clear all pending spikes, but do not otherwise manipulate scheduler. More... | |
void | simulate (Time const &) |
Simulate for the given time . More... | |
void | resume () |
Resume simulation after an interrupt. More... | |
void | prepare_simulation () |
All steps that must be done before a simulation. More... | |
void | finalize_simulation () |
Cleanup after the simulation. More... | |
void | terminate () |
void | send_remote (thread p, SpikeEvent &, const long_t lag=0) |
Add global id of event sender to the spike_register. More... | |
void | send_offgrid_remote (thread p, SpikeEvent &, const long_t lag=0) |
Add global id of event sender to the spike_register. More... | |
Node * | thread_lid_to_node (thread t, targetindex thread_local_id) const |
thread | get_num_threads () const |
Return the number of threads used during simulation. More... | |
void | set_num_threads (thread n_threads) |
Set the number of threads by setting the internal variable n_threads_, the corresponding value in the Communicator, and the OpenMP number of threads. More... | |
thread | get_num_processes () const |
Return the number of processes used during simulation. More... | |
thread | get_num_rec_processes () const |
thread | get_num_sim_processes () const |
void | set_num_rec_processes (int nrp, bool called_by_reset=false) |
Set number of recording processes, switches NEST to global spike detection mode. More... | |
void | increment_n_gsd () |
Increment total number of global spike detectors by 1. More... | |
index | get_n_gsd () |
Get total number of global spike detectors. More... | |
bool | is_local_node (Node *) const |
Return true if the node on the local machine, false if not. More... | |
bool | is_local_vp (thread) const |
Return true if the thread is on the local machine, false if not. More... | |
thread | suggest_vp (index gid) const |
Return a thread number for a given global node id. More... | |
thread | suggest_rec_vp (index gid) const |
Return a thread number for a given global recording node id. More... | |
thread | vp_to_thread (thread vp) const |
thread | thread_to_vp (thread t) const |
thread | get_global_thread_id (thread lt) const |
Return the global thread id of a local thread. More... | |
thread | get_process_id (thread vp) const |
Return the process id for a given virtual process. More... | |
bool | get_simulated () const |
Return true, if the network has already been simulated for some time. More... | |
void | set_off_grid_communication (bool off_grid_spiking) |
set communication style to off_grid (true) or on_grid More... | |
bool | get_off_grid_communication () const |
return current communication style. More... | |
Time const & | get_slice_origin () const |
Time at beginning of current slice. More... | |
Time | get_previous_slice_origin () const |
Time at beginning of previous slice. More... | |
Time const | get_time () const |
Precise time of simulation. More... | |
void | update () |
Update all non-frozen nodes. More... | |
void | set_network_ (Network *) |
void | set_status (const DictionaryDatum &) |
void | get_status (DictionaryDatum &) const |
librandom::RngPtr | get_rng (const thread) const |
Return pointer to random number generator of the specified thread. More... | |
librandom::RngPtr | get_grng () const |
Return pointer to global random number generator. More... | |
size_t | get_slice () const |
Get slice number. More... | |
void | calibrate_clock () |
Calibrate clock after resolution change. More... | |
void | ensure_valid_thread_local_ids () |
Ensure that all nodes in the network have valid thread-local IDs. More... | |
Static Public Member Functions | |
static delay | get_modulo (delay d) |
Return (T+d) mod max_delay. More... | |
static delay | get_slice_modulo (delay d) |
Index to slice-based buffer. More... | |
static delay | get_min_delay () |
Return minimal connection delay. More... | |
static delay | get_max_delay () |
Return maximal connection delay. More... | |
Private Member Functions | |
void | init_ () |
Initialize the scheduler by initializing the buffers. More... | |
void | finalize_ () |
Finalize the scheduler by freeing the buffers and destoying the mutexes. More... | |
void | advance_time_ () |
void | print_progress_ () |
void | prepare_nodes () |
Prepare nodes for simulation and register nodes in node_list. More... | |
void | prepare_node_ (Node *) |
Initialized buffers, register in list of nodes to update/finalize. More... | |
void | finalize_nodes () |
Invoke finalize() on nodes registered for finalization. More... | |
void | compute_moduli_ () |
Re-compute table of fixed modulos, including slice-based. More... | |
void | init_moduli_ () |
void | create_rngs_ (const bool ctor_call=false) |
void | create_grng_ (const bool ctor_call=false) |
void | configure_spike_buffers_ () |
Resize spike_register and comm_buffer to correct dimensions. More... | |
void | update_nodes_vec_ () |
Create up-to-date vector of local nodes, nodes_vec_. More... | |
void | collocate_buffers_ () |
Rearrange the spike_register into a 2-dim structure. More... | |
void | gather_events_ () |
Collocate buffers and exchange events with other MPI processes. More... | |
void | deliver_events_ (thread t) |
Read all event buffers for thread t and send the corresponding Events to the Nodes that are targeted. More... | |
Static Private Member Functions | |
static void | update_delay_extrema_ () |
Update delay extrema to current values. More... | |
Private Attributes | |
bool | initialized_ |
bool | simulating_ |
true if simulation in progress More... | |
bool | force_singlethreading_ |
index | n_threads_ |
Number of threads per process. More... | |
index | n_rec_procs_ |
MPI processes dedicated for recording devices. More... | |
index | n_sim_procs_ |
MPI processes used for simulation. More... | |
index | n_gsd_ |
Total number of global spike detectors, used for distributing them over recording processes. More... | |
volatile index | entry_counter_ |
Counter for entry barrier. More... | |
volatile index | exit_counter_ |
Counter for exit barrier. More... | |
vector< vector< Node * > > | nodes_vec_ |
Nodelists for nodes for each thread. More... | |
index | nodes_vec_network_size_ |
Network size when nodes_vec_ was last updated. More... | |
Time | clock_ |
Network clock, updated once per slice. More... | |
delay | slice_ |
current update slice More... | |
delay | to_do_ |
number of pending cycles. More... | |
delay | to_do_total_ |
number of requested cycles in current simulation. More... | |
delay | from_step_ |
update clock_+from_step<=T<clock_+to_step_ More... | |
delay | to_step_ |
update clock_+from_step<=T<clock_+to_step_ More... | |
timeval | t_slice_begin_ |
Wall-clock time at the begin of a time slice. More... | |
timeval | t_slice_end_ |
Wall-clock time at the end of time slice. More... | |
long | t_real_ |
Accumunated wall-clock time spent simulating (in us) More... | |
bool | terminate_ |
Terminate on signal or error. More... | |
bool | simulated_ |
indicates whether the network has already been simulated for some time More... | |
bool | off_grid_spiking_ |
indicates whether spikes are not constrained to the grid More... | |
bool | print_time_ |
Indicates whether time should be printed during simulations (or not) More... | |
std::vector< long_t > | rng_seeds_ |
The seeds of the local RNGs. These do not neccessarily describe the state of the RNGs. More... | |
long_t | grng_seed_ |
The seed of the global RNG, not neccessarily describing the state of the GRNG. More... | |
vector< librandom::RngPtr > | rng_ |
Vector of random number generators for threads. More... | |
librandom::RngPtr | grng_ |
Global random number generator. More... | |
std::vector< std::vector < std::vector< uint_t > > > | spike_register_ |
Register for gids of neurons that spiked. More... | |
std::vector< std::vector < std::vector< OffGridSpike > > > | offgrid_spike_register_ |
Register for off-grid spikes. More... | |
std::vector< uint_t > | local_grid_spikes_ |
Buffer containing the gids of local neurons that spiked in the last min_delay_ interval. More... | |
std::vector< uint_t > | global_grid_spikes_ |
Buffer containing the gids of all neurons that spiked in the last min_delay_ interval. More... | |
std::vector< OffGridSpike > | local_offgrid_spikes_ |
Buffer containing the gids and offsets for local neurons that fired off-grid spikes in the last min_delay_ interval. More... | |
std::vector< OffGridSpike > | global_offgrid_spikes_ |
Buffer containing the gids and offsets for all neurons that fired off-grid spikes in the last min_delay_ interval. More... | |
std::vector< int > | displacements_ |
Buffer containing the starting positions for the spikes from each process within the global_(off)grid_spikes_ buffer. More... | |
Static Private Attributes | |
static Network * | net_ = 0 |
Pointer to network object. More... | |
static delay | min_delay_ = 1 |
Value of the smallest delay in the network. More... | |
static delay | max_delay_ = 1 |
Value of the largest delay in the network. More... | |
static vector< delay > | moduli_ |
Table of pre-computed modulos. More... | |
static vector< delay > | slice_moduli_ |
Table of pre-computed slice-based modulos. More... | |
static const delay | comm_marker_ = 0 |
Marker Value to be put between the data fields from different time steps during communication. More... | |
Schedule update of Nodes and Events during simulation.
The scheduler controls a number of threads which are responsible for updating a batch of Nodes independently from each other. The number of threads as well as the batch size of each thread can be configured with get_status and set_status methods.
The scheduler also controls the random number clients which are associated to the threads.
The scheduler is usually hidden inside the network class. Thus, its interface is of little interest to the "normal" model developer.
|
virtual |
|
private |
Referenced by prepare_nodes().
|
inline |
Calibrate clock after resolution change.
References nest::Time::calibrate(), and clock_.
Referenced by nest::Network::calibrate_clock().
void nest::Scheduler::clear_pending_spikes | ( | ) |
Clear all pending spikes, but do not otherwise manipulate scheduler.
Referenced by nest::Network::reset_network().
|
private |
Rearrange the spike_register into a 2-dim structure.
This is done by collecting the spikes from all threads in each slice of the min_delay_ interval.
Referenced by prepare_nodes().
|
private |
Re-compute table of fixed modulos, including slice-based.
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.
References assert(), and nest::names::d.
|
private |
Resize spike_register and comm_buffer to correct dimensions.
Resizes also offgrid_*_buffer_. This is done by resume() 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 Scheduler::set_status() ensure this.
References assert(), nest::names::clear, nest::Communicator::get_num_processes(), and nest::Communicator::set_buffer_sizes().
|
private |
Referenced by prepare_nodes().
|
private |
Referenced by prepare_nodes().
|
private |
Read all event buffers for thread t and send the corresponding Events to the Nodes that are targeted.
Referenced by prepare_nodes().
|
inline |
Ensure that all nodes in the network have valid thread-local IDs.
References update_nodes_vec_().
Referenced by nest::Network::ensure_valid_thread_local_ids().
|
private |
Finalize the scheduler by freeing the buffers and destoying the mutexes.
|
private |
Invoke finalize() on nodes registered for finalization.
Referenced by prepare_nodes().
void nest::Scheduler::finalize_simulation | ( | ) |
Cleanup after the simulation.
References nest::Communicator::get_num_processes(), nest::Communicator::grng_synchrony(), and SLIInterpreter::M_ERROR.
|
private |
Collocate buffers and exchange events with other MPI processes.
Referenced by prepare_nodes().
Return the global thread id of a local thread.
|
inline |
Return pointer to global random number generator.
References grng_.
Referenced by nest::Network::get_grng().
|
inlinestatic |
Return maximal connection delay.
References max_delay_.
Referenced by nest::Event::get_max_delay(), nest::Network::get_max_delay(), nest::RingBuffer::resize(), nest::SliceRingBuffer::resize(), nest::MultRBuffer::resize(), and nest::ListRingBuffer::resize().
|
inlinestatic |
Return minimal connection delay.
References min_delay_.
Referenced by nest::volume_transmitter::calibrate(), nest::ListRingBuffer::get_list(), nest::Network::get_min_delay(), nest::RingBuffer::get_value(), nest::MultRBuffer::get_value(), nest::correlomatrix_detector::handle(), nest::RingBuffer::resize(), nest::SliceRingBuffer::resize(), nest::MultRBuffer::resize(), nest::ListRingBuffer::resize(), nest::binary_neuron< TGainfunction >::update(), nest::iaf_psc_exp_multisynapse::update(), nest::pulsepacket_generator::update(), nest::iaf_psc_alpha_multisynapse::update(), nest::poisson_generator_ps::update(), nest::gamma_sup_generator::update(), nest::parrot_neuron_ps::update(), nest::ppd_sup_generator::update(), nest::parrot_neuron::update(), nest::sinusoidal_poisson_generator::update(), nest::aeif_cond_alpha_multisynapse::update(), nest::iaf_chs_2007::update(), nest::iaf_cond_exp::update(), nest::poisson_generator::update(), nest::izhikevich::update(), nest::sli_neuron::update(), nest::mip_generator::update(), nest::aeif_cond_alpha_RK5::update(), nest::volume_transmitter::update(), nest::iaf_chxk_2008::update(), nest::hh_cond_exp_traub::update(), nest::iaf_cond_exp_sfa_rr::update(), nest::iaf_cond_alpha::update(), nest::sinusoidal_gamma_generator::update(), nest::iaf_psc_exp::update(), nest::aeif_cond_alpha::update(), nest::iaf_neuron::update(), nest::iaf_psc_delta::update(), nest::mat2_psc_exp::update(), nest::aeif_cond_exp::update(), nest::iaf_psc_alpha::update(), nest::iaf_tum_2000::update(), nest::ht_neuron::update(), nest::amat2_psc_exp::update(), nest::hh_psc_alpha::update(), nest::pp_psc_delta::update(), nest::pp_pop_psc_delta::update(), nest::iaf_cond_alpha_mc::update(), nest::iaf_psc_alpha_presc::update(), nest::iaf_psc_exp_ps::update(), nest::iaf_psc_alpha_canon::update(), and nest::iaf_psc_delta_canon::update().
Return (T+d) mod max_delay.
References assert(), nest::names::d, and moduli_.
Referenced by nest::RingBuffer::get_index_(), nest::MultRBuffer::get_index_(), and nest::ListRingBuffer::get_index_().
|
inline |
Get total number of global spike detectors.
References n_gsd_.
Referenced by nest::Network::add_node().
|
inline |
Return the number of processes used during simulation.
This functions returns the number of processes. Since each process has the same number of threads, the total number of threads is given by get_num_threads()*get_num_processes().
References nest::Communicator::get_num_processes().
Referenced by nest::Network::get_num_processes().
|
inline |
References n_rec_procs_.
Referenced by nest::Network::add_node(), and nest::Network::get_num_rec_processes().
|
inline |
References n_sim_procs_.
Referenced by nest::Network::add_node(), and nest::Network::get_num_sim_processes().
|
inline |
Return the number of threads used during simulation.
This functions returns the number of threads per process. Since each process has the same number of threads, the total number of threads is given by get_num_threads()*get_num_processes().
References n_threads_.
Referenced by nest::Network::get_num_threads().
|
inline |
return current communication style.
A result of true means off_grid, false means on_grid communication.
References off_grid_spiking_.
Referenced by nest::Network::get_off_grid_communication().
|
inline |
Time at beginning of previous slice.
References clock_, min_delay_, and nest::Time::step.
Referenced by nest::Network::get_previous_slice_origin().
Return the process id for a given virtual process.
The real process' id of a virtual process is defined by the relation: p = (vp mod P), where P is the total number of processes.
References n_rec_procs_, n_sim_procs_, and n_threads_.
Referenced by is_local_vp().
|
inline |
Return pointer to random number generator of the specified thread.
References assert(), and rng_.
Referenced by nest::Network::get_rng().
|
inline |
Return true, if the network has already been simulated for some time.
This does NOT indicate that simulate has been called (i.e. if Simulate is called with 0 as argument, the flag is still set to false.)
References simulated_.
Referenced by nest::Network::get_simulated(), and nest::Network::reset_network().
|
inline |
Get slice number.
Increased by one for each slice. Can be used to choose alternating buffers.
References slice_.
Referenced by nest::Network::write_toggle().
Index to slice-based buffer.
Return ((T+d)/min_delay) % ceil(max_delay/min_delay).
References assert(), nest::names::d, and slice_moduli_.
Referenced by nest::SliceRingBuffer::add_spike(), nest::SliceRingBuffer::discard_events(), and nest::SliceRingBuffer::prepare_delivery().
|
inline |
Time at beginning of current slice.
References clock_.
Referenced by nest::Network::get_slice_origin().
void nest::Scheduler::get_status | ( | DictionaryDatum & | ) | const |
Referenced by nest::Network::get_status(), and prepare_nodes().
|
inline |
Precise time of simulation.
References assert(), clock_, from_step_, simulating_, and nest::Time::step.
Referenced by nest::Network::get_time().
|
inline |
Increment total number of global spike detectors by 1.
References n_gsd_.
Referenced by nest::Network::add_node().
|
private |
Initialize the scheduler by initializing the buffers.
References assert(), nest::Communicator::get_num_processes(), and SLIInterpreter::M_ERROR.
Referenced by Scheduler().
|
private |
References assert(), and nest::names::d.
|
inline |
Return true if the node on the local machine, false if not.
References nest::Node::get_vp(), and is_local_vp().
|
inline |
Return true if the thread is on the local machine, false if not.
References get_process_id(), and nest::Communicator::get_rank().
Referenced by is_local_node(), and nest::Network::is_local_vp().
|
inlineprivate |
Initialized buffers, register in list of nodes to update/finalize.
References nest::Node::calibrate(), and nest::Node::init_buffers().
|
private |
Prepare nodes for simulation and register nodes in node_list.
Calls prepare_node_() for each pertaining Node.
References ad, advance_time_(), assert(), collocate_buffers_(), nest::Communicator::communicate(), create_grng_(), librandom::RandomGen::create_knuthlfg_rng(), create_rngs_(), nest::names::d, librandom::RandomGen::DefaultSeed, deliver_events_(), numerics::e, nest::Node::finalize(), finalize_nodes(), gather_events_(), nest::Time::get_ms(), nest::Time::get_ms_per_tic(), nest::Communicator::get_num_processes(), nest::Communicator::get_num_virtual_processes(), nest::Communicator::get_recv_buffer_size(), nest::Time::get_resolution(), nest::Communicator::get_send_buffer_size(), get_status(), nest::Node::get_thread(), nest::Node::get_thread_sibling_(), nest::Time::get_tics_per_ms(), nest::Time::get_tics_per_step(), nest::Communicator::get_use_Allgather(), getValue< long >(), PoorMansAllocator::init(), nest::Node::is_subnet(), SLIInterpreter::M_ERROR, SLIInterpreter::M_INFO, SLIInterpreter::M_WARNING, nest::Time::max(), MAX_THREAD, nest::KernelException::message(), WrappedThreadException::message(), nest::DimensionMismatch::message(), nest::Time::min(), nest::names::n, nest::Node::num_thread_siblings_(), omp_set_num_threads(), print_progress_(), nest::Time::resolution_is_default(), seed, set_num_rec_processes(), set_num_threads(), nest::Communicator::set_num_threads(), nest::Event::set_offset(), nest::Time::set_resolution(), nest::Event::set_sender_gid(), nest::Event::set_stamp(), set_status(), nest::Node::set_thread_lid(), nest::TimeModifier::set_time_representation(), nest::Communicator::set_use_Allgather(), TokenArray::size(), nest::Time::step, nest::TimeZero, update_nodes_vec_(), and nest::names::vp.
void nest::Scheduler::prepare_simulation | ( | ) |
All steps that must be done before a simulation.
References nest::Communicator::enter_runtime(), nest::Time::get_ms(), nest::Communicator::get_num_processes(), nest::Time::get_resolution(), nest::Communicator::grng_synchrony(), SLIInterpreter::M_ERROR, and SLIInterpreter::M_INFO.
|
private |
Referenced by prepare_nodes().
void nest::Scheduler::reset | ( | ) |
Bring scheduler back to its initial state.
References nest::TimeModifier::reset_to_defaults().
Referenced by nest::Network::reset().
void nest::Scheduler::resume | ( | ) |
Resume simulation after an interrupt.
References assert(), SLIInterpreter::M_ERROR, SLIInterpreter::M_INFO, SLIsignalflag, nest::Communicator::synchronize(), and nest::names::update.
Referenced by nest::Network::resume().
|
inline |
Add global id of event sender to the spike_register.
Store event offset with global 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::Node::get_gid(), nest::SpikeEvent::get_multiplicity(), nest::Event::get_offset(), nest::Event::get_sender(), offgrid_spike_register_, and push_back().
|
inline |
Add global 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::Node::get_gid(), nest::SpikeEvent::get_multiplicity(), nest::Event::get_sender(), push_back(), and spike_register_.
void nest::Scheduler::set_network_ | ( | Network * | ) |
void nest::Scheduler::set_num_rec_processes | ( | int | nrp, |
bool | called_by_reset = false |
||
) |
Set number of recording processes, switches NEST to global spike detection mode.
nrp | number of recording processes |
called_by_reset | pass true when calling from Scheduler::reset() |
called_by_reset
parameter is a cludge to avoid a chicken-and-egg problem when resetting the kernel. It surpresses a test for existing nodes, trusting that the kernel will immediately afterwards delete all existing nodes. Referenced by prepare_nodes(), nest::Network::reset_kernel(), and nest::Network::set_num_rec_processes().
void nest::Scheduler::set_num_threads | ( | thread | n_threads | ) |
Set the number of threads by setting the internal variable n_threads_, the corresponding value in the Communicator, and the OpenMP number of threads.
Referenced by prepare_nodes(), and nest::Network::reset_kernel().
|
inline |
set communication style to off_grid (true) or on_grid
References off_grid_spiking_.
Referenced by nest::Network::add_node().
void nest::Scheduler::set_status | ( | const DictionaryDatum & | ) |
Referenced by prepare_nodes(), and nest::Network::set_status().
void nest::Scheduler::simulate | ( | Time const & | t | ) |
Simulate for the given time .
This function performs the following steps
References assert(), nest::Time::get_resolution(), nest::Time::get_steps(), nest::Time::is_finite(), SLIInterpreter::M_ERROR, SLIInterpreter::M_WARNING, and nest::Time::max().
Referenced by nest::Network::simulate().
Return a thread number for a given global recording node id.
Each node has a default thread on which it will run. The thread is defined by the relation: t = (gid div P) mod T, where P is the number of recording processes and T the number of threads. This may be used by network::add_node() if the user has not specified anything.
References n_rec_procs_, n_sim_procs_, and n_threads_.
Referenced by nest::Network::suggest_rec_vp().
Return a thread number for a given global node id.
Each node has a default thread on which it will run. The thread is defined by the relation: t = (gid div P) mod T, where P is the number of simulation processes and T the number of threads. This may be used by network::add_node() if the user has not specified anything.
References n_sim_procs_, and n_threads_.
Referenced by nest::Network::suggest_vp().
|
inline |
References terminate_.
Referenced by nest::Network::execute_sli_protected(), and nest::Network::terminate().
|
inline |
References nodes_vec_, and nest::names::thread_local_id.
Referenced by nest::Network::thread_lid_to_node().
References nest::Communicator::get_rank(), n_rec_procs_, n_sim_procs_, and n_threads_.
Referenced by nest::Network::thread_to_vp().
void nest::Scheduler::update | ( | ) |
Update all non-frozen nodes.
This function uses OpenMP for multi-threading if enabled at configure time and runs with a single thread otherwise.
References nest::Communicator::advance_music_time(), numerics::e, SLIInterpreter::M_INFO, and SLIsignalflag.
|
staticprivate |
Update delay extrema to current values.
Static since it only operates in static variables. This allows it to be called from const-method get_status() as well.
References nest::Communicator::communicate(), nest::Communicator::get_num_processes(), nest::Communicator::get_rank(), nest::Time::get_resolution(), nest::Time::get_steps(), and nest::Time::pos_inf().
|
private |
Create up-to-date vector of local nodes, nodes_vec_.
This method also sets the thread-local ID on all local nodes.
Referenced by ensure_valid_thread_local_ids(), and prepare_nodes().
References nest::Communicator::get_rank(), n_rec_procs_, n_sim_procs_, and n_threads_.
Referenced by nest::Network::vp_to_thread().
|
private |
Network clock, updated once per slice.
Referenced by calibrate_clock(), get_previous_slice_origin(), get_slice_origin(), and get_time().
|
staticprivate |
Marker Value to be put between the data fields from different time steps during communication.
|
private |
Buffer containing the starting positions for the spikes from each process within the global_(off)grid_spikes_ buffer.
|
private |
Counter for entry barrier.
|
private |
Counter for exit barrier.
|
private |
|
private |
update clock_+from_step<=T<clock_+to_step_
Referenced by get_time().
|
private |
Buffer containing the gids of all neurons that spiked in the last min_delay_ interval.
The single slices are separated by a marker value
|
private |
Buffer containing the gids and offsets for all neurons that fired off-grid spikes in the last min_delay_ interval.
The single slices are separated by a marker value.
|
private |
Global random number generator.
This rng must be synchronized on all threads
Referenced by get_grng().
|
private |
The seed of the global RNG, not neccessarily describing the state of the GRNG.
|
private |
|
private |
Buffer containing the gids of local neurons that spiked in the last min_delay_ interval.
The single slices are separated by a marker value.
|
private |
Buffer containing the gids and offsets for local neurons that fired off-grid spikes in the last min_delay_ interval.
The single slices are separated by a marker value.
|
staticprivate |
Value of the largest delay in the network.
Static because get_max_delay() must be static to allow access from neuron models.
Referenced by get_max_delay().
|
staticprivate |
Value of the smallest delay in the network.
Static because get_min_delay() must be static to allow access from neuron models.
Referenced by get_min_delay(), and get_previous_slice_origin().
|
staticprivate |
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().
|
private |
Total number of global spike detectors, used for distributing them over recording processes.
Referenced by get_n_gsd(), and increment_n_gsd().
|
private |
MPI processes dedicated for recording devices.
Referenced by get_num_rec_processes(), get_process_id(), suggest_rec_vp(), thread_to_vp(), and vp_to_thread().
|
private |
MPI processes used for simulation.
Referenced by get_num_sim_processes(), get_process_id(), suggest_rec_vp(), suggest_vp(), thread_to_vp(), and vp_to_thread().
|
private |
Number of threads per process.
Referenced by get_num_threads(), get_process_id(), suggest_rec_vp(), suggest_vp(), thread_to_vp(), and vp_to_thread().
|
staticprivate |
Pointer to network object.
Maintained as a static pointer so that update_delay_extrema_() can be a static function and update thet static min/max_delay_ variables even from get_status() const.
Referenced by Scheduler().
|
private |
Nodelists for nodes for each thread.
Referenced by thread_lid_to_node().
|
private |
Network size when nodes_vec_ was last updated.
|
private |
indicates whether spikes are not constrained to the grid
Referenced by get_off_grid_communication(), and set_off_grid_communication().
|
private |
Register for off-grid spikes.
This is a 3-dim structure.
Referenced by send_offgrid_remote().
|
private |
Indicates whether time should be printed during simulations (or not)
|
private |
Vector of random number generators for threads.
There must be PRECISELY one rng per thread.
Referenced by get_rng().
|
private |
The seeds of the local RNGs. These do not neccessarily describe the state of the RNGs.
|
private |
indicates whether the network has already been simulated for some time
Referenced by get_simulated().
|
private |
true if simulation in progress
Referenced by get_time().
|
private |
current update slice
Referenced by get_slice().
|
staticprivate |
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().
|
private |
Register for gids of neurons that spiked.
This is a 3-dim structure.
Referenced by send_remote().
|
private |
Accumunated wall-clock time spent simulating (in us)
|
private |
Wall-clock time at the begin of a time slice.
|
private |
Wall-clock time at the end of time slice.
|
private |
Terminate on signal or error.
Referenced by terminate().
|
private |
number of pending cycles.
|
private |
number of requested cycles in current simulation.
|
private |
update clock_+from_step<=T<clock_+to_step_