Page 1 of 1
HOC file undefines section?
Posted: Tue Mar 29, 2011 3:35 pm
by hallockk
I am using a HOC file to modify an axon model with many sections, one of which is named "lead". I load up the DLL and the SES file using NEURON's File menu, and the load the HOC file using the xopen command line function. The SES, DLL, and HOC files all run fine, but if I save the SES file after running my HOC file, I receive an error and the file won't load.
Here is the error I'm getting:
nrniv: undefined variable lead
in Wholecell110329e.ses near line 26035
}
^
xopen("Wholecell110329e.ses" )
NEURONMainMenu[0].execute1("{xopen("Wholecell110329e.ses")}" )
NEURONMainMenu[0].load_file(1"./Wholecell110329e.ses" , )
NEURONMainMenu[0].load("*.ses"1 , )
But I don't modify the lead section in the HOC file so I don't know where to begin debugging. Any suggestions would be appreciated.
Re: HOC file undefines section?
Posted: Tue Mar 29, 2011 6:12 pm
by ted
Code: Select all
nrniv: undefined variable lead
in Wholecell110329e.ses near line 26035
}
^
xopen("Wholecell110329e.ses" )
This means that Wholecell110329e.ses contains some hoc statement that refers to a non-existent thing called lead.
Re: HOC file undefines section?
Posted: Mon Apr 04, 2011 2:12 pm
by hallockk
I don't know why running a separate HOC file, and then saving the file, would prevent me from reopening the file. I thought that running a HOC file wouldn't permanently alter the SES file. The sequence of events I'm wondering about are:
Open SES file
Save SES file
Close SES file
Restart NEURON
Open SES file using File menu (no error)
vs.
Open SES file
Run HOC code via xopen line command
Save SES file
Close SES file
Restart NEURON
Open SES file using File menu (generates error posted above; file doesn't open)
I don't understand how running the HOC file might alter the SES file and create the error.
Thanks.
Re: HOC file undefines section?
Posted: Mon Apr 04, 2011 9:32 pm
by ted
In order to answer the implied question, I must first be able to reproduce the symptom. If you want me to take a shot at this, please zip up and send just enough stuff for me to be able to reproduce the symptom. That means just the hoc and ses files, and any dat or txt files that your program might read. Do not send .o, .c, .dll, or .bak files. My email address is ted dot carnevale at yale dot edu
Re: HOC file undefines section?
Posted: Tue Apr 05, 2011 9:13 am
by hallockk
I've identified the line of code in the HOC file that is the culprit:
CellBuild[0].continuous = 0
I confirmed this by turning off Continuous Create using the GUI (and without running a HOC file) and save the file with it remaining off. I get the same error when I try to load modified file using the File menu.
I hope to spend time troubleshooting more today and I'll post again when I learn something new.
Thanks.
Re: HOC file undefines section?
Posted: Tue Apr 05, 2011 10:32 am
by hallockk
I haven't figured out the source of the problem, but if I turn on Continuous Create before saving the file I can reopen the file without the posted error. This at least provides me a workaround.
Re: HOC file undefines section?
Posted: Tue Apr 05, 2011 4:14 pm
by ted
hallockk wrote:I haven't figured out the source of the problem, but if I turn on Continuous Create before saving the file I can reopen the file without the posted error.
Actually this is the source of the problem. If a CellBuilder is saved to a ses file with Continuous Create off, then when you read that ses file in the future the CellBuilder will be recreated, but it will not create any sections.
Re: HOC file undefines section?
Posted: Wed Apr 06, 2011 9:06 am
by hallockk
ted wrote:Actually this is the source of the problem. If a CellBuilder is saved to a ses file with Continuous Create off, then when you read that ses file in the future the CellBuilder will be recreated, but it will not create any sections.
Thanks! Now back to modeling.