Page 1 of 1

Problem building special -- nrnmech

Posted: Sun Mar 12, 2006 3:59 pm
by dmclaughlin
After I run nrnivmodl is says that is was successful.
When I try to run the resulting "special" program I get -

loading membrane mechanisms from /home/dem/nrn/CN_Bushy_Stellate/i686/.libs/libnrnmech.so
dlopen failed -
/home/dem/nrn/CN_Bushy_Stellate/i686/.libs/libnrnmech.so: undefined symbol: net_event

Any idea what the problem is?

Re: Problem building special -- nrnmech

Posted: Mon Mar 13, 2006 10:18 am
by ted
dmclaughlin wrote:When I try to run the resulting "special" program"
Literally how are you doing this, i.e. what is the current working directory and what is
the command line you are executing?

Posted: Mon Mar 13, 2006 10:51 am
by dmclaughlin
Well, I have little more insight on this --

The problem was due to the inclusion of vecstim.mod in the .mod directory when I built the special file (and libnrnmech files). It looks like there is a call to a hoc function net_event(t) in vecstim.mod that Neuron does not like/can't find when it tries to load libnrnmech.

I eliminated vecstim.mod from the directory and the problem went away. Special builds ok and I can load the models that I need.

So, for the time being, this works around the problem. However, I believe I will need a vecstim like mechanism in the future, so I will likely revisit this later.

Don

Use FInitializeHandler and NetCon.event() instead of vecstim

Posted: Mon Mar 13, 2006 12:10 pm
by ted
Strange--I can get vecstim to work just fine on my Linux box (FC4,
NEURON -- Version 5.8 2005-8-29 8:58:55 Main (66)). Maybe the
copy that I have is different from the one you're using.

But no matter. vecstim is deprecated. It has been superceded by
FInitializeHandler
http://www.neuron.yale.edu/neuron/stati ... ithnd.html
and the NetCon class's event() method
http://www.neuron.yale.edu/neuron/stati ... html#event
which let you set up an event stream that will be delivered to a target
synaptic mechanism at specified times. Here's an example

Code: Select all

load_file("nrngui.hoc")

// model specification

// the "cell" itself
create soma
access soma
diam = 10
L = 100/diam/PI
insert pas

// the "synaptic mechanism"
objref syn
syn = new ExpSyn(0.5)
objref nc, nil
nc = new NetCon(nil, syn)
nc.weight = 0.001

// afferent spike stream
objref syntimes
syntimes = new Vector(2)
syntimes.x[0] = 2
syntimes.x[1] = PI

objref fih
fih = new FInitializeHandler("loadqueue()")
proc loadqueue() { local ii
  for ii=0,syntimes.size()-1 nc.event(syntimes.x[ii])
}

Re: Problem building special -- nrnmech

Posted: Wed Nov 10, 2010 11:24 am
by ted
vecstim is deprecated. It has been superceded by FInitializeHandler
False. If there are more than a few spikes to be delivered in this way, vecstim is better than the FInitializeHandler approach--see
Driving a synapse with recorded or precomputed spike events
http://www.neuron.yale.edu/phpBB/viewto ... =28&t=2117
in the "Hot tips" area of the Forum.