<div dir="ltr"><div>Thank Jed for your instant response.</div><div>VectScatter seems as complicated as my manually handling the MPI communication when fetching a remote portion of a vector.</div><div>Hope there is a simple way provided by PETSc to achieve this.</div><div>Cheers,</div><div>Youjun</div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jul 29, 2018 at 10:36 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">See VecScatter.<br>
<div class="HOEnZb"><div class="h5"><br>
Youjun Hu <<a href="mailto:youjunhu@gmail.com">youjunhu@gmail.com</a>> writes:<br>
<br>
> Hi all,<br>
><br>
> The man-page for VecGetValues subroutine states that:<br>
> "VecGetValues gets values from certain locations of a vector. Currently can<br>
> only get values on the same processor ".<br>
><br>
> I am wondering whether there is a subroutine that can be used to get values<br>
> from any portion of a vector, rather than limited to the current<br>
> processor's portion of the vector?<br>
><br>
> It seems natural to expect that PETSc provides this kind of capability,<br>
> which is already there for some subroutines, e.g., VecSetValues.<br>
><br>
> When using VecSetValues to set the values of a vector, one processor can<br>
> set other processors' portion of the vector. The communication is handled<br>
> by PETSc when VecAssembly is called.<br>
><br>
> Am I missing something obvious?<br>
> Cheers,<br>
> Youjun<br>
</div></div></blockquote></div><br></div>