<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Mark :<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><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></div></blockquote><div><br></div></span><div>Oh, right. I was thinking of RAP.</div></div></div></div></blockquote><div>How do you use RAP for Gmat1^T * Gmat1? </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><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></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><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></font></div></div></div></blockquote><div><br></div></span><div>That would be great thanks. When you do that I can change ex56 to use this, test it, and update the test.</div></div></div></div></blockquote><div>Where is Gmat1 created, in user's code (e.g., ex56) or inside PETSc?</div><div><br></div><div>Hong</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Thanks,</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><font color="#500050"><div class="gmail_quote"></div><div class="gmail_quote">In this way, MatTransposeMatMult() can be replace with MatMatMult() when Gmat1 is symmetric.</div><span class="m_-8325124343817078844HOEnZb"><font color="#888888"><div class="gmail_quote"><br></div><div class="gmail_quote">Hong</div></font></span></font></div><div><div class="m_-8325124343817078844h5"><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="m_-8325124343817078844m_2870021591993627613gmail-"><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="m_-8325124343817078844m_2870021591993627613gmail-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="m_-8325124343817078844m_2870021591993627613gmail-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="m_-8325124343817078844m_2870021591993627613gmail-m_8904295003899219919gmail-m_5492663412982273773gmail-m_-579243501843033290gmail-m_-1861859659216709041HOEnZb"><div class="m_-8325124343817078844m_2870021591993627613gmail-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="m_-8325124343817078844m_2870021591993627613gmail-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="m_-8325124343817078844m_2870021591993627613gmail-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></div></div>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>