<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Mark:</div><div class="gmail_quote">I see <span style="color:rgb(80,0,80)">MatTransposeMatMult() is called by </span><font color="#500050">PCGAMGCoarsen_AGG().</font></div><div class="gmail_quote"><font color="#500050">When Gmat1 is created, if you know it is symmetric, then set</font></div><div class="gmail_quote"><font color="#500050">Gmat1->symmetric = PETSC_TRUE;</font></div><div class="gmail_quote"><font color="#500050"><br></font></div><div class="gmail_quote"><font color="#500050">I can add following:</font></div><div class="gmail_quote"><font color="#500050"><div class="gmail_quote">+    if (Gmat1->symmetric) {</div><div class="gmail_quote">+      ierr = MatMatMult(Gmat1, Gmat1, MAT_INITIAL_MATRIX, PETSC_DEFAULT, &Gmat2);CHKERRQ(ierr);</div><div class="gmail_quote">+    } else {</div><div class="gmail_quote">+      ierr = MatTransposeMatMult(Gmat1, Gmat1, MAT_INITIAL_MATRIX, PETSC_DEFAULT, &Gmat2);CHKERRQ(ierr);</div><div class="gmail_quote">+    }</div><div class="gmail_quote"><br></div><div class="gmail_quote">In this way, MatTransposeMatMult() can be replace with MatMatMult() when Gmat1 is symmetric.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Hong</div></font></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-m_8904295003899219919gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="gmail-m_8904295003899219919gmail-m_5492663412982273773gmail-h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-m_8904295003899219919gmail-m_5492663412982273773gmail-m_-579243501843033290gmail-m_-1861859659216709041HOEnZb"><div class="gmail-m_8904295003899219919gmail-m_5492663412982273773gmail-m_-579243501843033290gmail-m_-1861859659216709041h5"><br></div></div></blockquote></div></div></div></div></div></blockquote><div><br></div></span><div> <span style="color:rgb(80,0,80)">MatTransposeMatMult() tends to use much larger ctable than MatMatMult.</span></div><div><span style="color:rgb(80,0,80)">Is your matrix symmetric? If so, </span><span style="color:rgb(80,0,80)">MatMatMult() will use smaller ctable and require less communication.</span></div><span class="gmail-m_8904295003899219919gmail-HOEnZb"><font color="#888888"><div><span style="color:rgb(80,0,80)"><br></span></div></font></span></div></div></div></blockquote><div><br></div></span><div>Humm, that is good to know. </div><div><br></div><div>How would I add this to GAMG? Does the user tag the matrix as symmetric and then GAMG checks this, explicitly computes a transpose of P, calls MatMatMult twice? </div><div><br></div><div>Thanks,</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-m_8904295003899219919gmail-HOEnZb"><font color="#888888"><div><span style="color:rgb(80,0,80)"></span></div><div><span style="color:rgb(80,0,80)">Hong</span></div></font></span></div><br></div></div>
</blockquote></div><br></div></div>
</blockquote></div><br></div></div>