|
|
Re: limits of 'invert' [message #46340 is a reply to message #46338] |
Wed, 16 November 2005 11:07  |
K. Bowman
Messages: 330 Registered: May 2000
|
Senior Member |
|
|
In article <1132162119.050786.109730@g47g2000cwa.googlegroups.com>,
"queiny" <queiny98@yahoo.com> wrote:
> Dear IDL & Maths experts:
>
> Is there a limit for the 'invert' or 'la_invert', program to calculate
> the inversion of a square matrix, provided by IDL?
>
> When my matrix is 150x150, 'invert' return immediatelly, but when it is
> '15000x15000', 'invert' runs for more than a day. I am wondering
> whether it is in some infinite loop, or it simply needs that long.
>
> What is the reasonable upper limit that 'invert' or 'la_inver' can
> operate?
>
> Thanks,
>
> Q
Matrix inversion is an O(n^3) operation, so the second case should require
~100^3 times as long as the first, that is, ~10^6 times as long. (There are
~10^5 seconds/day.)
Also, storing a 15000 x 15000 array requires ~900 MB, so you may very well be
swapping to disk, which will slow things down by another couple of orders of
magnitude.
I suggest that you consult a good introductory numerical analysis book.
Cheers, Ken Bowman
|
|
|
Re: limits of 'invert' [message #46345 is a reply to message #46340] |
Wed, 16 November 2005 10:01  |
Foldy Lajos
Messages: 268 Registered: October 2001
|
Senior Member |
|
|
Hi,
as an example, run time for simple matrix multiplication is proportional
to n^3. For your sizes, this would give a factor of 10^6. A 150x150 array
can reside in the CPU cache, so add another 10 for the big array => 10^7.
If "immediate" = 0.1 s, then 10^7 * 0.1 s is about two weeks.
And if you run out of physical memory, swapping to disk can add another
factor of 100 :-(
regards,
lajos
On Wed, 16 Nov 2005, queiny wrote:
> Dear IDL & Maths experts:
>
> Is there a limit for the 'invert' or 'la_invert', program to calculate
> the inversion of a square matrix, provided by IDL?
>
> When my matrix is 150x150, 'invert' return immediatelly, but when it is
> '15000x15000', 'invert' runs for more than a day. I am wondering
> whether it is in some infinite loop, or it simply needs that long.
>
> What is the reasonable upper limit that 'invert' or 'la_inver' can
> operate?
>
> Thanks,
>
> Q
>
>
|
|
|