[petsc-users] question about MatMatMultTranspose
Hong Zhang
hzhang at mcs.anl.gov
Thu Apr 5 10:39:06 CDT 2012
Bin :
>
> Thank you! From Barry's email, I have learned that PETSc aims at sparse
> matrix. Therefore, I may consider using MatGetArray() for further parallel
> calculations, or using Elemental/PLAPACK for dense matrix calculations. I
> notice PETSc could use PLAPACK, but if I understand correctly, that has
> only been implemented for LU, Cholesky decomposition, not matrix-matrix
> multiplications (although it looks to be simple).
>
We do have
MatMatMult_MPIDense_MPIDense() in ~petsc/src/mat/impls/dense/mpi/mpidense.c.
i.e., we tried to interface PLAPACK's dense matrix-matrix multiplication.
However, in MatMatMultSymbolic_MPIDense_MPIDense():
SETERRQ(((PetscObject)A)->comm,PETSC_ERR_LIB,"Due to apparent bugs in
PLAPACK,this is not currently supported");
Therefore, this does not work.
>
> As regards my question, I am sorry that I need
>
> C_seqdense = A_seqdense*B_seqdense^T
> C_seqdense = A_seqdense^T*B_seqdense
>
These are purely dense computation, Elemental/PLAPACK should be used.
Hong
>
> Gao
> ------------------------------
> *From:* Hong Zhang [hzhang at mcs.anl.gov]
> *Sent:* Thursday, April 05, 2012 4:30 PM
> *To:* Gao Bin
> *Cc:* PETSc users list
>
> *Subject:* Re: [petsc-users] question about MatMatMultTranspose
>
> Bin :
> We do not have plan for supporting parallel (mpiaij format)
> C = A*B^T
> because sparse inner product is too expensive, and we have parallel C =
> A^T*B.
>
> For sequential C = A*B^T, currently we only support
> C_seqaij = A_seqaij*B_seqaij^T
>
> Do you want
> C_seqdense = A_seqaij*B_seqaij^T
> or
> C_seqdense = A_seqaij*B_seqdense^T?
>
> Hong
>
>>
>> Good to know it is simpler ;-) I am switching to the developed version
>> and try it. Again, thank you very much.
>>
>> P.S., Moreover, I notice that some functions is not for MATMPIDENSE. May
>> I ask if they are too difficult to implement (for instance, C=A*B^T and
>> C=A^T*B for MATMPIDENSE)? Thank you.
>>
>> Cheers
>>
>> Gao
>> ------------------------------
>> *From:* petsc-users-bounces at mcs.anl.gov [petsc-users-bounces at mcs.anl.gov]
>> on behalf of Jed Brown [jedbrown at mcs.anl.gov]
>> *Sent:* Thursday, April 05, 2012 2:32 PM
>> *To:* PETSc users list; Hong Zhang
>>
>> *Subject:* Re: [petsc-users] question about MatMatMultTranspose
>>
>> On Thu, Apr 5, 2012 at 05:16, Gao Bin <bin.gao at uit.no> wrote:
>>
>>> Thank you for your quick reply. But as pointed out at
>>> http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatMatTransposeMult.html
>>> :
>>>
>>> This routine is currently only implemented for pairs of SeqAIJ matrices.
>>> C will be of type MATSEQAIJ.
>>>
>>> Therefore I can not use it for dense matrix, am I right? If so, will
>>> MatMatTransposeMult be extended for other types of matrix later on? Thank
>>> you very much.
>>>
>>
>> This is much simpler than the sparse case. Hong, did you intend to get
>> around to this?
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120405/258f9438/attachment.htm>
More information about the petsc-users
mailing list