[petsc-users] How_to_get_other_processor's_portion_of_a_vector

Youjun Hu youjunhu at gmail.com
Sun Jul 29 23:54:07 CDT 2018


Thank Jed for your instant response.
VectScatter seems as complicated as my manually handling the MPI
communication when fetching a remote portion of a vector.
Hope there is a simple way provided by PETSc to achieve this.
Cheers,
Youjun


On Sun, Jul 29, 2018 at 10:36 PM, Jed Brown <jed at jedbrown.org> wrote:

> See VecScatter.
>
> Youjun Hu <youjunhu at gmail.com> writes:
>
> > Hi all,
> >
> > The man-page for VecGetValues subroutine states that:
> > "VecGetValues gets values from certain locations of a vector. Currently
> can
> > only get values on the same processor ".
> >
> > I am wondering whether there is a subroutine that can be used to get
> values
> > from any portion of a vector, rather than limited to the current
> > processor's portion of the vector?
> >
> > It seems natural to expect that PETSc provides this kind of capability,
> > which is already there for some subroutines, e.g., VecSetValues.
> >
> > When using VecSetValues to set the values of a vector, one processor can
> > set other processors' portion of the vector. The communication is handled
> > by PETSc when VecAssembly is called.
> >
> > Am I missing something obvious?
> > Cheers,
> > Youjun
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180729/2ba65a11/attachment.html>


More information about the petsc-users mailing list