On Tue, Jan 6, 2009 at 1:55 PM, Yujie <span dir="ltr"><<a href="mailto:recrusader@gmail.com">recrusader@gmail.com</a>></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>I am sorry, Matthew. I can't understand what you said. You mean it is not bug? However, practically, the dimension of local matrix in proc1 is 56*108? if it is, how to obtain its accurate dimension? thanks a lot.<br>
</p></blockquote><div>For rowwise storage, the number of columns is always the global number.<br><br> Matt<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<p></p>
<p>Regards,<br></p><font color="#888888"><p>Yujie</p></font><div><div></div><div class="Wj3C7c"><br><div class="gmail_quote">On Tue, Jan 6, 2009 at 11:45 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></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>On Tue, Jan 6, 2009 at 1:43 PM, Yujie <span dir="ltr"><<a href="mailto:recrusader@gmail.com" target="_blank">recrusader@gmail.com</a>></span> wrote:<br></div><div class="gmail_quote"><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 Matthew:</p><p>Two processors are used. The matrix dimension is 105*108;<br></p><p>MatGetOwnershipRange() </p><p>proc1: 0->56</p><p>proc2: 56->105</p><div><p>Mat->camp.rstart; Mat->cmap.rend</p>
</div><p>proc1: 0->54</p>
<p>proc2: 54->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></blockquote></div><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> Matt<br> </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>thanks.</p><p>Yujie</p><div><div><br><div class="gmail_quote">
On Tue, Jan 6, 2009 at 11:33 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></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"><<a href="mailto:recrusader@gmail.com" target="_blank">recrusader@gmail.com</a>></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 </p><p>MatGetOwnershipRange() and Mat->camp.rstart; Mat->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> Matt<br> </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></div><div><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>
</div></div></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>