<div dir="ltr"><div class="gmail_extra">Joon :<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Jed,<br>
<br>
Hello. I modified my code using MatTranspose and MatMatMult, and it works well.<br>
BTW, the result of the multiplication of seqaij and seqdense was seqdense.<br>
I thought C should be seqaij when A is seqaij and B is seqdense in C=A*B.<br></blockquote><div> </div><div>When B is dense, C=A*B is a dense matrix.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is the way to get seqaij just seqaij*seqaij?<br></blockquote><div>Why do you want store a dense matrix in sparse format?</div><div><br></div><div>Hong</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im HOEnZb">
<br>
----- Original Message -----<br>
</div><div class="im HOEnZb">From: "Joon Hee Choi" <<a href="mailto:choi240@purdue.edu">choi240@purdue.edu</a>><br>
To: "Jed Brown" <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>><br>
</div><div class="HOEnZb"><div class="h5">Cc: <a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><br>
Sent: Thursday, September 26, 2013 2:45:38 PM<br>
Subject: Re: [petsc-users] About MatTransposeMatMult<br>
<br>
> Thank you. I think MatMatMult runs well for multiplication between seqaij and seqdense.<br>
<br>
> Joon<br>
<br>
----- Original Message -----<br>
From: "Jed Brown" <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>><br>
To: "Karl Rupp" <<a href="mailto:rupp@mcs.anl.gov">rupp@mcs.anl.gov</a>>, "Joon Hee Choi" <<a href="mailto:choi240@purdue.edu">choi240@purdue.edu</a>>, <a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><br>
Cc: "Hong Zhang" <<a href="mailto:hzhang@mcs.anl.gov">hzhang@mcs.anl.gov</a>><br>
Sent: Thursday, September 26, 2013 11:01:42 AM<br>
Subject: Re: [petsc-users] About MatTransposeMatMult<br>
<br>
>> Karl Rupp <<a href="mailto:rupp@mcs.anl.gov">rupp@mcs.anl.gov</a>> writes:<br>
<br>
>>> Hi,<br>
>>><br>
>>> I am trying to calculate M = X^T * B. X is a seqaij and B is a seqdense matrix.<br>
>>><br>
>>> This is not yet allowed in the latest 3.4. release.<br>
<br>
>> You can explicitly transpose X:<br>
<br>
>> MatTranspose(X,MAT_INITIAL_MATRIX,&Xt);<br>
<br>
>> and then use MatMatMult.<br>
<br>
>>> However, I used MatTransposeMatMult() but I got an error. Can someone why I got the >>> error and how I should modify my code? I am attaching my simple code, error message, >>> and result. Thank you very much.<br>
>>><br>
>>> Do you use the master branch from our Bitbucket repository? It contains<br>
>>> the commit where Hong added the respective functionality:<br>
>>> <a href="https://bitbucket.org/petsc/petsc/commits/8949adfd119cb1d44c9fb5cf3dc01f4b6a02252d" target="_blank">https://bitbucket.org/petsc/petsc/commits/8949adfd119cb1d44c9fb5cf3dc01f4b6a02252d</a><br>
<br>
>> This is only for MPI. Hong, can you expose MatTransposeMatMult_SeqAIJ_SeqDense?<br>
</div></div></blockquote></div><br></div></div>