Bin :<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="direction:ltr;font-size:10pt;font-family:Tahoma">
<br>
Thank you! From <font><span style="font-size:10pt">Barry&#39;s email, </span>
</font>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).<span class="Apple-style-span" style="font-family:arial;font-size:small"> </span></div></div>
</blockquote><div> </div><div>We do have</div><div>MatMatMult_MPIDense_MPIDense() in ~petsc/src/mat/impls/dense/mpi/mpidense.c.</div><div>i.e., we tried to interface <span class="Apple-style-span" style="font-family:Tahoma;font-size:14px">PLAPACK&#39;s dense </span><span class="Apple-style-span" style="font-family:Tahoma;font-size:14px">matrix-matrix multiplication.</span></div>
<div>However, in MatMatMultSymbolic_MPIDense_MPIDense():</div><div>SETERRQ(((PetscObject)A)-&gt;comm,PETSC_ERR_LIB,&quot;Due to apparent bugs in PLAPACK,this is not currently supported&quot;);</div><div>Therefore, this does not work.</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="direction:ltr;font-size:10pt;font-family:Tahoma">
<br>
As regards my question, I am sorry that I need<br>
<br>
<div><span style="font-family:Tahoma;font-size:14px"><span style="font-family:arial;font-size:small"><font face="Tahoma">C_seqdense =</font> <span style="font-family:Tahoma;font-size:14px">A_seqdense*B_seqdense^T<br>
</span></span></span>
<div><span style="font-family:Tahoma;font-size:14px"><span style="font-family:arial;font-size:small"><font face="Tahoma">C_seqdense =</font> <span style="font-family:Tahoma;font-size:14px">A_seqdense^T*B_seqdense<br></span></span></span></div>
</div></div></div></blockquote><div> </div><div>These are purely dense computation,  <span class="Apple-style-span" style="font-family:Tahoma;font-size:14px">Elemental/PLAPACK should be used.</span></div><div><span class="Apple-style-span" style="font-family:Tahoma;font-size:14px">Hong</span></div>
<div><font class="Apple-style-span" face="Tahoma"><br></font></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="direction:ltr;font-size:10pt;font-family:Tahoma">
<div><div><span style="font-family:Tahoma;font-size:14px"><span style="font-family:arial;font-size:small"><span style="font-family:Tahoma;font-size:14px"><br>
<br>
Gao</span></span></span><br>
</div>
</div>
<div style="font-size:16px;font-family:Times New Roman">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b> Hong Zhang [<a href="mailto:hzhang@mcs.anl.gov" target="_blank">hzhang@mcs.anl.gov</a>]<br>
<b>Sent:</b> Thursday, April 05, 2012 4:30 PM<br>
<b>To:</b> Gao Bin<br>
<b>Cc:</b> PETSc users list<div><div class="h5"><br>
<b>Subject:</b> Re: [petsc-users] question about MatMatMultTranspose<br>
</div></div></font><br>
</div><div><div class="h5">
<div></div>
<div>Bin :
<div>We do not have plan for supporting parallel (mpiaij format)
<div>C = <span style="font-family:Tahoma;font-size:14px">A*B^T</span></div>
<div><span style="font-family:Tahoma;font-size:14px">because sparse inner product is too expensive, and we have parallel C = A^T*B.</span></div>
<div><span style="font-family:Tahoma;font-size:14px"><br>
</span></div>
<div><font face="Tahoma">For sequential </font>C = <span style="font-family:Tahoma;font-size:14px">A*B^T, currently we only support </span></div>
<div><font face="Tahoma"><span style="font-family:arial">C_seqaij = <span style="font-family:Tahoma;font-size:14px">A_seqaij*B_seqaij^T</span></span></font></div>
<div><font face="Tahoma"><span style="font-family:arial"><span style="font-family:Tahoma;font-size:14px"><br>
</span></span></font></div>
<div><font face="Tahoma">Do you want </font></div>
<div><font face="Tahoma">C_seqdense =</font> <span style="font-family:Tahoma;font-size:14px">A_seqaij*B_seqaij^T</span></div>
<div><span style="font-family:Tahoma;font-size:14px">or </span></div>
<div><span style="font-family:Tahoma;font-size:14px"><span style="font-family:arial;font-size:small"><font face="Tahoma">C_seqdense =</font> <span style="font-family:Tahoma;font-size:14px">A_seqaij*B_seqdense^T?</span></span></span></div>

<div><font face="Tahoma"><br>
</font></div>
<div><font face="Tahoma">Hong</font></div>
<div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-size:10pt;font-family:Tahoma"><br>
Good to know it is simpler ;-) I am switching to the developed version and try it. Again, thank you very much.<br>
<br>
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.<br>
<br>
Cheers<br>
<br>
Gao<br>
<div style="font-size:16px;font-family:Times New Roman">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma">
<div><b>From:</b> <a href="mailto:petsc-users-bounces@mcs.anl.gov" target="_blank">
petsc-users-bounces@mcs.anl.gov</a> [<a href="mailto:petsc-users-bounces@mcs.anl.gov" target="_blank">petsc-users-bounces@mcs.anl.gov</a>] on behalf of Jed Brown [<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>]<br>

</div>
<b>Sent:</b> Thursday, April 05, 2012 2:32 PM<br>
<b>To:</b> PETSc users list; Hong Zhang
<div><br>
<b>Subject:</b> Re: [petsc-users] question about MatMatMultTranspose<br>
</div>
</font><br>
</div>
<div>
<div>
<div></div>
<div>
<div class="gmail_quote">On Thu, Apr 5, 2012 at 05:16, Gao Bin <span dir="ltr">&lt;<a href="mailto:bin.gao@uit.no" target="_blank">bin.gao@uit.no</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">Thank you for your quick reply. But as pointed out at
<a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatMatTransposeMult.html" target="_blank">
http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatMatTransposeMult.html</a>:<br>
<br>
This routine is currently only implemented for pairs of SeqAIJ matrices. C will be of type MATSEQAIJ.<br>
<br>
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.</div>
</blockquote>
</div>
<br>
<div>This is much simpler than the sparse case. Hong, did you intend to get around to this?</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br>