RE: OON: C := A*B, where A and B are sparse and memory-distributed ?

From: Andy Cleary (andrew.cleary@data-digest.com)
Date: Thu Feb 01 2001 - 13:31:26 EST


Up until at least 4 months ago and probably still true today, PETSc
has not included a sparse matrix-matrix algorithm for precisely this
reason, and if the only thing you need to do with C = A*B is use
it to multiply vectors, it probably should not be formed explicitly.

However, many other things that one might want to do with C cannot
be done without forming it explicitly. Several groups have developed
various limited versions of sparse matrix-matrix multiplication
(algebraic multigrid solvers are a major consumer of this routine)
for PETSc matrices and they might be willing to share on an as-is
basis. I would suggest asking the PETSc developers directly by
sending an email to petsc@mcs.anl.gov , they keep tabs on their users
and generally know if someone has written routines on top of PETSc
that might be usable by others.

Cheers,
Andy

> -----Original Message-----
> From: owner-oon-list@oonumerics.org
> [mailto:owner-oon-list@oonumerics.org]On Behalf Of Matthias Troyer
> Sent: Thursday, February 01, 2001 3:29 AM
> To: oon-list@oonumerics.org
> Subject: Re: OON: C := A*B, where A and B are sparse and
> memory-distributed ?
>
>
> Pierre Saramito wrote:
> >
> > Dear Colleagues,
> >
> > I am looking for a library, if exists, or, at least an
> > algorithm, that performs :
> >
> > C := A*B
> >
> > where A and B are sparse, memory-distributed (e.g. MPI, as
> > in PETSc).
> >
> > When A and B are obtained from the discretization
> > of Partial Differential Equations, these matrices are very sparses
> > and the A*B CPU-cost is linear with the matrix sizes for an
> > efficient implementation (see e.g. sparskit).
> >
> > I am looking for such an efficient implementation/algorithm
> > in the memory-distributed case. Any suggestion is wellcome.
>
> If A and B are sparse it will usually happen that A*B is much less
> sparse than either A or B. In our problems in quantum mechanics
> we often encounter cases where a product of a number of
> matrices is actually dense, while the individual matrices are very
> sparse.
>
> Thus my question: is it really necessary to store the product
> C, or can't you just use A*(B*v) whenever you want to multiply
> the matrix C with a vector v? A simple estimate shows why this
> might be preferable: if each row of the NxN matrizes A and B contains
> n nonzero elements, the product A*B will in general contain n*n
> nonzero elements per row. Thus the effort of multiplying
> C*v will be about N*n^2, while the effort of first calculating the
> product w=B*v and then A*w will be less, nameley 2*N*n .
>
> Matthias Troyer
>
> --------------------- Object Oriented Numerics List
> --------------------------
> * To subscribe/unsubscribe: use the handy web form at
> http://oonumerics.org/oon/
> * If this doesn't work, please send a note to
> owner-oon-list@oonumerics.org
>

--------------------- Object Oriented Numerics List --------------------------
* To subscribe/unsubscribe: use the handy web form at
http://oonumerics.org/oon/
* If this doesn't work, please send a note to owner-oon-list@oonumerics.org



This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 03:20:14 EST