<p>thank you very much, Barry. I made a misunderstanding about the parameters &quot;ix&quot; and &quot;iy&quot;.</p><p>Further question is after finishing scatter, the subvector will be redistributed? I mean like matrix, because I get a submatrix, the rows in some processes will become zero, is the subvector the same with the matrix? thanks.<br>
</p><p>Yujie</p><br><div class="gmail_quote">On Fri, Jan 2, 2009 at 11:46 AM, Barry Smith <span dir="ltr">&lt;<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<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><font color="#888888">
<br>
 &nbsp; Barry</font><div><div class="Wj3C7c"><br>
<br>
On Jan 2, 2009, at 1:41 PM, Yujie wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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>
</blockquote>
<br>
</div></div></blockquote></div><br>