[petsc-dev] Fwd: no petsc on Edison

Hong hzhang at mcs.anl.gov
Thu Jan 26 12:53:52 CST 2017


Mark:
I see MatTransposeMatMult() is called by PCGAMGCoarsen_AGG().
When Gmat1 is created, if you know it is symmetric, then set
Gmat1->symmetric = PETSC_TRUE;

I can add following:
+    if (Gmat1->symmetric) {
+      ierr = MatMatMult(Gmat1, Gmat1, MAT_INITIAL_MATRIX, PETSC_DEFAULT,
&Gmat2);CHKERRQ(ierr);
+    } else {
+      ierr = MatTransposeMatMult(Gmat1, Gmat1, MAT_INITIAL_MATRIX,
PETSC_DEFAULT, &Gmat2);CHKERRQ(ierr);
+    }

In this way, MatTransposeMatMult() can be replace with MatMatMult() when
Gmat1 is symmetric.

Hong

>
>>>>
>>  MatTransposeMatMult() tends to use much larger ctable than MatMatMult.
>> Is your matrix symmetric? If so, MatMatMult() will use smaller ctable
>> and require less communication.
>>
>>
> Humm, that is good to know.
>
> 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?
>
> Thanks,
>
> Hong
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170126/d842bb11/attachment.html>


More information about the petsc-dev mailing list