Dear NEST community,

I was wondering if there have been some changes from NEST 2.x -> 3.x regarding how the SpikeEvent variables are set and their availability in the handle(SpikeEvent& e) function.

With 2.20.0, I could access the sender ID from inside the handle() function. With the current master branch, however, this is not possible anymore (or likely I'm doing it wrong). The following one-line addition to the iaf_cond_exp model (the exact model doesn't really matter):

void
nest::iaf_cond_exp::handle( SpikeEvent& e )
{
  assert( e.get_delay_steps() > 0 );

  std::cout << "iaf_cond_exp >> e.get_sender_node_id(): " <<  e.get_sender_node_id() << std::endl << std::flush;

  if ( e.get_weight() > 0.0 )
...

fails with:

python: /home/zbarni/software/packages/nest/znest/nestkernel/event.h:1336: nest::index nest::Event::get_sender_node_id() const: Assertion `sender_node_id_ > 0' failed.

Furthermore, the SpikeEvent seems invalid (?), as the e.is_valid() call returns a 0. Is this the expected behavior, and if so, are there any alternatives to access the ID of the sender node in the handle() function?

Thank you,
Barna


-- 
Barna Zajzon
PhD Candidate 

Computation in Neural Circuits Group
Institute of Neuroscience and Medicine (INM-6)
Institute for Advanced Simulation (IAS-6)
JARA Institute Brain Structure-Function Relationships (INM-10)
Jülich Research Centre and JARA
52425 Jülich, Germany
http://www.fz-juelich.de/inm/inm-6


------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Volker Rieke
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr. Astrid Lambrecht,
Prof. Dr. Frauke Melchior
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------


Neugierige sind herzlich willkommen am Sonntag, den 21. August 2022, von 10:00 bis 17:00 Uhr. Mehr unter: https://www.tagderneugier.de