[Trilinos-Users] EpetraExt MatrixMatrix

Kurtis Nusbaum klnusbaum at gmail.com
Wed Jun 2 10:34:41 MDT 2010


Kevin,
I'm currently in the preliminary stages of implementing the Mat-Mat multiply
kernel in Tpetra. Right now I'm just trying to a get a basic, general
Mat-Mat kernel working. Once I've got that working, I plan on starting to
implement optimizations for specific cases. I've added this to my list of
specific cases that I'm going to take a look at. I'll make it the first
optimization I look at since it's the only one that's been explicitly
requested thus far. I'll also try to keep you updated.

-Kurtis

On Wed, Jun 2, 2010 at 9:29 AM, Heroux, Michael A <maherou at sandia.gov>wrote:

> Kevin,
>
> We (read summer intern) are developing a new Matrix-Matrix capability using
> templates for support of Tpetra.  I will mention this Kurtis Nusbaum (the
> intern).  There are no plans, AFAIK, to modify the existing Epetra
> versions.
>
> I think the best we can do at this point is to form D1 = sqrt(D) (O(n)
> cost)
> as you suggest, then explicitly scale B using the LeftScale() method (O(nz)
> cost), the use the existing Matrix-Matrix multiply kernel.
>
> Kurtis is on this list, so he is now aware.
>
> Mike
>
>
> On 6/1/10 6:23 PM, "Kevin Long" <kevin.long at ttu.edu> wrote:
>
> >
> > Hi,
> >
> > Vicki Howle and I have encountered a problem for which we want to compute
> > explicitly (as an Epetra_CrsMatrix) the product B^T D B, where D is a
> > diagonal matrix. We have B as an Epetra_CrsMatrix and diag(D) as an
> > Epetra_Vector.
> >
> > We can do this easily enough by making an Epetra_CrsMatrix representation
> of
> > D, then calling EpetraExt::MatrixMatrix::Multiply() twice, first to form
> > C1=D*B, then again to form C= B^T C1.  The second call can use
> > transposeA=true so we don't need to form B^T.
> >
> > Alternatively, I could form C1=sqrt(D) B, then do C1^T C1. Again, not
> hard to
> > write.
> >
> > However, neither approach takes advantage of the fact that D is diagonal,
> > which means (a) I need to construct a whole Epetra_CrsMatrix for
> something
> > that can really just be stored as a vector, and (b) inside
> > MatrixMatrix::Multiply(), I'm doing needless work to find the graph of
> the
> > product D B when I already know that D B and B will have the same graph.
> >
> > The operation B^T D B is a fairly common; any chance that someone will
> extend
> > MatrixMatrix to provide an optimized multiply for that case? Or better
> yet,
> > has anyone already written such code?
> >
> > Thanks,
> >
> > Kevin
> >
> >
> >
> >
>
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20100602/7449c36c/attachment.html 


More information about the Trilinos-Users mailing list