Strange CVode constructor behavior

Anything that doesn't fit elsewhere.
Post Reply
altaylor

Strange CVode constructor behavior

Post by altaylor »

Folks,

I have found a strange behavior in CVode that I figured I would ask about. It seems like it might be a bug, but it's also quite possible I'm doing something wrong.

I have a six-compartment model, specified in the file lp-40.hoc, which uses a number of mechanisms that I've written. I've tested the mechanisms and the model in the NEURON GUI, so I'm reasonably confident they work properly.

However, if I start up NEURON (using nrniv, not nrngui), and execute

Code: Select all

load_file("lp-40.hoc")

objref cvode
cvode = new CVode(1)

finitialize(-50)
cvode.solve(2000)
things seem not to work properly. t is set to 1e+09 after running this, for instance, and all the model voltages seem to still be at -50 mV.

If, on the other hand, I do:

Code: Select all

load_file("lp-40.hoc")

objref cvode
cvode = new CVode()
cvode.active(1)

finitialize(-50)
cvode.solve(2000)
things seem to work fine. t is set to 2001.0082 afterwards, and the various compartments in my model seem to have reasonable values.

This seems to imply that doing

Code: Select all

cvode = new CVode(1)
leaves cvode (or the model, or something) in a different state than

Code: Select all

cvode = new CVode()
cvode.active(1)
does.

My version of NEURON is

Code: Select all

NEURON -- Version 5.8 2005-10-14 12:36:20 Main (88)
and I'm running it under Windows XP SP2 on a Dell Optiplex GX270.

Is this behavior odd, or am I doing something wrong?

Thank you,
Adam
hines
Site Admin
Posts: 1691
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

That is a bug. I'll decide in the next few days if it is a bug in the documentation and explicitly state that CVode starts out inactive, or else handle the "1" arg appropriately.
altaylor

Thanks

Post by altaylor »

Michael,

Thanks for the quick response!

Adam
Post Reply