John:<div><br></div><div>Thanks for reporting your experience with petsc mat-mat operations,</div><div>which are consistent with current status of these operations.</div><div>Petsc mat-mat operations were written many years ago for users</div>
<div>who wanted these operations for convenience on small size problems, not intended for huge size and large number of cores.</div><div><br></div><div>As Mark started using these operations on 10k+ cores for gamg, I spent several weeks reworking on some of these operations.</div>
<div>See attached slides on current status of these operations. In summary:</div><div><br></div><div>1. C=A*B were rewritten with two versions:</div><div>  a) fast but not memory scalable: default</div><div>  b) slow but scalable: use option '-matmatmult_scalable' </div>
<div>  I have a rough idea to merge these two version to a single one</div><div>  that is fast and scalable, but need time to work on it :-(</div><div><br></div><div>2. SPARSE inner-product is more expensive than sparse outer-product. As you observed, C=A*B^t is worse than C=A*B. Reading your data, I'm surprised that your C=A*B^t is so much slower than PtAP. How large is your matrices? Can you run your np=1 case with option </div>
<div>'-matmattrnsmult_color' and send us the output of -log_summary?</div><div><br></div><div>3. Current PtAP is a simple cleanup of old version, thus it needs update - has been on my ToDo for almost a year :-( </div>
<div>According to the analysis (see slides), PtAP should only take 2x of</div><div>time(A*B), but it is taking 8x A*B on 14k cores (see slide 8).</div><div><span style="color:rgb(116,116,116);font-family:Calibri;font-size:20px"><br>
</span></div><div>Improving this operations is on the top of our ToDo list.</div><div><br></div><div>Hong</div><div><br><div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Fri, Aug 17, 2012 at 11:27 AM, Mark F. Adams <<a href="mailto:mark.adams@columbia.edu">mark.adams@columbia.edu</a>> wrote:<br>
> John: could you perhaps test MatMatMult and MatMatTransposeMult so we could<br>
> get some concrete numbers?<br>
<br>
</div>For MatMatTransposeMult I get this error:<br>
<br>
[0]PETSC ERROR: --------------------- Error Message<br>
------------------------------------<br>
[0]PETSC ERROR: No support for this operation for this object type!<br>
[0]PETSC ERROR: MatMatTransposeMult not supported for A of type mpiaij!<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: Petsc Development HG revision:<br>
f9c6cac2d69c724a2258d4e0dc2f51b0825aa875  HG Date: Thu Aug 16 08:37:18<br>
2012 -0700<br>
<br>
For MatMatMult, my problem is not symmetric.  It doesn't look like<br>
MatTranspose() followed by MatMatMult is a viable option.<br>
<span class="HOEnZb"><font color="#888888"><br>
John<br>
</font></span></blockquote></div><br></div></div>