Segmentation Error

Moderator: wwlytton

Post Reply
maria.kesa
Posts: 36
Joined: Thu Nov 12, 2015 10:45 am

Segmentation Error

Post by maria.kesa » Wed Dec 30, 2015 12:12 pm

Hello,

My name is Maria. I'm working with a model of the amygdala from ModelDB https://senselab.med.yale.edu/modeldb/S ... mEtAl2013/

I'm trying to slowly dissect the model by running separate parts. The model itself runs without problems. However when I do the following code (adapted from LA_model_main_file.hoc) I get a segmentation error

/usr/local/nrn/x86_64/bin/nrniv: ToneGen is not a template
in function_ToneSignalGen_Th.hoc near line 9
tonehabit1 = new ToneGen(20,0,500,3500,9,5,$2)
^
xopen("function_T...")
execute1("{xopen("fu...")
load_file("function_T...")
0
/usr/local/nrn/x86_64/bin/nrniv: Segmentation violation
in function_ToneSignalGen_Th.hoc near line 11
}
^

Code: Select all

load_file("nrngui.hoc")
load_file("LAcells_template.hoc")
load_file("interneuron_template.hoc")
load_file("function_ToneSignalGen_Th.hoc")

number_of_cells=2
objectvar cell_exc[number_of_cells], cell_inh

for i = 0, number_of_cells-1 {
    cell_exc[i] = new Cell_A()
}

cell_inh = new InterneuronCell()

tstop = 276000
{load_file("function_TimeMonitor.hoc")}
dt = 0.01

//Thalamic pathway
Tone_gen = new ToneSignalGen_D(tstop,dt)
cell_exc[0].dend tone2LAPsyn = new tone2pyrD(0.9)
Rdm_D = r.discunif(10, 20) //Random delay
tone2LAPcon = new NetCon(Tone_gen.tone.intfire1,tone2LAPsyn,0.5,Rdm_D,1)
In function function_ToneGen.hoc you can clearly see

Code: Select all

begintemplate ToneGen


So why does the error message say that it's not a template? Why does the original simulation run while my code doesn't?

I would be really grateful for your help. Thanks,
Maria

maria.kesa
Posts: 36
Joined: Thu Nov 12, 2015 10:45 am

Re: Segmentation Error

Post by maria.kesa » Wed Dec 30, 2015 12:15 pm

Oops, sorry I got rid of the error by importing some more files at the beginning of the file! Just formulating the question helped me to see the answer.

Post Reply