On Wed, Aug 31, 2011 at 2:17 AM, Likun Tan <span dir="ltr"><<a href="mailto:likunt@andrew.cmu.edu">likunt@andrew.cmu.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Thank you very much. So i should create the transpose matrix as MPIDense<br>
and partition it corresponding? That is, if the matrix is partitioned into<br>
3 parts by row, then the transpose matrix will be partitioned into 3 parts<br>
by column?<br></blockquote><div><br></div><div>1 part per process.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I have two more questions:<br>
1. I define a DA with PETSC_COMM_SELF, where is the array stored? Could i<br>
use this array in every process?<br></blockquote><div><br></div><div>It does not store anything, but with PETSC_COMM_SELF, the array will not be partitioned.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2. I vaguely remember that matrix can only be partitioned by row, is that<br>
true?<br></blockquote><div><br></div><div>Sparse matrices are generally partitioned by row. This is how the AIJ classes work,</div><div>and also our dense classes to mirror it.</div><div><br></div><div> Matt</div><div>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
best,<br>
<font color="#888888">Likun<br>
</font><div><div></div><div class="h5"><br>
<br>
On Tue, August 30, 2011 10:07 pm, Matthew Knepley wrote:<br>
> On Wed, Aug 31, 2011 at 12:48 AM, Likun Tan <<a href="mailto:likunt@andrew.cmu.edu">likunt@andrew.cmu.edu</a>><br>
> wrote:<br>
><br>
><br>
>><br>
>> I have MPIDense matrix, if i want to get the tranpose of the matrix,<br>
>> what should i do? Or i should use MPISparse instead?<br>
><br>
><br>
> If it is rectangular, create the transpose matrix first, then call<br>
> MatTranspose.<br>
><br>
><br>
> Matt<br>
><br>
><br>
><br>
>> On Tue, August 30, 2011 7:08 pm, Matthew Knepley wrote:<br>
>><br>
>>> On Tue, Aug 30, 2011 at 10:59 PM, Likun Tan <<a href="mailto:likunt@andrew.cmu.edu">likunt@andrew.cmu.edu</a>><br>
>>> wrote:<br>
>>><br>
>>><br>
>>><br>
>>>><br>
>>>> Dear all,<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Can MatTranspose be used on non-squra matrix? I have a matrix with<br>
>>>> size 200*27, and i want to get the tranpose of it.<br>
>>>><br>
>>>><br>
>>>><br>
>>><br>
>>> I assume you are talking about dense matrices. If so, yes.<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>>> Second question is, if the 200*27 is partitioned by row, how is the<br>
>>>> tranpose stored in each processor? Is it stored by column?<br>
>>>><br>
>>><br>
>>> For MPIDENSE, you cannot in-place transpose unless it is square.<br>
>>> Otherwise,<br>
>>> you provide the transpose matrix, so you determine the layout.<br>
>>><br>
>>> Matt<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>>> Thanks,<br>
>>>> Likun<br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>><br>
>>><br>
>>> --<br>
>>> What most experimenters take for granted before they begin their<br>
>>> experiments is infinitely more interesting than any results to which<br>
>> their<br>
>>> experiments lead. -- Norbert Wiener<br>
>>><br>
>>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
><br>
><br>
> --<br>
> What most experimenters take for granted before they begin their<br>
> experiments is infinitely more interesting than any results to which their<br>
> experiments lead. -- Norbert Wiener<br>
><br>
><br>
<br>
<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>