Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
backslash operator for large dense matrices

Subject: backslash operator for large dense matrices

From: Vineet

Date: 15 Sep, 2009 14:11:02

Message: 1 of 2

Hi
Is there a way to use backslash operator (\) for linear systems of equation when you cannot store the matrix in memory. Like for example if A is dense 8500*85000 matrix which cannot be stored in the memory and A\b is to computed, where b is column vector of appropriate dimensions then which would be the most efficient out of core algorithm (external memory where parts of the matrix are stored on a hard drive) to do it on a single desktop in a reasonable amount of time. I know of parallel solutions based on LU decomposition of matrix or Cholesky decomposition for positive definite matrix which are based on block decomposition of matrices which however requires block cyclical distribution of matrix (depending on the number of nodes available) and thereafter Scalapack can be used to obtain the solution.
• The problem for which is to be done requires running of optimization routines for optimizing Restricted Maximum Likelihood function for 42 parameters and generate CO2 flux estimates for north America through inverse modeling
Any ideas and suggestion would be greatly helpful

Vineet

Subject: backslash operator for large dense matrices

From: Steven Lord

Date: 15 Sep, 2009 14:39:37

Message: 2 of 2


"Vineet " <yadavvineet@gmail.com> wrote in message
news:h8o79m$28p$1@fred.mathworks.com...
> Hi
> Is there a way to use backslash operator (\) for linear systems of
> equation when you cannot store the matrix in memory. Like for example if
> A is dense 8500*85000 matrix which cannot be stored in the memory and A\b
> is to computed, where b is column vector of appropriate dimensions then
> which would be the most efficient out of core algorithm (external memory
> where parts of the matrix are stored on a hard drive) to do it on a single
> desktop in a reasonable amount of time. I know of parallel solutions
> based on LU decomposition of matrix or Cholesky decomposition for positive
> definite matrix which are based on block decomposition of matrices which
> however requires block cyclical distribution of matrix (depending on the
> number of nodes available) and thereafter Scalapack can be used to obtain
> the solution.
> • The problem for which is to be done requires running of
> optimization routines for optimizing Restricted Maximum Likelihood
> function for 42 parameters and generate CO2 flux estimates for north
> America through inverse modeling
> Any ideas and suggestion would be greatly helpful

You could use codistributed arrays, which are part of Parallel Computing
Toolbox:

http://www.mathworks.com/access/helpdesk/help/toolbox/distcomp/bquvksw.html

or if you know how to compute the product of the matrix with a vector
without actually loading/creating the matrix, you could use one of the
iterative solvers (PCG, GMRES, etc.) listed in HELP SPARFUN with a function
handle that computes an appropriate matrix/vector products. For instance,
for the tridiagonal matrix:

n = 10;
A = 2*diag(ones(1, n), 0) - diag(ones(1, n-1), -1) - diag(ones(1, n-1), 1);
x = rand(n, 1);
b = A*x;

the problem A*x-b can be solved as:

x0 = A\b;

or by:

f = @(x) 2*x - [0; x(1:end-1)] - [x(2:end); 0]; % No A required, just
knowledge of its effect on a vector
x1 = pcg(f, b)

residuals = [A*x-b A*x0-b A*x1-b]

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ

Tags for this Thread

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.

Contact us