Using NEURON 7.5 master (6b4c19f) on Windows (same issue on NRN 7.4 on Ubuntu 16.04), paste the following in python console:
Code: Select all
from neuron import h, gui
h.cvode.active(1)
def hi():
print('hello from hi, h.t = %g' % h.t)
def test_init():
h.cvode.event(1.3, hi)
h.cvode.event(500, hi)
h.cvode.event(1000, hi)
fih = h.FInitializeHandler(test_init)
h.run()
h.t # Issue 1: Expected: 5, Prints: 500.
h.run() # Issue 2: Expected: "hi" from t=1.3, Prints: "hi" from 1.3 and 500
Same result when using cvode_active() or cvode.active()
Replacing h.run()'s with: h.init(); h.continuerun(5); results in the same behavior
Adding cvode.re_init() does not seem to help
However, the two issues are not present when cvode.active(0)