diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp index 7345f07193..146f6f2081 100644 --- a/nestkernel/connection_manager.cpp +++ b/nestkernel/connection_manager.cpp @@ -207,7 +207,7 @@ nest::ConnectionManager::get_synapse_status( const size_t source_node_id, const synindex syn_id, const size_t lcid ) const { - kernel().model_manager.assert_valid_syn_id( syn_id ); + kernel().model_manager.assert_valid_syn_id( syn_id, kernel().vp_manager.get_thread_id() ); DictionaryDatum dict( new Dictionary ); ( *dict )[ names::source ] = source_node_id; @@ -253,7 +253,7 @@ nest::ConnectionManager::set_synapse_status( const size_t source_node_id, const size_t lcid, const DictionaryDatum& dict ) { - kernel().model_manager.assert_valid_syn_id( syn_id ); + kernel().model_manager.assert_valid_syn_id( syn_id, kernel().vp_manager.get_thread_id() ); const Node* source = kernel().node_manager.get_node_or_proxy( source_node_id, tid ); const Node* target = kernel().node_manager.get_node_or_proxy( target_node_id, tid ); @@ -517,7 +517,7 @@ nest::ConnectionManager::connect( const size_t snode_id, const double delay, const double weight ) { - kernel().model_manager.assert_valid_syn_id( syn_id ); + kernel().model_manager.assert_valid_syn_id( syn_id, kernel().vp_manager.get_thread_id() ); Node* source = kernel().node_manager.get_node_or_proxy( snode_id, target_thread ); @@ -546,7 +546,7 @@ nest::ConnectionManager::connect( const size_t snode_id, const DictionaryDatum& params, const synindex syn_id ) { - kernel().model_manager.assert_valid_syn_id( syn_id ); + kernel().model_manager.assert_valid_syn_id( syn_id, kernel().vp_manager.get_thread_id() ); const size_t tid = kernel().vp_manager.get_thread_id(); diff --git a/nestkernel/model_manager.cpp b/nestkernel/model_manager.cpp index 3e222520bd..506e83be3c 100644 --- a/nestkernel/model_manager.cpp +++ b/nestkernel/model_manager.cpp @@ -272,7 +272,7 @@ void ModelManager::set_synapse_defaults_( size_t model_id, const DictionaryDatum& params ) { params->clear_access_flags(); - assert_valid_syn_id( model_id ); + assert_valid_syn_id( model_id, kernel().vp_manager.get_thread_id() ); std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised_( kernel().vp_manager.get_num_threads() ); @@ -337,7 +337,7 @@ ModelManager::get_synapse_model_id( std::string model_name ) DictionaryDatum ModelManager::get_connector_defaults( synindex syn_id ) const { - assert_valid_syn_id( syn_id ); + assert_valid_syn_id( syn_id, kernel().vp_manager.get_thread_id() ); DictionaryDatum dict( new Dictionary() ); diff --git a/nestkernel/model_manager.h b/nestkernel/model_manager.h index dc816bb815..924535a780 100644 --- a/nestkernel/model_manager.h +++ b/nestkernel/model_manager.h @@ -163,7 +163,7 @@ class ModelManager : public ManagerInterface * Asserts validity of synapse index, otherwise throws exception. * @throws UnknownSynapseType */ - void assert_valid_syn_id( synindex syn_id, size_t t = 0 ) const; + void assert_valid_syn_id( synindex syn_id, size_t t ) const; bool are_model_defaults_modified() const; @@ -300,7 +300,7 @@ ModelManager::are_model_defaults_modified() const inline ConnectorModel& ModelManager::get_connection_model( synindex syn_id, size_t thread_id ) { - assert_valid_syn_id( syn_id ); + assert_valid_syn_id( syn_id, thread_id ); return *( connection_models_[ thread_id ][ syn_id ] ); } @@ -322,7 +322,7 @@ ModelManager::assert_valid_syn_id( synindex syn_id, size_t t ) const inline SecondaryEvent& ModelManager::get_secondary_event_prototype( const synindex syn_id, const size_t tid ) { - assert_valid_syn_id( syn_id ); + assert_valid_syn_id( syn_id, tid ); return *get_connection_model( syn_id, tid ).get_secondary_event(); }