Dear Matthew:<br><br>They have the same distribution according to the distribution I have mentioned about submatrix? Could you give me more details? thanks a lot.<br><br>Regards,<br>Yujie<br><br><div class="gmail_quote">On Fri, Jan 2, 2009 at 6:20 PM, Matthew Knepley <span dir="ltr">&lt;<a href="mailto:knepley@gmail.com">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 class="Ih2E3d">On Fri, Jan 2, 2009 at 7:58 PM, Yujie <span dir="ltr">&lt;<a href="mailto:recrusader@gmail.com" target="_blank">recrusader@gmail.com</a>&gt;</span> wrote:<br>
</div><div class="gmail_quote"><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear Barry:<br><br>When using MatGetSubmatrix() to get a submatrix in parallel mode, to my knowledge, this function will exact the rows and cols for submatrix. This submatrix is not redistributed. For example, if there is zero row and zero col in a process, the row and col of this submatrix in this process are zero, right?<br>


However, to get a subvector using Vec scatter, the user needs to create the subvector using MPI_COMM, that is new distribution for subvector is generated. Just regarding only rows or cols of the submatrix and the subvector, their distribution should be different even if using the same index to get them, right? thanks a lot.</blockquote>

</div><div><br>No. They work exactly the same way.<br><br>&nbsp; Matt<br>&nbsp;</div><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Regards,<br>Yujie<br>
<br><div class="gmail_quote">On Fri, Jan 2, 2009 at 5:15 PM, Barry Smith <span dir="ltr">&lt;<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</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;">


<br>
 &nbsp; The ix and iy are always global indices based on where the vector lives.<br>
<br>
 &nbsp; If you are going from a parallel to parallel vector then both indices are &quot;global&quot;<br><font color="#888888">
<br>
 &nbsp;Barry</font><div><div></div><div><br>
<br>
On Jan 2, 2009, at 2:21 PM, Yujie wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear Barry:<br>
<br>
I have a new question about the parameter &quot;iy&quot;(new index set of subvector). To parallel vector, how to provide &quot;ix&quot; and &quot;iy&quot;?<br>
<br>
Just providing the local index subset for &quot;ix&quot; and &quot;iy&quot;? if it is, it is a little difficult to let the local vector know its global position in the new subvector? If the user needs to provide the global position of local vector for &quot;iy&quot;. some MPI communication should be needed, it looks like not a good method. In exacting submatrix, the function hides this problem. could you give me any comments? thanks a lot.<br>



<br>
Regards,<br>
<br>
Yujie<br>
<br>
<br>
On Fri, Jan 2, 2009 at 11:46 AM, Barry Smith &lt;<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>&gt; wrote:<br>
<br>
 &nbsp;VecScatter is for this purpose.<br>
<br>
 &nbsp;Rational: extracting subparts of vectors for ghost points etc takes place many times in a simulation; maybe millions.<br>
Thus separating it into a set-up followed by many uses is a &nbsp;worthwhile optimization. Extracting submatrices occur<br>
much less often in a simulation, maybe tens, hundreds or thousands of times so it is not worth the extra complexity<br>
of having separate set-up followed by many uses. One could argue that uniformity of design means we should have<br>
handled matrices with a MatScatter concept to parallel the Vec approach, but it is too late now :-).<br>
<br>
 &nbsp;Barry<br>
<br>
<br>
On Jan 2, 2009, at 1:41 PM, Yujie wrote:<br>
<br>
Like MatGetSubMatrix(), whether is there a function to get a subvector in parallel mode? I have checked some scatter functios, they don&#39;t likely work. thanks a lot.<br>
<br>
Regards,<br>
<br>
Yujie<br>
<br>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br>
</blockquote></div></div><font color="#888888"><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>

</font></blockquote></div><br>