Recording new variable

25 views
Skip to first unread message

Alfonso Yamamoto

unread,
May 13, 2025, 8:57:22 AMMay 13
to SpiNNaker Users Group
Hi,
I am trying to record a state variable. I am doing my own implementation, I am trying to do it as a monolotith so only using: 
APP = $(notdir $(CURDIR))

NEURON_IMPL_H = $(EXTRA_SRC_DIR)/my_models/implementations/my_neuron_impl.h
SYNAPSE_DYNAMICS = $(NEURON_DIR)/neuron/plasticity/synapse_dynamics_static_impl.c

include ../extra.mk
I also changed the corresponding methods in the python side. But when I run the simulation I get [ERROR] (neuron_recording.h: 464): Data spec number of recording variables 1 != neuron implementation number of recorded variables 2.  I also checked that the macros are #define V_RECORDING_INDEX 0
#define U_RECORDING_INDEX 1
#define N_RECORDED_VARS 2

and I call the the functions:
 neuron_recording_record_accum(V_RECORDING_INDEX, neuron_index, neuron->v);
 neuron_recording_record_accum(U_RECORDING_INDEX, neuron_index, neuron->u);

What am I missing?
Best regards,
Alfonso

Alfonso Yamamoto

unread,
May 14, 2025, 8:29:42 AMMay 14
to SpiNNaker Users Group
Also I just noticed that I can not longer run simulations for timestep 0.1ms ? and some of the settings in the .cfg files are not longer recognized.
What are the new changes to spinnaker ? 
Alfonso

Andrew Rowley

unread,
May 15, 2025, 3:05:45 AMMay 15
to Alfonso Yamamoto, SpiNNaker Users Group
Hi,

Sorry for taking so long to reply!

The first error regarding recording is down to the matching between the Python and the C code. When you update the value in the C code you have to make sure that the value in the Python code also matches. This is done in the example code with the "recording" functions:
https://github.com/SpiNNakerManchester/sPyNNakerNewModelTemplate/blob/master/python_models8/neuron/implementations/my_full_neuron_impl.py#L89-L117

Here you can list the variables that can be recorded, which should then match what you list in the C code. These tell the Python code to tell the C code what can be recorded.


Regarding the changes to the master-branch code, we have recently made it easier to use the split neuron-synapse core models. This shouldn't stop you running with 0.1ms timesteps though, but it might try to run such simulations in real-time using a split model. You can override that behaviour though by specifying that you want it to slow down the simulation in setup e.g.
p.setup(0.1, time_scale_factor=10)

That would then likely choose a merged model rather than a split one. If that still fails, you can also do:
p.set_number_of_synapse_cores(<model>, 0)

Where <model> is the model you want to ensure doesn't get split.

I have to admit I hadn't thought about full models that don't support splitting e.g. because they are not built with the split cores. I will look to see if it is possible to add an update to disable that for specific models too...

Andrew :)

________________________________________
From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Alfonso Yamamoto <alfyama...@gmail.com>
Sent: 14 May 2025 13:29
To: SpiNNaker Users Group
Subject: [SpiNNaker Mailing List] Re: Recording new variable

Also I just noticed that I can not longer run simulations for timestep 0. 1ms ? and some of the settings in the .cfg files are not longer recognized. What are the new changes to spinnaker ? Alfonso On Tuesday, May 13, 2025 at 2: 57: 22 PM UTC+2

Also I just noticed that I can not longer run simulations for timestep 0.1ms ? and some of the settings in the .cfg files are not longer recognized.
What are the new changes to spinnaker ?
Alfonso
On Tuesday, May 13, 2025 at 2:57:22 PM UTC+2 Alfonso Yamamoto wrote:
Hi,
I am trying to record a state variable. I am doing my own implementation, I am trying to do it as a monolotith so only using:
APP = $(notdir $(CURDIR))

NEURON_IMPL_H = $(EXTRA_SRC_DIR)/my_models/implementations/my_neuron_impl.h
SYNAPSE_DYNAMICS = $(NEURON_DIR)/neuron/plasticity/synapse_dynamics_static_impl.c

include ../extra.mk [extra.mk]<https://urldefense.com/v3/__http://extra.mk__;!!PDiH4ENfjr2_Jw!DCqXV_8qp5LNb5KYJo93eh4bIEss4fCm52IjVjeuxv5YnOW6by2Su3WerksOaCVE1TRjbpqbqojiXJaakajlBz_XuPlnHO9XrIg$>
I also changed the corresponding methods in the python side. But when I run the simulation I get [ERROR] (neuron_recording.h: 464): Data spec number of recording variables 1 != neuron implementation number of recorded variables 2. I also checked that the macros are #define V_RECORDING_INDEX 0
#define U_RECORDING_INDEX 1
#define N_RECORDED_VARS 2

and I call the the functions:
neuron_recording_record_accum(V_RECORDING_INDEX, neuron_index, neuron->v);
neuron_recording_record_accum(U_RECORDING_INDEX, neuron_index, neuron->u);

What am I missing?
Best regards,
Alfonso

--
You received this message because you are subscribed to the Google Groups "SpiNNaker Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spinnakeruser...@googlegroups.com<mailto:spinnakeruser...@googlegroups.com>.
To view this discussion, visit https://groups.google.com/d/msgid/spinnakerusers/26f66d33-ffbb-44f8-b254-332993708b8dn%40googlegroups.com [groups.google.com]<https://urldefense.com/v3/__https://groups.google.com/d/msgid/spinnakerusers/26f66d33-ffbb-44f8-b254-332993708b8dn*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!PDiH4ENfjr2_Jw!DCqXV_8qp5LNb5KYJo93eh4bIEss4fCm52IjVjeuxv5YnOW6by2Su3WerksOaCVE1TRjbpqbqojiXJaakajlBz_XuPlnCb9cijY$>.
Reply all
Reply to author
Forward
0 new messages