I have a case of a missing variable when running a NEURON script. It's the Poirazi model I talked a little bit with both of you about at this year's NEURON course - I'm in the process of re-working the code so that I can make the entire cell model into a template for use in a network - or at least to get the practice in doing so, since I'm probably going to have to do it with other models as well.
At this point, I've put all of the morphology/geometry for the cell into a single file, and I load another file which sets up all of the biophysical mechanisms. Here's the problem:
-In the geometry file, I create a vector named vRP, and fill it with 4 elements.
-At the time I load the biophysical properties file, vRP still exists and reports that it has a length of 4.
-In the biophysical properties file, two functions get called within each other - find_vector_distance_precise() gets called, and in turn, calls vector_distance(). However, once I enter the find_vector_distance() function, vRP no longer shows up for some reason, and NEURON returns an error when trying to call vector_distance(), which requires vRP to be passed to it. Here's the error message:
Code: Select all
/home/phendric/nrn70/nrn/i686/bin/nrniv: attempt to evaluate a non-variable vRP
in CellSpec.hoc near line 6949
access apical_dendrite[0]
^
find_vector_distance_precise("apical_dendrite[0]", 0)
apical_h_insert_sig()
cellSetup()
xopen("CellSpec.hoc")
and others
Code: Select all
oc>vRP
/home/phendric/nrn70/nrn/i686/bin/nrniv: Segmentation violation
near line 1
vRP
^
oc>vRP
Vector[4]
oc>vector_distance(vRP,vAPEX,fvd_vec,adjustment)
func vector_distance() {
13.406729
oc>
I thought I could attach code files that you could then look at, but I guess I was wrong. I can, however, email them to you, if you'd like to take a closer look at the problem.
Any ideas about what's happening? Note that in Poirazi's original code, this problem does not occur, even though the same functions are getting called in, as far as I can tell, the same order.
Phillip