Hello,
In my model I am using STDP synapse connections. When running simulations with nest.Simulate(), everything seems to work fine. When using nest.Run() inside a "with RunManager():" execution is *MUCH* faster, but STDP connections are not updated. Is it a correct behaviour?
Thanks a lot in advance,
Xavier
Dear Xavier,
STDP connections should definitely be updated when letting the RunManager handle the preparation and cleanup.
Could you show the code you used to verify that no STDP connection weights were updated?
Best, Jan
________________________________ Von: Xavier Otazu xotazu@cvc.uab.cat Gesendet: Donnerstag, 23. Februar 2023 17:02:07 An: users@nest-simulator.org Betreff: [NEST Users] RunManager and STDP connections
Hello,
In my model I am using STDP synapse connections. When running simulations with nest.Simulate(), everything seems to work fine. When using nest.Run() inside a "with RunManager():" execution is *MUCH* faster, but STDP connections are not updated. Is it a correct behaviour?
Thanks a lot in advance,
Xavier _______________________________________________ NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org
------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Stefan M?ller Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Dr. Ir. Pieter Jansens, Prof. Dr. Astrid Lambrecht, Prof. Dr. Frauke Melchior ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------
Dear Jan,
At the beginning of my code I save connections using:
nest.DumpLayerConnections(ll_exc,ll_exc,SYN_MODEL_LATCONN_EXC_EXC,'latconn_ll_exc_exc.txt')
At the end of execution I use:
nest.DumpLayerConnections(ll_exc,ll_exc,SYN_MODEL_LATCONN_EXC_EXC,'latconn_ll_exc_exc_end.txt')
that is, just writting to a new file.
Now I realized that between Run() calls, I update (using SetStatus()) the rate of a poisson_generator that send spikes to my ll_exc layer ... May be that is the reason? What is sure is that I do not change anything of my ll_exc layer between Run() calls.
To solve this, I seen at stimulation backends, but cannot realize the name of the file (not sure what node_id refers to) and how to define the "rate" value inside {data_path}/{data_prefix}{label}/{node_id}.txt ... If I have 10k poisson_generators (each one with its one rate) do I have to create 10k files?
I am using NEST 3.3 compiled with mpi.
Thanks a lot in advance.
Xavier
Hi!
I agree with Jan that the connections should be updated regardless of you using |RunManager| or not. Can you please send a minimal reproducer script that triggers the erroneous behavior? It is quite hard to reproduce the error from just your verbal description.
To solve this, I seen at stimulation backends, but cannot realize the name of the file (not sure what node_id refers to) and how to define the "rate" value inside {data_path}/{data_prefix}{label}/{node_id}.txt ... If I have 10k poisson_generators (each one with its one rate) do I have to create 10k files?
There seems to be a misconception about the purpose of stimulation backends here. The |mpi| backend you are referring to allows to send stimulation device parameters from and /external/ application to NEST at runtime via MPI (hence the name of the backend). When using this backend, the file in |{data_path}/{data_prefix}{label}/{node_id}.txt| (|{node_id}| being the device’s node ID, not the target neuron’s) will specify the MPI address where data comes from (i.e. the external application), /not/ the data you want to set (the rate in your case).
Please see these documentation pages for more information:
* https://nest-simulator.readthedocs.io/en/v3.3/guides/stimulate_the_network.h... * https://nest-simulator.readthedocs.io/en/v3.3/models/stimulation_backend_mpi...
Cheers, Jochen!
Hi Jochen,
Yesterday night I checked that the problem is that I update the "rate" parameter of a poisson_generator inside the Prepare()/Update() block. That is, with a simple code like that, the poisson_generator does not generate any spike. Hence my neurons do not spike, the speed execution is really fast and STDP synapses do not change their weight:
# Neurons creation neurons = nest.Create("iaf_psc_alpha", ...)
#Connect neurons uisng STDP synapses conn_dict = {...} syn_dict = {"synapse_model":"stdp_synapse"} nest.Connect(neurons,neurons, conn_dict, syn_dict )
#Connection with a poisson_generator in order to stimulate neurons pg = nest.Create("poisson_generator",...) nest.Connect(pg,neurons, ...)
nest.Prepare() for i in range(10): nest.SetStatus(pg,'rate',i*1000) nest.Run(100)
nest.Cleanup()
But using Simulate() (without Prepare() and Cleanup()), the neurons spike and change their STDP connections:
... for i in range(10): nest.SetStatus(pg,'rate',i*1000) nest.Simulate(100)
Hence, it was my fault!
I tried to use Prepare() / Cleanup() because I do not want spike_recorder to clean the data in the ascii file after every Simulate() call... hence I took a look at stimulation backends, but I think it is not going to solve my problem.
Please, could you include some flag in order to append data to spike_recorders after every Simulate() (i.e. Cleanup()) call? Some of us have post-processing external code (C++ in my case) to post-process data from all the spike_recorder files generated by NEST 2.0 ... Now, having to gather this information from much more files (changing spike_recorder prefix file name after every Simulate() ) increase the complexity of our post-processing code.
Thanks a lot in advance!
Xavier
Dear Xavier,
pg = nest.Create("poisson_generator",...)
does the |...| here include setting the /rate/ property?
[please try to make your code examples /runnable/ in future inquiries]
Cheers, Jochen!