### Cvode corrector convergence failed repeatedly

Posted:

**Thu Nov 02, 2006 9:37 pm**Hi,

I'm getting this error numerous times in my paralle search runs.

I was able to isolate it so that it can be reproduced with the following files.

Any help in finding out what causes this error would be appreciated.

Thanks,

Jose Ambros-Ingerson
The mod file is
When I run the above code I get:
Note that it runs fine with amp=0.2 (and amp=-0.2 not shown) but fails with amp=-1.0

I'm getting this error numerous times in my paralle search runs.

I was able to isolate it so that it can be reproduced with the following files.

Any help in finding out what causes this error would be appreciated.

Thanks,

Jose Ambros-Ingerson

Code: Select all

```
create soma
access soma
//----------------------------------------------------------------------
objref stim
proc do_cell(){
cell_rad = 26
soma {
L = 2/3 * cell_rad
diam = 2 * 3 * cell_rad
stim = new IClamp(0.5)
}
forall {
insert pas
insert h_in
}
}
//================================================================================
do_cell()
finitialize( -59.1024 )
tau0_n_h_in = 0.001
tau0_h_h_in = 1
g_pas = 1/(19.33688275 * 1000 )
cm = 1.669295262
Ra = 481.6798106
e_pas = -59.10239122
gbar_h_in = 133.5283527
e_h_in = -63.63217588
gates_n_h_in = 5.671912439
vhalf_n_h_in = -72.75908914
slope_n_h_in = 10.11954921
tauA_n_h_in = 3107.066218
tauF_n_h_in = -0.02730965693
tauG_n_h_in = 0.05981368157
tauDv_n_h_in = -29.26259799
gates_h_h_in = 4.124487321
vhalfD_h_h_in = 78.24216152
slope_h_h_in = -9.398674247
tauA_h_h_in = 16808.40883
tauF_h_h_in = 1.978964722
tauG_h_h_in = 0.7649019228
tauDv_h_h_in = 3.94314898
cvode.active(1)
cvode.atol(1.e-3)
tstop = 500
stim.dur=250
stim.del=50
stim.amp = 0.2
printf( "Run amp=%g\n\n", stim.amp )
run()
stim.amp=-1.0
printf( "Run amp=%g\n\n", stim.amp )
run()
```

Code: Select all

```
TITLE h channel
: Jose Ambros-Ingerson jose@kiubo.net 2006
NEURON {
SUFFIX h_in : h channel with inactivation
NONSPECIFIC_CURRENT i
RANGE gbar, g, i
GLOBAL inf_n, tau_n, inf_h, tau_h
}
PARAMETER {
e = -30 (mV)
gbar = 1 (pS/um2)
: inf_n parameters
gates_n = 1
vhalf_n = -80 (mV)
slope_n = 10 (mV)
: tau_n parameters
tauA_n = 100 (ms)
tauDv_n = 0 (mV) : Delta to vhalf_n
tauG_n = 0.5 : Left-right bias. range is (0,1)
tauF_n = 0 : Up-Down bias. range is ~ -3.5(cup-shape), -3(flat), 0(from k), 1(sharper)
tau0_n = 1 (ms) : minimum tau
: inf_h parameters
gates_h = 1
vhalfD_h = 40 (mV) : vhalf_h = vhalf_n + vhalfD_h;
slope_h = -10 (mV)
: tau_h parameters
tauA_h = 20 (ms)
tauDv_h = 0 (mV) : Delta to vhalf_h
tauG_h = 0.5 : Left-right bias. range is (0,1)
tauF_h = 0 : Up-Down bias. range is ~ -3.5(cup-shape), -3(flat), 0(from k), 1(sharper)
tau0_h = 0.01 (ms) : minimum tau
}
STATE {
n
h
}
ASSIGNED {
v (mV)
celsius (degC)
g (pS/um2)
i (mA/cm2)
inf_n
tau_n (ms)
inf_h
tau_h (ms)
}
BREAKPOINT {
SOLVE states METHOD cnexp
g = gbar * n^gates_n * h^gates_h
i = g * ( v - e ) * (1e-4)
}
INITIAL {
rates( v )
n = inf_n
h = inf_h
}
UNITS {
(mA) = (milliamp)
(mV) = (millivolt)
(pS) = (picosiemens)
(um) = (micrometer)
}
DERIVATIVE states { : exact when v held constant; integrates over dt step
rates( v )
n' = ( inf_n - n )/ tau_n
h' = ( inf_h - h )/ tau_h
}
PROCEDURE rates( v (mV)){
inf_n = Boltzmann( v, vhalf_n, slope_n )
tau_n = BorgMod_tau( v, vhalf_n, slope_n, tau0_n, tauA_n, tauG_n, tauF_n, tauDv_n )
inf_h = Boltzmann( v, vhalf_n + vhalfD_h, slope_h )
tau_h = BorgMod_tau( v, vhalf_n + vhalfD_h, slope_h, tau0_h, tauA_h, tauG_h, tauF_h, tauDv_h )
}
FUNCTION Boltzmann( v (mV), v5 (mV), s (mV) ){
Boltzmann = 1 / (1 + exp_trap( (v - v5) / s ))
}
FUNCTION BorgMod_tau( v (mV), v5 (mV), s (mV), tau0 (ms), tauA (ms), tauG, tauF, tauDv (mV) ) (ms) {
LOCAL kc, kr, Dv, wr, tau0m
kr = 1000
wr = 1000
Dv = (v - ( v5 + tauDv )) * 1(1/mV)
kc = kr * 10^tauF / s * 1(mV)
tau0m = tauA * 1e-4 : kludge to try to avoid CVode crash
BorgMod_tau = tau0m + tau0 + tauA * 2 * sqrt( tauG * (1-tauG))
* ( exp_trap( - Dv *tauG/wr/kc ) + exp_trap( Dv *(1-tauG)/wr/kc ))
/ ( exp_trap( - Dv *(1-tauG)*kc/kr ) + exp_trap( Dv *kc*tauG/kr ))
}
FUNCTION exp_trap( v ){
if( v > 700 ){ v = 700 }
exp_trap = exp( v )
}
```

Code: Select all

```
$ nrngui ~/Projects/ParSims/Runs_pDE/pNVmes/K06/CVode-err.hoc
NEURON -- Version 5.8 2005-10-7 13:46:29 Main (85)
by John W. Moore, Michael Hines, and Ted Carnevale
Duke and Yale University -- Copyright 1984-2005
loading membrane mechanisms from /axon/d1/Users/jose/cNeuro/lib/nrn/NMOD/ca1n1-mod/powerpc/.libs/libnrnmech.so
Additional mechanisms from files
KA_i0.mod KA_n1.mod KDR_b0.mod KDR_b1.mod KDR_i0.mod KDR_mig.mod Ktf_p1.mod Naf_b1.mod Naf_i0.mod Nap_i0.mod fK_DR_n1.mod fNa_n1.mod h2_i0.mod h_2t.mod h_i0.mod h_in.mod h_n1.mod morpho.mod pNa_n1.mod
1
1
0.001
Run amp=0.2
13
Run amp=-1
12
Changed dt
CVode-- At t = 89.7554 and h = 8.7714e-06, the corrector
convergence failed repeatedly or with |h| = hmin.
CVode 11255b8 soma advance_tn failed, err=-7.
err=-7
/axon/d1/Users/jose/Software/src/Neuron/nrn-5.8.85/nrn/powerpc/bin/nrniv: variable step integrator error
in /axon/d1/Users/jose/Projects/ParSims/Runs_pDE/pNVmes/K06/CVode-err.hoc near line 58
run()
^
fadvance()
advance()
step()
continuerun(500)
and others
oc>
```