<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 17, 2012, at 11:08 AM, Jed Brown wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Fri, Aug 17, 2012 at 9:59 AM, John Fettig <span dir="ltr"><<a href="mailto:john.fettig@gmail.com" target="_blank">john.fettig@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":ut">I'd be willing to live with the MatPtAP time, it is the<br>
MatTransposeMatMult time that is really poor. Any idea why the latter<br>
is so slow?</div></blockquote></div><br><div>Mark, for a symmetric graph, how about using MatMatMult() here? Even for a non-symmetric problem, MatMatTransposeMult() is faster than MatTransposeMatMult().</div>
</blockquote></div><br><div>The code has:</div><div><br></div><div><div> if( pc_gamg_agg->square_graph ) {</div><div> /* ierr = MatMatTransposeMult( Gmat1, Gmat1, MAT_INITIAL_MATRIX, PETSC_DEFAULT, &Gmat2 ); */</div><div> ierr = MatTransposeMatMult( Gmat1, Gmat1, MAT_INITIAL_MATRIX, PETSC_DEFAULT, &Gmat2 );</div><div> CHKERRQ(ierr);</div><div> }</div></div><div><br></div><div>I thought MatMatTransposeMult would be faster also, but my experiments were inconclusive ... and I figure this has got to change so I did not worry too much about optimizing it. I don't know if a matrix is symmetric and I've not wanted to rely on the user telling me, but I'm willing to add this logic if it is useful.</div><div><br></div><div>John: could you perhaps test MatMatMult and MatMatTransposeMult so we could get some concrete numbers?</div><div><br></div><div>Mark</div></body></html>