help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: out of memory or dimension too large for Octave's index type


From: Philip Nienhuis
Subject: Re: out of memory or dimension too large for Octave's index type
Date: Fri, 27 Jun 2014 07:24:34 -0700 (PDT)

dkeck wrote
> 
> tmacchant wrote
>> ​Memory fragmentation.​
> No matter of scenario (how many processes started, when restarted Octave,
> when restarted OS) I am not able to create a matrix with more than
> 39,160,800 elements (e.g. A1=ones(6300,6217); will not work but
> A2=ones(6300,6216); will work).
> So it seems that it is more than memory fragmentation because such a high
> degree of fragmentation in all scenarios is questionable.

You simply expect too much.
Memory fragmentation happens already when starting up your computer. Just
have a look at the startup log in your C:\WINDOWS\Temp folder and glance
through the loooong list of processes that were once or are still active (=
in memory).

Only when you go to 64-bit systems (Linux, Mac, Windows alike) your programs
get more room. But memory fragmentation does happen there as well. You'll
only notice later.

On my WinXP SP3 box (32b) w. 4 GB RAM installed, and fairly regular SW
(virus scanner, firewall, a Logitech mouse driver, but with all IMO unneeded
services disabled), Matlab prerelease 2014b gives (when started as first
user program after reboot):


>> [a, b] = memory
a = 
    MaxPossibleArrayBytes: 291999744
    MemAvailableAllArrays: 1.3488e+09
            MemUsedMATLAB: 471793664
b = 
    VirtualAddressSpace: [1x1 struct]
           SystemMemory: [1x1 struct]
         PhysicalMemory: [1x1 struct]

>> A2=ones(6300,6216)
Out of memory. Type HELP MEMORY for your options.
 
>> 


This says that the largest contiguous chunk of free memory is less than 300
MB.

I think this is a fair indication that Octave's isn't to blame for OOM
errors occurring for otherwise seemingly "reasonable" array sizes. Matlab
doesn't perform any better on the same 32-bit platform.

You'd better say that Windows XP's memory management is particularly bad. 
On my Mageia Linux 32b box, Octave-3.8.0 can create class double arrays of
~12500 X 12500, or ~4 times bigger than what you get on WinXP.


Philip




--
View this message in context: 
http://octave.1599824.n4.nabble.com/out-of-memory-or-dimension-too-large-for-Octave-s-index-type-tp4664823p4665108.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]