<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style=""><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif;">Olivier and Matt,</span><font color="#201f1e" face="monospace"><span style="font-size: 15px;"><br>
</span></font>
<div style="margin: 0px;">
<p style="margin-top: 0px; margin-bottom: 0px;"><font face="monospace">MatPtAP with A=I gives Pt*P, not P*Pt. We have sequential MatRARt and MatMatTransposeMult(), but no support for mpiaij matrices. The problem is that we do not have a way to implement C*Ct
 without explicitly transpose C in parallel.</font></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><font face="monospace"><br>
</font></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><font face="monospace">We support MatTransposeMatMult (A*Bt) for mpiaij. Can you use this instead? </font></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><font face="monospace"><br>
</font></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><font face="monospace">Hong</font></p>
</div>
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> petsc-users <petsc-users-bounces@mcs.anl.gov> on behalf of Zhang, Hong via petsc-users <petsc-users@mcs.anl.gov><br>
<b>Sent:</b> Thursday, September 24, 2020 8:56 AM<br>
<b>To:</b> Matthew Knepley <knepley@gmail.com>; Mark Adams <mfadams@lbl.gov><br>
<b>Cc:</b> PETSc <petsc-users@mcs.anl.gov><br>
<b>Subject:</b> Re: [petsc-users] Compute C*Ct using MatCreateTranspose for Ct</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Indeed, we do not have <span style="color:rgb(50,49,48); font-size:17px; font-weight:600; background-color:rgb(250,249,248); display:inline!important">MatCreateTranspose for mpaij matrix. </span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="color:rgb(50,49,48); font-size:17px; font-weight:600; background-color:rgb(250,249,248); display:inline!important">I can adding such support. How soon do you need it?</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="color:rgb(50,49,48); font-size:17px; font-weight:600; background-color:rgb(250,249,248); display:inline!important">Hong</span></div>
<div id="x_appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> petsc-users <petsc-users-bounces@mcs.anl.gov> on behalf of Matthew Knepley <knepley@gmail.com><br>
<b>Sent:</b> Thursday, September 24, 2020 6:12 AM<br>
<b>To:</b> Mark Adams <mfadams@lbl.gov><br>
<b>Cc:</b> PETSc <petsc-users@mcs.anl.gov><br>
<b>Subject:</b> Re: [petsc-users] Compute C*Ct using MatCreateTranspose for Ct</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">On Thu, Sep 24, 2020 at 6:48 AM Mark Adams <<a href="mailto:mfadams@lbl.gov">mfadams@lbl.gov</a>> wrote:<br>
</div>
<div class="x_x_gmail_quote">
<blockquote class="x_x_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="x_x_gmail_quote">
<blockquote class="x_x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div>
<p><tt><br>
Is there a way to avoid the explicit transposition of the matrix?</tt></p>
</div>
</blockquote>
<div><br>
</div>
<div>It does not look like we have A*B^T for mpiaij as the error message says. I am not finding it in the code.</div>
<div><br>
</div>
<div>Note, <span style="font-family:monospace">MatMatMult with a transpose shell matrix, I suspect that it does an explicit transpose internally, or it could notice that you have C^T*C and we might have that implemented in-place (I doubt it, but it would be
 legal and fine to do).</span></div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>We definitely have</div>
<div><br>
</div>
<div>  <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatPtAP.html">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatPtAP.html</a></div>
<div><br>
</div>
<div>For now, you can put the identity in for A. It would be nice it we assumed that when A = NULL.</div>
<div><br>
</div>
<div>Patrick, the implementation strategy is broken for the MatProduct mechanism that was just introduced, so</div>
<div>we cannot see which things are implemented in the documentation. How would I go about fixing it?</div>
<div><br>
</div>
<div>  Thanks,</div>
<div><br>
</div>
<div>     Matt</div>
<div> </div>
<blockquote class="x_x_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="x_x_gmail_quote">
<blockquote class="x_x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div>
<p><tt>Many thanks,</tt><tt><br>
</tt><tt>Olivier Jamond</tt><br>
</p>
<p><br>
</p>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="x_x_gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
<div><br>
</div>
<div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>