<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>@Mark: Sorry, I totally misunderstood your answer, so my answer
      to your answer about petsc versions is non-sense...</p>
    <p><br>
    </p>
    <p>@Hong: <font face="monospace">MatTransposeMatMult gives (Ct*C),
        no? And I feel that MatCreateTranspose actually works for
        mpiaij.<br>
      </font></p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 24/09/2020 16:16, Zhang, Hong via
      petsc-users wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:BLAPR09MB70742D3948C8B71559C9017C88390@BLAPR09MB7074.namprd09.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
      <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 face="monospace" color="#201f1e"><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>
      <hr style="display:inline-block;width:98%" tabindex="-1">
      <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
          face="Calibri, sans-serif" color="#000000"><b>From:</b>
          petsc-users <a class="moz-txt-link-rfc2396E" href="mailto:petsc-users-bounces@mcs.anl.gov"><petsc-users-bounces@mcs.anl.gov></a> on behalf
          of Zhang, Hong via petsc-users <a class="moz-txt-link-rfc2396E" href="mailto:petsc-users@mcs.anl.gov"><petsc-users@mcs.anl.gov></a><br>
          <b>Sent:</b> Thursday, September 24, 2020 8:56 AM<br>
          <b>To:</b> Matthew Knepley <a class="moz-txt-link-rfc2396E" href="mailto:knepley@gmail.com"><knepley@gmail.com></a>; Mark
          Adams <a class="moz-txt-link-rfc2396E" href="mailto:mfadams@lbl.gov"><mfadams@lbl.gov></a><br>
          <b>Cc:</b> PETSc <a class="moz-txt-link-rfc2396E" href="mailto:petsc-users@mcs.anl.gov"><petsc-users@mcs.anl.gov></a><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 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 style="font-size:11pt"
            face="Calibri, sans-serif" color="#000000"><b>From:</b>
            petsc-users <a class="moz-txt-link-rfc2396E" href="mailto:petsc-users-bounces@mcs.anl.gov"><petsc-users-bounces@mcs.anl.gov></a> on
            behalf of Matthew Knepley <a class="moz-txt-link-rfc2396E" href="mailto:knepley@gmail.com"><knepley@gmail.com></a><br>
            <b>Sent:</b> Thursday, September 24, 2020 6:12 AM<br>
            <b>To:</b> Mark Adams <a class="moz-txt-link-rfc2396E" href="mailto:mfadams@lbl.gov"><mfadams@lbl.gov></a><br>
            <b>Cc:</b> PETSc <a class="moz-txt-link-rfc2396E" href="mailto:petsc-users@mcs.anl.gov"><petsc-users@mcs.anl.gov></a><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"
                moz-do-not-send="true">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"
                  moz-do-not-send="true">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" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>