Page 1 of 1

Periodically saving results during simulation

Posted: Wed Jul 31, 2019 1:29 pm
by iraikov
Hello,

I'd like to be able to save the spikes and and recorded intracellular traces of the neurons in a large scale network simulation every few thousand ms of simulation time, and I am wondering if anyone has implemented something similar, or has thoughts on the subject. My initial idea was to implement this as an event handler via the cvode.event mechanism, but then the compute time measurement will be affected while data is being saved, and possibly timeouts will occur. Would it be better to set tstop to the next time when data should be saved? Any suggestions are appreciated.

-Ivan

Re: Periodically saving results during simulation

Posted: Wed Jul 31, 2019 10:29 pm
by ted
See
Dealing with simulations that generate a lot of data
https://neuron.yale.edu/neuron/docs/dea ... e-lot-data
The example is in hoc, but it's easy to implement the same approach with Python.

Re: Periodically saving results during simulation

Posted: Mon Dec 16, 2019 2:26 am
by jtg374
Hi Ted,
In the tutorial that you referred to, a process "continuerun()" was used for serial implementation. For parallel context, what would be the equivalent? using ParallelContext.psolve() ?

Thanks

Re: Periodically saving results during simulation

Posted: Mon Dec 16, 2019 11:28 am
by ted
If runlength specifies the number of ms that you want the simulation to advance,
ParalelContext.psolve(t + runlength)
should do it.