Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Linsolve out of memory error
Date: Sun, 5 Oct 2008 00:28:01 +0000 (UTC)
Organization: University  Bordeaux
Lines: 48
Message-ID: <gc91mh$gd3$1@fred.mathworks.com>
References: <gc8oph$hp6$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1223166481 16803 172.30.248.35 (5 Oct 2008 00:28:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 5 Oct 2008 00:28:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 927828
Xref: news.mathworks.com comp.soft-sys.matlab:493662


"Derek O'Connor" <derekroconnor@eircom.net> wrote in message <gc8oph$hp6$1@fred.mathworks.com>...
> Can anyone explain the why I get  an 'out-of-memory' error using x=linsolve(A,b). Here are the details:
> 
> >> clear
> >> memory
>  Maximum possible array:               5810 MB (6.092e+009 bytes) *
>  Memory available for all arrays:      5810 MB (6.092e+009 bytes) *
>  Memory used by MATLAB:                 591 MB (6.195e+008 bytes)
>  Physical Memory (RAM):                8189 MB (8.587e+009 bytes)
>  
>  *  Limited by System Memory (physical + swap file) available.
> >> n=20000;A=rand(n,n);b=rand(n,1);x=zeros(n,1);
> >> memory
>  Maximum possible array:               2753 MB (2.886e+009 bytes) *
>  Memory available for all arrays:      2753 MB (2.886e+009 bytes) *
>  Memory used by MATLAB:                3644 MB (3.821e+009 bytes)
>  Physical Memory (RAM):                8189 MB (8.587e+009 bytes)
>  
>  *  Limited by System Memory (physical + swap file) available.
> >> whos
>    Name          Size                    Bytes  Class     Attributes
>  
>    A         20000x20000            3200000000  double              
>    b         20000x1                    160000  double              
>    n             1x1                         8  double              
>    x         20000x1                    160000  double              
>  
> >> x=linsolve(A,b);
>  ??? Error using ==> linsolve
>  Out of memory. Type HELP MEMORY for your options.
> 
> 
>  MATLAB Version 7.6.0.324 (R2008a)  64 bit
>  Operating System: Microsoft Windows Vista Ultimate 64 bit 
>  Version 6.0 (Build 6001: Service Pack 1)
>  Dell Precision 690 2xQuadcore Xeon 2.33MHz, 8GB RAM.

Hi,

I think that your optimization problem is not well-posed. Generally, linsolve must return a solution very quickly...
I used it for constrained control allocation problems, and a feasible solution was returned in a few miliseconds :-).

Cheers,

V. Morio
PhD student in Automatic Control
IMS lab./University of Bordeaux, France