Hello :-),
When running a cerebellar granular layer network with custom .mod mechanisms, CoreNEURON fails with a segmentation fault if the simulation time exceeds 1800 ms.
The crash is reproducible with multiple runs and seems related to the net_buf_receive_GrCAMPAplusNMDA call in the backtrace.
For shorter runs (<1800 ms), the simulation finishes without issue. Any help would be appreciated. I have attached the log and the mod files.
Here is the log file
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2020
Version : 9.0.0a0.post1449 3c8d43042 (2025-07-01 06:07:22 -0400)
Additional mechanisms from files
GRANULE_CA.mod GRANULE_CALC.mod GRANULE_KA.mod GRANULE_KCA.mod GRANULE_KIR.mod GRANULE_KM.mod GRANULE_KV.mod GRANULE_LKG1.mod GRANULE_LKG2.mod GRANULE_NA.mod GRANULE_NAR.mod GRANULE_Nmda_leak.mod GRANULE_Nmda_leak_linear.mod GRANULE_PNA.mod GRANULE_tonicGABA.mod GRC_AMPA_NMDA_merged.mod GoCGABAexp.mod GoCNMDAexp.mod GoCsyn.mod GoCsynAMPA.mod Golgi_BK.mod Golgi_CALC.mod Golgi_CALC_ca2.mod Golgi_Ca_HVA.mod Golgi_Ca_LVA.mod Golgi_KA.mod Golgi_KM.mod Golgi_KV.mod Golgi_Na.mod Golgi_NaP.mod Golgi_NaR.mod Golgi_SK2.mod Golgi_extraGABA.mod Golgi_hcn1.mod Golgi_hcn2.mod Golgi_lkg.mod GrCGABAexp.mod Synapse.mod constant.mod exp2syn.mod expsyn.mod gap.mod hh.mod netstim.mod passive.mod pattern.mod stim.mod svclmp.mod vecstim.mod
[eren:125606] *** Process received signal ***
[eren:125606] Signal: Segmentation fault (11)
[eren:125606] Signal code: Address not mapped (1)
[eren:125606] Failing at address: 0x6340005abc7
[eren:125606] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x45330)[0x78dbe577d330]
[eren:125606] [ 1] /mnt/GranularLayerModel/src/x86_64/libcorenrnmech.so(_ZN10coreneuron13sptq_spdeleteEPNS_6TQItemEPNS_6SPTREEE+0x33)[0x78dbcb6a3473]
[eren:125606] [ 2] /mnt/GranularLayerModel/src/x86_64/libcorenrnmech.so(_ZN10coreneuron16net_sem_from_gpuEiiiiidd+0x112)[0x78dbcb639312]
[eren:125606] [ 3] /mnt/GranularLayerModel/src/x86_64/libcorenrnmech.so(_ZN10coreneuron31net_buf_receive_GrCAMPAplusNMDAEPNS_9NrnThreadE+0xfcf)[0x78dbcb4d108f]
[eren:125606] [ 4] /mnt/GranularLayerModel/src/x86_64/libcorenrnmech.so(_ZN10coreneuron18nrn_deliver_eventsEPNS_9NrnThreadE+0x66)[0x78dbcb606fa6]
[eren:125606] [ 5] /mnt/GranularLayerModel/src/x86_64/libcorenrnmech.so(_ZN10coreneuron23nrn_fixed_step_lastpartEPNS_9NrnThreadE+0x1aa)[0x78dbcb60fbaa]
[eren:125606] [ 6] /mnt/GranularLayerModel/src/x86_64/libcorenrnmech.so(_ZN10coreneuron22nrn_fixed_step_minimalEv+0xeb)[0x78dbcb60d4eb]
[eren:125606] [ 7] /mnt/GranularLayerModel/src/x86_64/libcorenrnmech.so(_ZN10coreneuron30nrn_fixed_single_steps_minimalEid+0xe3)[0x78dbcb60d663]
[eren:125606] [ 8] /mnt/GranularLayerModel/src/x86_64/libcorenrnmech.so(_ZN10coreneuron17ncs2nrn_integrateEd+0x57)[0x78dbcb639f97]
[eren:125606] [ 9] /mnt/GranularLayerModel/src/x86_64/libcorenrnmech.so(_ZN10coreneuron16BBS_netpar_solveEd+0xe0)[0x78dbcb63e060]
[eren:125606] [10] /mnt/GranularLayerModel/src/x86_64/libcorenrnmech.so(run_solve_core+0x7b5)[0x78dbcb61d2b5]
[eren:125606] [11] /mnt/GranularLayerModel/src/x86_64/libcorenrnmech.so(corenrn_embedded_run+0x31e)[0x78dbcb474d9e]
[eren:125606] [12] /opt/nrn-install/lib/libnrniv.so(_Z11nrncore_runPKc+0x31c)[0x78dbd8fe525c]
[eren:125606] [13] /opt/nrn-install/lib/libnrniv.so(_Z14nrncore_psolvedi+0x2f2)[0x78dbd8fe59b2]
[eren:125606] [14] /opt/nrn-install/lib/libnrniv.so(+0x886a9d)[0x78dbd93d0a9d]
[eren:125606] [15] /opt/nrn-install/lib/libnrniv.so(_ZN6neuron2oc28invoke_method_that_may_throwIZ16hoc_call_ob_procP6ObjectP6SymboliEUlvE_JRPFdPvERS7_EEEDcT_DpOT0_+0x18)[0x78dbd92c6b18]
[eren:125606] [16] /opt/nrn-install/lib/libnrniv.so(_Z20hoc_object_componentv+0xe15)[0x78dbd92bb3d5]
[eren:125606] [17] /opt/nrn-install/lib/libnrniv.so(+0x8c84a6)[0x78dbd94124a6]
[eren:125606] [18] /opt/nrn-install/lib/libnrniv.so(_ZN6OcJump7fpycallEPFPvS0_S0_ES0_S0_+0x10d)[0x78dbd903ae0d]
[eren:125606] [19] /opt/nrn-install/lib/libnrniv.so(+0x8c8b20)[0x78dbd9412b20]
[eren:125606] [20] python(_PyObject_MakeTpCall+0x75)[0x548f85]
[eren:125606] [21] python(_PyEval_EvalFrameDefault+0xadf)[0x5d6b2f]
[eren:125606] [22] python(PyEval_EvalCode+0x15b)[0x5d500b]
[eren:125606] [23] python[0x6081e2]
[eren:125606] [24] python[0x6b5033]
[eren:125606] [25] python(_PyRun_SimpleFileObject+0x1aa)[0x6b4d9a]
[eren:125606] [26] python(_PyRun_AnyFileObject+0x4f)[0x6b4bcf]
[eren:125606] [27] python(Py_RunMain+0x3b5)[0x6bcc35]
[eren:125606] [28] python(Py_BytesMain+0x2d)[0x6bc71d]
[eren:125606] [29] /lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca)[0x78dbe57621ca]
[eren:125606] *** End of error message ***
--------------------------------------------------------------------------
Primary job terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpiexec noticed that process rank 0 with PID 0 on node eren exited on signal 11 (Segmentation fault).
--------------------------------------------------------------------------
Here is the mod file
TITLE Granule cell AMPA and NMDA
COMMENT
Originally from Solinas et al. (2004) Front Cell Neurosci 4, 12
(http://www.opensourcebrain.org/projects ... angelo2010)
Adapted by Sungho Hong and Claus Lang
Computational Neuroscience Unit, Okinawa Institute of Science and Technology, Japan
Supervision: Erik De Schutter
Correspondence: Sungho Hong (shhong@oist.jp)
September 16, 2017
ENDCOMMENT
NEURON {
POINT_PROCESS GrCAMPAplusNMDA
NONSPECIFIC_CURRENT i
RANGE Q10_diff,Q10_channel, fix_celsius
RANGE g_nmda, g_ampa, i_ampa, i_nmda
RANGE Cdur, e_nmda, e_ampa
RANGE r1FIX, r2, r3,r4,r5, gmax_ampa, r1,r6,r6FIX,kB
RANGE Rb, Ru, Rr, Ro, Rc, rb, gmax_nmda, RdRate
RANGE tau_1, tau_rec, tau_facil, U
RANGE PRE,T,Tmax
RANGE Trelease, diffuse
RANGE Trscale
}
UNITS {
(nA) = (nanoamp)
(mV) = (millivolt)
(umho) = (micromho)
(mM) = (milli/liter)
(pS) = (picosiemens)
(nS) = (nanosiemens)
(uS) = (microsiemens)
(um) = (micrometer)
PI = (pi) (1)
}
PARAMETER {
Q10_diff = 1.5
Q10_channel = 2.4
: Parametri Postsinaptici
gmax_ampa = 1200e-6 (uS)
gmax_nmda = 18800e-6 (uS) : 7e3 : 4e4
: AMPA
r1FIX = 5.4 (/ms/mM)
r2 = 0.82 (/ms)
r3 = 0 (/ms)
r4 = 0 (/ms)
r5 = 0.013 (/ms)
r6FIX = 1.12 (/ms/mM)
e_ampa = 0 (mV)
kB = 0.44 (mM)
: NMDA
Rb = 5 (/ms/mM) : binding
Ru = 0.1 (/ms) : unbinding
RdRate = 12e-4 (/ms) : desensitization 12e-3
Rr = 9e-3 (/ms) : resensitization
Ro = 3e-2 (/ms) : opening
Rc = 0.966 (/ms) : closing
e_nmda = -3.7 (mV) : 0 (mV) Reversal potential
mgo = 1 (mM)
kmg = 1.77 (mM)
deltav = 22.4 (mV)
: Parametri Presinaptici
Cdur = 0.3 (ms)
U = 0.42 (1) < 0, 1 >
tau_rec = 8 (ms) < 1e-9, 1e9 >
tau_facil = 5 (ms) < 0, 1e9 >
tau_1 = 1 (ms) < 1e-9, 1e9 >
u0 = 0 (1) < 0, 1 > : se u0=0 al primo colpo y=U
Tmax = 1 (mM)
Rd = 1.03 (um)
Diff = 0.223 (um2/ms)
Trscale = 0.83 (mM)
fix_celsius = 37 (degC)
}
ASSIGNED {
v (mV) : postsynaptic voltage
i (nA) : current = g*(v - Erev)
g_ampa (pS) : conductance
i_ampa (nA)
r1 (/ms)
r6 (/ms)
T (mM)
Trelease (mM)
diffuse (mM)
g_nmda (pS)
i_nmda (nA)
rb (/ms) : binding
MgBlock
tsyn (ms)
tr1
gbar_Q10 (mho/cm2)
Q10 (1)
r_fast (/ms)
r_slow (/ms)
gmx_ampa
gmx_nmda
df11 (/ms)
df12 (/ms)
df21 (/ms)
df22 (/ms)
df23 (/ms)
df31 (/ms)
df32 (/ms)
df33 (/ms)
df41 (/ms)
}
STATE {
O_ampa
D_ampa
: Channel states (all fractions)
C1_nmda : single bound
C2_nmda : double bound
D_nmda : desensitized
O_nmda : open
PRE
Tr
I1
I2
I3
}
INITIAL {
O_ampa=0
D_ampa=0
T=0 (mM)
C1_nmda = 0
C2_nmda = 0
D_nmda = 0
O_nmda = 0
PRE = 0
Tr = 0
I1 = 0
I2 = 0
I3 = 0
Trelease=0 (mM)
diffuse=0 (mM)
gbar_Q10 = Q10_diff^((fix_celsius-30)/10)
Q10 = Q10_channel^((fix_celsius-30)/10)
if(tau_1>=tau_rec){
printf("Warning: tau_1 (%g) should never be higher neither equal to tau_rec (%g)!\n",tau_1,tau_rec)
tau_rec=tau_1+1e-5
}
r_fast = 4/(Rd*Rd/(4*Diff))
r_slow = 0.01/(Rd*Rd/(4*Diff))
df11 = -6.2*r_slow -20*r_slow
df12 = 20*r_slow
df21 = 9.09*r_slow
df22 = -4.9*r_slow
df23 = df22-df21
df31 = 1.71*r_slow
df32 = -0.55*r_slow
df33 = df32-df31
df41 = 0.333*r_slow
gmx_ampa = gmax_ampa * gbar_Q10
gmx_nmda = gmax_nmda * gbar_Q10
g_ampa = 0
g_nmda = 0
}
BREAKPOINT {
LOCAL tact
diffuse = Tr * Trscale
Trelease = T + diffuse
tact = Trelease*Trelease/(Trelease + kB)/(Trelease + kB)
r1 = r1FIX * tact
r6 = r6FIX * tact
rb = Rb * diffuse
rates(v)
SOLVE transition METHOD cnexp
g_ampa = gmx_ampa * O_ampa
g_nmda = gmx_nmda * O_nmda * MgBlock
i_ampa = g_ampa * (v - e_ampa)
i_nmda = g_nmda * (v - e_nmda)
i = i_ampa + i_nmda
}
DERIVATIVE transition {
PRE' = -r_fast*PRE
Tr' = df11*Tr + PRE + df12*I1
I1' = df21*Tr + df23*I1 - df22*I2
I2' = df31*I1 + df33*I2 - df32*I3
I3' = df41*(I2-I3)
O_ampa' = (r1*(1-O_ampa-D_ampa) - r2*O_ampa)*Q10
D_ampa' = (-r5*D_ampa + r6*(1-O_ampa-D_ampa))*Q10
C1_nmda' = (rb*(1-C1_nmda-C2_nmda-D_nmda-O_nmda) + Ru*C2_nmda - (rb+Ru)*C1_nmda)*Q10
C2_nmda' = (rb*C1_nmda + Rr*D_nmda - (Ru+RdRate)*C2_nmda)*Q10
D_nmda' = (RdRate*C2_nmda - Rr*D_nmda)*Q10
O_nmda' = (Ro*C2_nmda - Rc*O_nmda)*Q10
}
PROCEDURE rates(v(mV)) {
: E' necessario includere DEPEND v0_block,k_block per aggiornare le tabelle!
: TABLE MgBlock DEPEND mgo,kmg,deltav FROM -120 TO 30 WITH 150
MgBlock = 1 / ( 1 + (mgo/kmg)*exp ( - v/deltav ) )
}
NET_RECEIVE(weight, on, x, y, z, u, tsyn (ms)) {LOCAL efr, ef1, dtsyn
: *********** ATTENZIONE! ***********
:
: Qualora si vogliano utilizzare impulsi di glutammato saturanti e'
: necessario che il pulse sia piu' corto dell'intera simulazione
: altrimenti la variabile on non torna al suo valore di default.
INITIAL {
x = 0
y = 0
z = 0
u = u0
tsyn = t
tr1 = 1/((tau_1/tau_rec)-1)
}
if (flag == 0) {
if (!on) {
on = 1
dtsyn = t - tsyn
efr = exp(-dtsyn/tau_rec)
ef1 = exp(-dtsyn/tau_1)
z = z*efr
z = z + y*(ef1 - efr)*tr1
y = y*ef1
x = 1-y-z
if (tau_facil > 0) {
u = u*exp(-dtsyn/tau_facil)
u = u + U * ( 1 - u )
} else { u = U }
y = y + x * u
T=Tmax*y
PRE = PRE + y
tsyn = t
net_send(Cdur, 1)
} else {
net_move(t+Cdur)
}
}
if (flag == 1) {
T = 0
on = 0
}
}
Segfault in CoreNEURON (net_buf_receive_GrCAMPAplusNMDA) when simulation exceeds 1800 ms with MOD mechanisms
Moderator: wwlytton