On Thu, Jan 26, 2017 at 10:53 AM, Hong <[email protected]> wrote:
> Mark:
> I see MatTransposeMatMult() is called by PCGAMGCoarsen_AGG().
>
Oh, right. I was thinking of RAP.
> 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);
> + }
>
>
That would be great thanks. When you do that I can change ex56 to use this,
test it, and update the test.
Thanks,
> 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
>>>
>>>
>>
>