Problem building special -- nrnmech

Moderator: wwlytton

Post Reply
dmclaughlin
Posts: 2
Joined: Sun Mar 12, 2006 3:52 pm
Location: West Virginia University

Problem building special -- nrnmech

Post by dmclaughlin » Sun Mar 12, 2006 3:59 pm

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?

ted
Site Admin
Posts: 5572
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Problem building special -- nrnmech

Post by ted » Mon Mar 13, 2006 10:18 am

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?
Last edited by ted on Mon Mar 13, 2006 11:35 am, edited 1 time in total.

dmclaughlin
Posts: 2
Joined: Sun Mar 12, 2006 3:52 pm
Location: West Virginia University

Post by dmclaughlin » Mon Mar 13, 2006 10:51 am

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

ted
Site Admin
Posts: 5572
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Use FInitializeHandler and NetCon.event() instead of vecstim

Post by ted » Mon Mar 13, 2006 12:10 pm

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])
}

ted
Site Admin
Posts: 5572
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Problem building special -- nrnmech

Post by ted » Wed Nov 10, 2010 11:24 am

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.

Post Reply