[petsc-dev] Fwd: no petsc on Edison

Hong hzhang at mcs.anl.gov
Thu Jan 26 21:56:47 CST 2017


Mark :
>
> I see MatTransposeMatMult() is called by PCGAMGCoarsen_AGG().
>>
>
> Oh, right. I was thinking of RAP.
>
How do you use RAP for Gmat1^T * Gmat1?

>
>
>> 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.
>
Where is Gmat1 created, in user's code (e.g., ex56) or inside PETSc?

Hong

>
> 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
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170126/4f2e9f70/attachment.html>


More information about the petsc-dev mailing list