If running NEURON on MSWin you run into the message "Cannot allocate memory" while you still have a large amount of memory available, it is probably caused by the maximum program size of applications run under cygwin. Cygwin's maximum program size can be adjusted with cygwin's regtool:
http://www.cygwin.com/cygwin-ug-net/setup-maxmem.html
Possible solution for: oc> Cannot allocate memory
Re: Possible solution for: oc> Cannot allocate memory
I just came across this error while running simulations on a unix system. I'm saving lots of data to files for several different runs, but encompassed within a single script. It gets through a few cases, writing almost a GB of output files to a separate folder for each, but then starts giving me the "oc> Cannot allocate memory" message. I'm pretty sure all file streams are getting closed and I'm reinitializing the same variable names, but are there ways to check these sorts of memory issues at the command line or within hoc code? I can work around these problems and be more efficient with which data I save, but I'm curious in a general sense. Once I start more parameter tuning, this may become an issue.
Thanks!
Thanks!
Re: Possible solution for: oc> Cannot allocate memory
I would watch the memory usage with 'top' in a another terminal window while the simulation was running.
It may be the case that Vector's are being held in one of your lists and not being freed. You can know the
existence of Vectors with
objref zzz
zzz = new List("Vector")
and occasionally see the total they are using with
xxx = 0
for i =0, zzz.count-1 { xxx = zzz.o(i).size() ]
print xxx
If that is increasing then find out who references a Vector you think should be deleted via
StringFunctions[0].references(Vector[...])
It may be the case that Vector's are being held in one of your lists and not being freed. You can know the
existence of Vectors with
objref zzz
zzz = new List("Vector")
and occasionally see the total they are using with
xxx = 0
for i =0, zzz.count-1 { xxx = zzz.o(i).size() ]
print xxx
If that is increasing then find out who references a Vector you think should be deleted via
StringFunctions[0].references(Vector[...])