SaveState.restore() causes various error

Moderator: wwlytton

Post Reply
neuronalpail
Posts: 1
Joined: Tue Jul 09, 2019 9:48 am

SaveState.restore() causes various error

Post by neuronalpail »

I follows a cerebellar granular layer model published by Sudhakar et al. (2017) which available on ModelDB https://senselab.med.yale.edu/ModelDB/s ... del=232023.

I tried to save and restore the state variables with SaveState class, but once insert scripts for it, the model returns errors during psolve(tstop) (segmentation fault (signal 11) on my local laptop with NEURON v. 7.6.2; assertion (signal 6) on the cluster machine with NEURON v. 7.4, assert message is following).

Code: Select all

net_send td-t = -20.125 SelfEvent target=VecStim[38] 0 flag=1
I inserted save/restore scripts between stdinit() and pc1.psolve(tstop) functions in run.hoc as follows.

Code: Select all

pc1.set_maxstep(10)
stdinit()
if(statesCond==0){ // newly defined
    pc1.psolve(t_state) // t_state = 20, newly defined

    print "saving state with SaveState class."
    sprint(stateName,"states%02d.dat",pc1.id)
    svstate = new SaveState()
    svstate.save()
    fstate = new File(stateName)
    svstate.fwrite(fstate)
    fstate.close()
}else{
    print "loading state with SaveState class."
    sprint(stateName,"states%02d.dat",pc1.id)
    svstate = new SaveState()
    fstate = new File(stateName)
    svstate.fread(fstate)
    svstate.restore()
    fstate.close()
    pc1.barrier()
}
pc1.psolve(tstop) // tstop = 30, modified
The model uses VecStim for input mossy fibre layer, so already modified to generate spikes only after t_state (=20 ms) for restoring simulation.

Is there any possible problem? Or if required, where and how can I share my modified codes?

Many thanks
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: SaveState.restore() causes various error

Post by ted »

Did you ever use SaveState before, to do anything? Build a toy model and try it out with that toy model. When you get that right, try something more complicated.
Post Reply