On Tue, Jan 6, 2009 at 1:43 PM, Yujie <span dir="ltr">&lt;<a href="mailto:recrusader@gmail.com">recrusader@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<p>Dear Matthew:</p><p>Two processors are used. The matrix dimension is 105*108;<br></p><p>MatGetOwnershipRange()&nbsp;</p><p>proc1: 0-&gt;56</p><p>proc2: 56-&gt;105</p><div class="Ih2E3d"><p>Mat-&gt;camp.rstart; Mat-&gt;cmap.rend</p>
</div><p>proc1: 0-&gt;54</p>
<p>proc2: 54-&gt;108</p><p>MatGetLocalSize()</p><p>proc1: row 56 col 54</p><p>porc2: row 49 col 54</p><p>MatDenseGetLocalMatrix()</p><p>proc1: 56*108</p><p>proc2: 49*108</p><p></p></blockquote><div><br>Since PETSc matrices are all stored row-wise, even if columns are assigned to one process<br>
for the other, the storage is divided by row. This GetLocalMatrix() returns all the rows<br>associated with a given process.<br><br>&nbsp;&nbsp; Matt<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<p>thanks.</p><p>Yujie</p><div><div></div><div class="Wj3C7c"><br><div class="gmail_quote">
On Tue, Jan 6, 2009 at 11:33 AM, Matthew Knepley <span dir="ltr">&lt;<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div><div>On Tue, Jan 6, 2009 at 11:52 AM, Yujie <span dir="ltr">&lt;<a href="mailto:recrusader@gmail.com" target="_blank">recrusader@gmail.com</a>&gt;</span> wrote:<br></div></div><div class="gmail_quote">
<div><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<p>Dear PETSc developers:</p><p>I am trying to use MatGetArray() and MatSetValues() to combine several MPIDense matrices into one matrix. At the beginning, I use&nbsp;</p><p>MatGetOwnershipRange() and Mat-&gt;camp.rstart; Mat-&gt;cmap.rend (2.3.3-p8 version) to get the start, end row and column. I can calculate the local rows and columns.</p>



<p>I also use MatGetLocalSize() to confirm the accuracy. However, I always find some data loses in the combined matrix.</p><p>And then, I try to use MatDenseGetLocalMatrix() to get the lcoal matrix and output it. I find column information by MatGetLocalSize() is not consistent with by MatDenseGetLocalMatrix(), is it bug? could you give me some advice? thanks a lot.</p>


</blockquote></div></div><div>What information?<br><br>&nbsp; Matt<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<p>Regards,</p><p>Yujie</p>
</blockquote></div>-- <br><font color="#888888">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>


</font></blockquote></div><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <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>