53 void finalize(
const bool )
override;
122 void print( std::ostream& )
const;
343 std::vector< size_t >
378 return local_nodes_[ t ].get_node_by_index( thread_local_id );
381inline const std::vector< Node* >&
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
Interface for kernel manager classes.
Definition manager_interface.h:46
Base class for all Models.
Definition model.h:53
Definition node_manager.h:47
const SparseNodeArray & get_local_nodes(size_t) const
Return a reference to the thread-local nodes of thread t.
Definition node_manager.h:394
bool is_local_node_id(size_t node_id) const
Return true, if the given node ID is on the local machine.
Definition node_manager.cpp:409
bool thread_local_data_is_up_to_date() const
Return true if thread-local data structures and thread-local node IDs are up to date.
Definition node_manager.h:412
void add_music_nodes_(Model &model, size_t min_node_id, size_t max_node_id)
Add MUSIC nodes.
Definition node_manager.cpp:271
size_t get_num_thread_local_devices(size_t t) const
Returns the number of devices per thread.
Definition node_manager.cpp:423
~NodeManager() override
Definition node_manager.cpp:61
bool is_local_node(Node *) const
Return true, if the given Node is on the local machine.
Definition node_manager.cpp:403
void append_node_collection_(NodeCollectionPTR ncp)
Append the NodeCollection instance into the NodeManager::nodeCollection_container.
Definition node_manager.cpp:324
size_t num_active_nodes_
Network size when local node data was last updated.
Definition node_manager.h:355
std::vector< size_t > node_collection_last_
Store the ID of the last element in each NodeCollection instance.
Definition node_manager.h:344
void init_()
Initialize the network data structures.
void finalize_nodes()
Invoke finalize() on all nodes.
Definition node_manager.cpp:676
void prepare_nodes()
Prepare nodes for simulation and register nodes in node_list.
Definition node_manager.cpp:599
std::vector< size_t > num_thread_local_devices_
stores number of thread local devices
Definition node_manager.h:357
bool wfr_is_used_
there is at least one node that uses waveform relaxation
Definition node_manager.h:351
bool have_nodes_changed_
true if new nodes have been created since startup or last call to simulate
Definition node_manager.h:359
NodeCollectionPTR add_node(size_t m, long n=1)
Add a number of nodes to the network.
Definition node_manager.cpp:103
std::vector< std::vector< Node * > > wfr_nodes_vec_
Nodelists for unfrozen nodes that use the waveform relaxation method.
Definition node_manager.h:349
Node * thread_lid_to_node(size_t t, targetindex thread_local_id) const
Return node on thread t with given local node id.
Definition node_manager.h:376
Node * get_mpi_local_node_or_device_head(size_t)
Return pointer of Node on the thread we are on.
Definition node_manager.cpp:465
std::vector< Node * > get_thread_siblings(size_t n) const
Return a vector that contains the thread siblings.
Definition node_manager.cpp:484
void print(std::ostream &) const
Print network information.
Definition node_manager.cpp:704
void clear_node_collection_container()
Definition node_manager.cpp:331
NodeManager()
Definition node_manager.cpp:48
size_t get_num_active_nodes()
Get the number of nodes created by last prepare_nodes() call.
Definition node_manager.h:213
void update_thread_local_node_data()
Rebuild per-thread vectors of local nodes and of local nodes needing WFR and set thread-local ID on n...
Definition node_manager.cpp:503
size_t size() const
Return total number of network nodes.
Definition node_manager.h:370
void get_status(Dictionary &) override
Retrieve the status of the manager.
Definition node_manager.cpp:747
std::vector< SparseNodeArray > local_nodes_
The network as sparse array of local nodes.
Definition node_manager.h:339
bool wfr_is_used() const
Returns whether any node uses waveform relaxation.
Definition node_manager.h:388
void check_wfr_use()
Checks whether waveform relaxation is used by any node.
Definition node_manager.cpp:690
void set_status_single_node_(Node &, const Dictionary &, bool clear_flags=true)
Helper function to set properties on single node.
Definition node_manager.cpp:570
void add_devices_(Model &model, size_t min_node_id, size_t max_node_id)
Add device nodes.
Definition node_manager.cpp:234
NodeCollectionPTR node_id_to_node_collection(const size_t node_id) const
Map the node ID to its original primitive NodeCollection object.
Definition node_manager.cpp:307
void destruct_nodes_()
Definition node_manager.cpp:556
void prepare_node_(Node *)
Initialized buffers, register in list of nodes to update/finalize.
Definition node_manager.cpp:590
const std::vector< Node * > & get_wfr_nodes_on_thread(size_t) const
Get list of nodes on given thread.
Definition node_manager.h:382
void initialize(const bool) override
Prepare manager for operation.
Definition node_manager.cpp:69
size_t get_max_num_local_nodes() const
Returns the maximal number of nodes per virtual process.
Definition node_manager.cpp:416
void set_have_nodes_changed(const bool changed)
Definition node_manager.h:406
void post_run_cleanup()
Invoke post_run_cleanup() on all nodes.
Definition node_manager.cpp:662
size_t size_last_local_data_update_
Definition node_manager.h:354
void set_status(const Dictionary &) override
Set the status of the manager.
Definition node_manager.cpp:754
void add_neurons_(Model &model, size_t min_node_id, size_t max_node_id)
Add normal neurons.
Definition node_manager.cpp:188
std::vector< std::exception_ptr > exceptions_raised_
Store exceptions raised in thread-parallel sections for later handling.
Definition node_manager.h:363
void finalize(const bool) override
Take down manager after operation.
Definition node_manager.cpp:84
bool have_nodes_changed() const
Definition node_manager.h:400
std::vector< NodeCollectionPTR > node_collection_container_
a vector of the original/primitive NodeCollection
Definition node_manager.h:341
Stopwatch< StopwatchGranularity::Normal, StopwatchParallelism::MasterOnly > sw_construction_create_
Definition node_manager.h:366
Node * get_node_or_proxy(size_t node_id, size_t tid)
Return pointer to the specified Node.
Definition node_manager.cpp:429
NodeCollectionPTR get_nodes(const Dictionary &dict, const bool local_only)
Get node ID's of all nodes with the given properties.
Definition node_manager.cpp:338
Base class for all NEST network objects.
Definition node.h:99
Sparse representation of local nodes.
Definition sparse_node_array.h:86
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
std::shared_ptr< NodeCollection > NodeCollectionPTR
Definition node_collection.h:50
unsigned short targetindex
Unsigned short type for compact target representation.
Definition nest_types.h:124