From help-request at octave dot org Tue Apr 11 10:35:30 2006 Subject: Re: ERROR: memory exhausted -- trying to return prompt From: "Robert A. Macy" To: "Rosa =?ISO-8859-1?Q?Rud=F3_Maun=E9?=" Cc: help at octave dot org Date: Tue, 11 Apr 2006 08:29:20 -0700 I use 2.1.50 on WinXP and had a similar problem with 25MB .wav files, so I posted the problem and was basically told that I needed to "expand" the memory allocated to octave...The best email that came back was... From: Richard Thomas Subject: Re: Possible to increase 256 Mb Memory Limit? (Windows 2000) Date: Thu, 18 Nov 2004 10:27:10 +0000 To: help at octave dot org I've finally managed to achieve increased memory (using the combined Cygwin/Octave 2.1.42 p4atlas build under Windows 2000)! Hopefully this might help Robert too. The main change was that Cygwin/Octave seems to be ignore the "heap_chunk_in_mb" registry setting for the "local machine", but does spot the one for the "current user". In a Command Prompt (DOS) window, to set then check the registry setting "C:\Program Files\GNU Octave\bin\regtool" -i set "/HKCU/Software/GNU Octave/Cygwin/heap_chunk_in_mb" 1216 "C:\Program Files\GNU Octave\bin\regtool" -v list "/HKCU/Software/GNU Octave/Cygwin" In theory, you should be able to set it for all users with: "C:\Program Files\GNU Octave\bin\regtool" -i set "/HKLM/Software/Cygnus\ Solutions/Cygwin/heap_chunk_in_mb" 1216 but this does not seem to get picked up by Octave. Also, with my Windows2000 paging size set to 1536 Mb, if I try to set the heap size to a larger value, Octave fails immediately. Not sure why happens, but I've got rather more memory to play with now so I'm happy: "C:\Program Files\GNU Octave\bin\regtool" -i set "/HKCU/Software/GNU Octave/Cygwin/heap_chunk_in_mb" 1300 "C:\Program Files\GNU Octave\bin\octave-2.1.4 2-p4atlas.exe" C:\Program Files\GNU Octave\bin\octave-2.1.42-p4atlas.exe: *** 2. unable to allo cate heap, heap_chunk_size 1363148800, Win32 error 8 And if I set it above a certain size "regtool" fails with the same error, so the registry has to be manually edited with "regedit". (calling "regtool" using "system" within Octave seems to work OK as well, although as Marek points out you have to be careful when file pathnames have space characters in them). Richard =-=-=-=-= I then used this batch program every time I installed XP to expand the memory: My Batch Program... cd\ cd Program Files\GNU*\bin regtool -i set "/HKCU/Software/GNU Octave/Cygwin/heap_chunk_in_mb" 1024 regtool -v list "/HKCU/Software/GNU Octave/Cygwin" cd\ cd Documents and Settings\Robert\My Documents You may want to set yours bigger than 1024 even. A real time saver was installing more RAM. THAT really sped things up. - Robert - On Tue, 11 Apr 2006 13:30:52 +0200 "Rosa Rudó Mauné" wrote: > Hello, > > I want to create a sparse matrix from a file. The file > has got 100247 lines > and 6042 columns. I read it line by line and I > concatenate it, but when > reaching line 73 the program stops and gives an error. > The mistake is: > > ERROR: memory exhausted -- trying to return prompt > > Do you know how I can solve it? > > Rosa Rudó Mauné ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------