unload mechanisms dll

NMODL and the Channel Builder.
Post Reply
a.negrean
Posts: 2
Joined: Wed Aug 29, 2018 11:32 pm

unload mechanisms dll

Post by a.negrean »

Hi,

I am using Neuron ver. 7.5 master(4d65a2c+) 2017-08-17 under Linux with Python 3.6.4 and I am importing mechanisms with h.nrn_load_dll(). This works fine the first time, but if this is done the second time, the python kernel crashes. I could of course keep track in a variable if the dll has been loaded already, but I wonder, is there is a way to cleanly unload the dll? I am thinking of a scenario where I'd like to work with multiple dll's that contain different membrane mechanism configurations without putting multiple versions of the same mechanism in the same dll.

I also tried reloading the neuron module like this:
import importlib
importlib.reload(neuron)

but the python kernel is still crashing.
Thank you!
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: unload mechanisms dll

Post by ted »

is there is a way to cleanly unload the dll?
No. Exit NEURON, then restart NEURON.
Post Reply