473,323 Members | 1,551 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

out of memory error on python 2.5.4 XP

Hello,
I hope someone can help.
I am using Python 2.5.4 (under python(x,y) umbrella) on XP SP3, and running a grammatical evolution program that runs recursions on equations that grow via nested recursive loops: the program is PonyGE from the google repository: I tried contacting authors to no avail.

The program works, but after a small number of populations, it gets a 'dreaded' memory error if the equations grow too large. If I run it in Ipython I get an additional clue, which is s_push: parser stack overflow.

An example equation that was halted with this error is:

Expand|Select|Wrap|Line Numbers
  1.   return (4 * (2 - (4 * ((((2 + (2 + 0)) + 3) * (((4 + 3) - ((((2 * (3 * 1)) + (4 - (((0 - 4) + (((4 * (((((3 + 0) + (0 + 2)) + 3) * (((0 - 3) * 3) + (5 - (4 + (2 + 1))))) - 3)) - 3) * 5)) + 1))) * 4) - 2)) + 4)) + 1))))
  2. XXXeval_or_exec_outputXXX=sum([f(x) for x in range(10)]); 8264400


I did some research on other people with this problem, and they said the
parser.c MAXSTACK needed to be upped. Problem is I have no parser.c in my python directory. The other weird thing is the program halts here and only uses 15M of RAM out of 1.5G on my system (3.3Ghz AMD).

One other hint is someone else ran it on linux with no problems. They mentioned it might have to do with the way xp allocates memory vs linux.
Can anyone help?

Thanks so much.

P.S. Sorry, is there a sticky on how to insert code tags? I tried <code></code> and it didn't enclose any code.
Dec 18 '09 #1
2 3345
bvdet
2,851 Expert Mod 2GB
Thanks for trying to add code tags. The guidelines for posting questions can be found here.
Dec 19 '09 #2
Did you ever figure this out? I get the same problem trying to down load a file of about 1/2 a GB but I have plenty of RAM etc on my machine
Sep 27 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jane Austine | last post by:
>Jane Austine wrote: >>>>from Tkinter import * >>>>>r=Tk() >>>>>b=Button(r,text='Quit',command=r.quit) >>>>>b.pack() >>>>>r.mainloop() >> >> >> And when I press the "Quit" button the mainloop...
0
by: John Owens | last post by:
I am running the IMAP4 example in the documentation: http://www.python.org/doc/lib/imap4-example.html with two small changes (different username, comment out print statement). The inbox I am...
5
by: Claudio Grondi | last post by:
Background information: --------------------------------- in order to monitor mainboard sensory data as fan speeds, temperatures, applications like SpeedFan http://www.almico.com/speedfan.php or...
18
by: diffuser78 | last post by:
I have a python code which is running on a huge data set. After starting the program the computer becomes unstable and gets very diffucult to even open konsole to kill that process. What I am...
20
by: mariano.difelice | last post by:
Hi, I've a big memory problem with my application. First, an example: If I write: a = range(500*1024) I see that python process allocate approximately 80Mb of memory.
11
by: Hari Sekhon | last post by:
I do import zipfile zip=zipfile.ZipFile('d:\somepath\cdimage.zip') zip.namelist() then either of the two: A) file('someimage.iso','w').write(zip.read('someimage.iso'))
11
by: seberino | last post by:
Suppose a C extension locally built an array of PyObject* 's as follows... my_array = malloc(n * sizeof(PyObject*)); for (i = 0; i < n; i++) { my_array = PyList_New(0); } Q1: Must I do a...
2
by: Chris | last post by:
I have a Bayesian simulation package that keeps running into memory allocation problems. I have a feeling this has something to do with Python (2.5.1.1) not freeing memory. The program essentially...
3
by: Blubaugh, David A. | last post by:
To All, I was wondering if it was possible to utilize python to share a memory resource between a linux and windows system?? It should be stated that both the Linux (CENTOS 5) and windows...
0
by: Blubaugh, David A. | last post by:
Diez, What you have said is extremely concerning. I am now using VMware. With Linux as the Master and windows as the guest operating system. I was wondering if you have ever had to develop...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.