Page 1 of 1

Modell works fine with Neuron 5.7 but not with 5.8

Posted: Mon Jan 23, 2006 9:13 am
by horstmann
Since I installed Neuron 5.88 I have trouble executing a simulation, which was written for Neuron 5.6, but performed also fine with Neuron 5.7

I have modelled a single neuron, which is to be stimulated via AMPA-Synapses (the simple Modell by Destexhe et. al. with a rectangular transmitter pulse, also used in Arthur Houwelings MyfirstNeuron, where it is called ampa2.mod).
The AMPA-Synapse it self is linked via a pointer to a point process called "SynSignalStim", which is an instance of "periodstim". SynSIgnalStim is located in a dummy section.
Periodstim is a point process with the following Neuron - Interface:

Code: Select all


NEURON {
	POINT_PROCESS PeriodStim
	RANGE fAmpa,sAmpa,onset, t_old, flag
}

It's main function is to set sAmpa periodically 1 or 0 with the frequency fAmpa.

Here is the hoc-Code, which implements the the two point processes

Code: Select all

access stimdummy /*dummy - section*/

objectvar synSignalStim
synSignalStim = new PeriodStim(0.5)

access bt3 /*section, where the synapse is located*/

objectvar synSignal
synSignal = new AMPA(0.5)

synSignalStim.fAmpa=20 /*parameters of synSignal*/
synSignalStim.onset=20
synSignal.Prethresh=0.5
synSignal.gmax=0.01

/*until here everything works fine*/

setpointer synSignal.pre, synSignalStim.sAmpa(0.5)

For the last line, I get following error message


nrniv: sAmpa :not right number of subscripts
in signal.hoc near line 27
setpointer synSignal.pre, synSignalStim.sAmpa(0.5)
^
xopen("signal.hoc" )
execute1("{xopen("signal.hoc")}" )
load_file("signal.hoc" )
0
nrniv: Segmentation violation See $NEURONHOME/lib/help/oc.help
in signal.hoc near line 29
access soma


I am working with Windows and tried it on two different computers (windows 2000 + precompiled files, windows xp + "manual" installation) and got the same result. I also compiled the mod-Files again, which went fine, but didn't resolve my problem.

Where does this message come from and is there another solution then installing a prior neuron-version?

Thank you!

Marie-Therese Horstmann

Posted: Wed Jan 25, 2006 12:31 pm
by ted
No clues in the code you show. It does commit "access abuse" (see below) but I don't
see how that would account for the error message. Maybe you have discovered a bug.
If you zip up a runnable instance of your code and send it to me by email
ted (dot) carnevale (at) yale (dot) edu
I will try to diagnose the problem.

--Ted

access abuse: using more than one access statement in a program. This can lead to
user confusion about the currently accessed section. The best practice is to use just
one access statement to specify _the_ conceptually priveleged section. For all other
occasions when it is necessary to specify which section you mean, use one of the
following:

Code: Select all

secname.varname
secname statement
secname { stmt1 stmt2 . . . }
secname {
  stmt1
  stmt2
   . . .
}

treating a "point variable" (my term) as a range v

Posted: Fri Jan 27, 2006 9:06 pm
by ted
I tried the code under MSWin using 5.8.88 and 5.8.113 and got
this msg with both:

Code: Select all

nrniv: sAmpa :not right number of subscripts
 in C:/home/myhoc/horstmann/urtest2.hoc near line 36
 setpointer synSignal.pre, synSignalStim.sAmpa(0.5)
                                                   ^
But under Linux using version 5.8 2005-8-29 8:58:55 Main (66)
it works fine.

This baffled me, but Michael Hines quickly saw that the problem was
in this statement
setpointer synSignal.pre, synSignalStim.sAmpa(0.5)
looks like a POINT_PROCESS range variable to me.
In other words, synSignalStim.sAmpa belongs to a specific instance of
the point process class PeriodStim. Attaching a PeriodStim to a section
produces a single point at which sAmpa is defined, even though sAmpa
is declared to be RANGE in PeriodStim's NEURON block. Consequently
it is a syntax error to give sAmpa a range argument in hoc.

So the fix is to delete the (0.5) from the setpointer statement.

I can't tell you why the incorrect syntax was accepted under Linux,
or by earlier versions of NEURON under MSWin. To quote further
from Michael,
The surprise is why linux accepts it.
--Ted