[petsc-users] One sequencial vector seen from other process
Barry Smith
bsmith at mcs.anl.gov
Sat Dec 10 17:05:24 CST 2016
Does this thing need to be a PETSc vector (that is will you perform VecXXX operations on it) or can it simply be an array. If it can be an array then I would use MPI_Bcast() http://www.mpich.org/static/docs/v3.2/www3/MPI_Bcast.html.
Or you can use VecScatterCreateToAll(), note that the input Vec is kind of funny because it must be defined as an VECMPI but has zero local entries on all processes except the 0th process.
Barry
> On Dec 10, 2016, at 4:52 PM, Guido Giuntoli <giuntoli1991 at gmail.com> wrote:
>
> Hi,
>
> I am solving a problem that needs that process 0 (for example) modifies a small vector (let say 1000 components). Then all the process should be able to get all the component of this vector. Which is the best way to do it ?
>
> I don't want a distributed vector because only one process will be the responsible of computing the components !
>
> Thanks, Guido.
More information about the petsc-users
mailing list