Replies: 2 comments
-
So this issue is resolved if you call |
Beta Was this translation helpful? Give feedback.
-
Yes, in my case. I solved it with: CVodeSetMinStep(cvode_mem_f, 1e-5); In your speculative approach it will work fine I believe. This is simply because you perform a step with |
Beta Was this translation helpful? Give feedback.
-
Hi Michael @nrnhines:
I realised that if one makes a call to
CVode(cvode mem, tout, yout, &tret, itask);
and
tout
(the target time instant) andt0
(the current time instant) are too close, the following error message will show up:This will fail from stepping, and if called inside a
while (t<tout)
loop, it will hang the execution indefinitely. This issue is hard to reproduce and occurred to me only on very large networks, above 32K neurons.A quick fix is to enforce an initial minimum step size, e.g. a call to:
CVodeSetInitStep(cvode_mem_f, step_size);
for having a larger first step, or ideally
CVodeSetMinStep(cvode_mem_f, step_size);
to guarantee that state is always advanced by some minimum timestep value. However, if
step_size
is too large, then the following error may occur:So the trick is to pick a step size big enough to advance the state, while being small enough to make the solver converge within the tolerance values provided. From my testing,
1e-5
is a good value.This ticket requests the default minimum or initial variable step size in NEURON to be increased from the actual value of 0, to avoid
CV_TOO_CLOSE
errors.Beta Was this translation helpful? Give feedback.
All reactions