[petsc-users] partition of DM Vec entries

Barry Smith bsmith at mcs.anl.gov
Fri Oct 14 21:40:20 CDT 2016


  Thanks, the question is very clear now.

  For DMDA you can use DMDAGetNeighborsRank() to get the list of the (up to) 9 neighbors of a processor. (Sadly this routine does not have a manual page but the arguments are obvious). For other DM I don't think there is any simple way to get this information. For none of the DM is there a way to get information about what process is providing a specific ghost cell. 

  It is the "hope" of PETSc (and I would think most parallel computing models) that the details of exactly what process is computing neighbor values should not matter for your own computation. Maybe if you provide more details on how you wish to use this information we may have suggestions on how to proceed.

  Barry



> On Oct 14, 2016, at 9:23 PM, Sang pham van <pvsang002 at gmail.com> wrote:
> 
> Hi Barry,
> 
> In 2 processes case, the problem is simple, as I know all ghost cells of partition 0 are updated from partition 1. However, in the case of many processes, how do I know from which partitions ghost cells of partition 0 are updated? In other words, How can I know neighboring partitions of the partition 0? and can I get a list of ghost cells managing by a neighboring partition?
> Please let me know if my question is still not clear.
> 
> Many thanks.
> 
> 
> On Sat, Oct 15, 2016 at 8:59 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 
> > On Oct 14, 2016, at 8:50 PM, Sang pham van <pvsang002 at gmail.com> wrote:
> >
> > Hi,
> >
> > I am using DM Vec for a FV code, for some reasons, I want to know partition of all ghost cells of a specific partition. is there a way do that?
> 
>   Could you please explain in more detail what you want, I don't understand? Perhaps give a specific example with 2 processes?
> 
>  Barry
> 
> 
> 
> >
> > Many thanks.
> >
> > Best,
> >
> 
> 



More information about the petsc-users mailing list