Thread Subject: Linsolve out of memory error

Subject: Linsolve out of memory error

From: Derek O'Connor

Date: 4 Oct, 2008 21:56:01

Message: 1 of 2

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.

Subject: Linsolve out of memory error

From: Vincent Morio

Date: 5 Oct, 2008 00:28:01

Message: 2 of 2

"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

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
linsolve problem Vincent Morio 4 Oct, 2008 20:30:06
linsolve Derek O'Connor 4 Oct, 2008 18:00:06
outofmemory Derek O'Connor 4 Oct, 2008 18:00:06
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com