[petsc-users] AOCreateBasic & AOCreateBasicIS

Jed Brown jedbrown at mcs.anl.gov
Mon Apr 15 09:53:19 CDT 2013


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.


More information about the petsc-users mailing list