[petsc-users] AOCreateBasic & AOCreateBasicIS
Matthew Knepley
knepley at gmail.com
Mon Apr 15 10:11:45 CDT 2013
On Mon, Apr 15, 2013 at 10:04 AM, Hui Zhang <mike.hui.zhang at hotmail.com>wrote:
>
> On Apr 15, 2013, at 4:53 PM, Jed Brown wrote:
>
> > Hui Zhang <mike.hui.zhang at hotmail.com> writes:
> >
> >> Is the following correct?
> >>
> >> From my understanding before,
> >>
> >> AOCreateBasic(MPI_Comm comm,PetscInt napp,const PetscInt myapp[],const
> PetscInt mypetsc[],AO *aoout)
> >>
> >> should be called by all the processors in 'comm' and each involved
> processor provides only part of all the indices.
> >> For example, 'comm' contains two processors proc0,
> >>
> >> on proc0: napp= 3, myapp[]= {0,1,2}, mypetsc[]= {4,3,2}
> >>
> >> on proc1: napp= 2, myapp[]= {3,4}, mypetsc[]= {0,1}
> >>
> >> so that union of myapp[] of proc0 and proc1 gives 0,..,4, and union of
> myapp[] of proc0 and proc1 also gives 0,..,4.
> >>
> >> This seemed to work even if I fed AOApplicationToPetsc with indices on
> proc0 larger than 2.
> >> But now I suspect I was wrong after reading
> >>
> >>
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/AO/AOCreateBasic.html
> >>
> >> The question is whether AOCreateBasic will do union of the input
> indices automatically, or the AO is only for the input indices?
> >
> > AOCreateBasic does an allgather on the indices so it can translate any
> > indices. This is not memory scalable and we don't recommend using it
> > unless you know your problem sizes are not very large, but some people
> > want to translate arbitrary indices non-collectively.
>
> Thanks! Is the problem you mentioned serious when the indices to be
> translated on each processor include only a few ones beyond the input
> myapp[] of AOCreateBasic?
> Because I only use AO for FEM assembly so I would not translate too many
> beyond local ranges.
>
If your problem gets large, this will be a problem.
> Another question: do the inputs IS's to AOCreateBasicIS include all the
> indices, and AOCreateBasicIS would not do any gathering of indices?
No, its the same thing.
Matt
--
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/20130415/f3fa5073/attachment.html>
More information about the petsc-users
mailing list