[petsc-users] VecScatter betweeen Vectors with different parallel layouts

Matthew Knepley knepley at gmail.com
Mon Feb 13 07:18:02 CST 2017


On Mon, Feb 13, 2017 at 5:51 AM, Barletta, Ivano <ibarletta at inogs.it> wrote:

> Hello PETSc users
>
> I was wondering if you've got any suggestion for the issue
> mentioned in the topic.
>
> I'm solving a linear system on my unstructured grid that has its
> own partitioning. When I set up the linear system in PETSc I
> use the model partitioning whose grid points might not be
> evenly balanced (generally is not) over the processors.
>
> So far I use VecScatter and IS to re-order the solution vector
> with the application numbering.
>
> What I aim at, now, is to let PETSc to decide the linear system
> partitioning with PETSC_DECIDE local dimension and
> see if I get some gain in performances, but in
> this case I have to scatter between vectors that, at any rate, have
> different parallel layouts (one of the requirements of
> VecScatter is to have 2 Vecs with same layouts)
>

That is exactly what VecScatter does. It does not require the same layout.

Example:
              proc 0     proc1
Vec A     0    1        2   3
Vec B         0        1  2  3

You create a VecScatter A --> B with indices
               proc 0     proc 1
from       0     1       2    3
to           3      2      1     0

and it will reverse the vector into the new layout.

   Matt


> Does anyone of you have ever faced a similar problem?
> any suggestion about how to circumvent this?
>
> Feel free to ask for further information if my explanation is
> not clear enough
>
> Thanks in advance
> Ivano
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170213/87d00d40/attachment.html>


More information about the petsc-users mailing list