Pyneuron vs hoc

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

Post Reply
shyam_u2
Posts: 77
Joined: Sun Feb 20, 2011 7:15 pm

Pyneuron vs hoc

Post by shyam_u2 » Wed Oct 19, 2011 3:54 am

I have a large network model. When i run it using pyNEURON i get a lot of memory problems. Given below is an example.


nrniv(63134) malloc: *** mmap(size=34816000) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
/Users/shyam/neuronlatest/nrn-7.2/i386/bin/nrniv: out of memory


I dont get these errors when i run in hoc. Is my observation true ? Or am i wrong.

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

Re: Pyneuron vs hoc

Post by ted » Thu Oct 20, 2011 10:29 am

What's pyNEURON, and how are you "running your model" with it?

shyam_u2
Posts: 77
Joined: Sun Feb 20, 2011 7:15 pm

Re: Pyneuron vs hoc

Post by shyam_u2 » Sun Oct 23, 2011 10:17 pm

I have a model which has a set of hoc and mod files. I declare the methodology for running my model as given below.

1.Using hoc -- just run using a hoc file
2.using Python - write a python file to call all the hoc files using h object. eg h.load_file("init.hoc") and run it

When i run using method 2 i get a lot of memory errors like i described in my previous post.

hines
Site Admin
Posts: 1574
Joined: Wed May 18, 2005 3:32 pm

Re: Pyneuron vs hoc

Post by hines » Mon Oct 24, 2011 5:50 pm

it is possible, though it seems unlikely, that you are so close to the memory limit with your hoc model that
wrapping it in Python puts you over the edge. Can you scale the size of your model so it is half the size
and see if you still get the memory error.

shyam_u2
Posts: 77
Joined: Sun Feb 20, 2011 7:15 pm

Re: Pyneuron vs hoc

Post by shyam_u2 » Tue Oct 25, 2011 12:20 am

Hines,

Thank you very much for your reply. I did scale down the size of my model to half its size. I get the same error using python wrapper but not using hoc. But if i reduce beyond this value, the model works fine using both the python wrapper and hoc.
Is there any way to get rid of this error ?

thanks.

hines
Site Admin
Posts: 1574
Joined: Wed May 18, 2005 3:32 pm

Re: Pyneuron vs hoc

Post by hines » Tue Oct 25, 2011 7:06 am

What kind of machine are you working on, desktop?, cluster? How much memory
per machine do you have? If I have a similar machine available and you can send
me a zip file with all the hoc,python,mod files I need to reproduce the problem, then
I can look into it. Also what version of python are you running. If you decide to
email me the code, send it to michael.hines@yale.edu. Of course i would need
instruction how to launch and some hints on how to change the model size.

Post Reply