Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Inverse of Large Matrices

69 views
Skip to first unread message

Roger M. Jones

unread,
Mar 7, 1996, 3:00:00 AM3/7/96
to
I require the inverse of a 412 x 412 complex matrix
and in order to speed up the process I have tried
connecting to the IMSL routine "dlincg" using InterCall.
However, the IMSL routine is much slower than mma and I suspect
this may be due to the time spent passing the matrix
to the remote machine. Is there a method to speed this
up? I need to do this many times (2000 or more).

The dimension of the inverted matrix is reduced & then
multipled by another matrix (of dimensions 206) and the trace
taken (this again occurs over 2000 times). Thus, using
linear solve to accelerate the process doesn't appear to
be a valid solution to my problem (it would require using
solve for each of the columns of the matrix to be multipled).

I would be very grateful for any help or indeed insight anyone
may have on this matter.

Regards,

Roger Jones
(r...@leland.stanford.edu)

--
Regards,

Roger Jones

(r...@leland.stanford.edu)


Roger M. Jones

unread,
Mar 8, 1996, 3:00:00 AM3/8/96
to
In inverting large (412 )matrices I have noticed a large
difference between memory usage in LinearSolve &
Inverse. Specifically I find for the below cases:

1: res1=LinearSolve[a,rhs];
2: res2=Inverse[a].rhs;

(here a and rhs are 412 X 412 dimensioned matrices)

case 1 repeatedly applied consumes .7 MB more memory
on each application, whereas case 2 is almost constant
(or small at the very least). I need to use method 1
as this is faster than case 2. Further, I need to apply
this many times (>2000) and so this is very important
consideration. Case 1 rapidly runs out of memory of
course.


Does LinearSolve perhaps generate hidden variables
which are not cleared? Any help offered will be
very gratefully received.

Roger M. Jones

unread,
Mar 9, 1996, 3:00:00 AM3/9/96
to
>In inverting large (412 )matrices I have noticed a large
>difference between memory usage in LinearSolve &
>Inverse. Specifically I find for the below cases:

>1: res1=LinearSolve[a,rhs];
>2: res2=Inverse[a].rhs;

>(here a and rhs are 412 X 412 dimensioned matrices)

>case 1 repeatedly applied consumes .7 MB more memory

I have discovered the memory leak. It turns out that
using LinearSolve[a,rhs], with rhs a matrix, rather
than a vector, does produce the correct result however
it leads to constant increase in memory usage.

0 new messages