[petsc-users] Domain partitioning using DAs

Jed Brown jedbrown at mcs.anl.gov
Sat Oct 8 08:32:32 CDT 2011

On Sat, Oct 8, 2011 at 07:27, Mohamad M. Nasr-Azadani <mmnasr at gmail.com>wrote:

> Thanks Jed. I guess the whole point I am missing is in that "squarish".
> I, for instance, use two processors for a domain of the global size:
> nx=50
> ny=40
> nz=4
> To my surprise, the way it was decomposed was in y-direction, i.e.
> processor 0:
> 0-49
> 0-19
> 0-3
> processor 1:
> 0-49
> 20-39
> 0-3
> and not x-direction which minimizes the surface area between the two
> processors.
> Obviously "2" is a prime number. In that case, is PETSc biased to choose
> any of the directions?

There is an order to which directions get tried, but it will never pick a
split that is "too bad". If you run on four processes, it will split in both
the X and Y directions. The complete code is here.


I'm a little surprised it doesn't find the "best" split in this simple case.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111008/92f6d39a/attachment-0001.htm>

More information about the petsc-users mailing list