[petsc-users] Global numbering obtained via ISPartitioningToNumbering is inconsistent with the partitioning indexset

Barry Smith bsmith at mcs.anl.gov
Mon Apr 9 17:10:51 CDT 2012


On Apr 9, 2012, at 5:06 PM, Mohammad Mirzadeh wrote:

> Hi,
> 
> I am using  'ISPartitioningToNumbering' to generate new global numbering from a partitioning indexset and I'm baffled at the following situation. I'm debugging my code on a simple grid consisting of 81 grid points partitioned among two processes. When I look into the partitioning indexset (i.e. looking at the indecies via ISView) I can see that 40 points have been assigned to proc 0 and 41 to processor 1. Isn't it true that when 81 points are distributed among two processors 41 should go to proc 0 and 40 to proc 1? 
> 
> I have based my whole code on the assumption (verified before through mailing list i guess) that natural ordering in PETSc leads to a distribution of points such that all processors get the same number of points ( [0, n/p) on proc 0, [n/p, 2n/p) on proc 1, ... ) unless n%p != 0, in which case the first k (with k = n%p) processors receive 1 point extra. Am I wrong to assume this?
> 
> Thanks,
> Mohammad
> 

> PS: Is it relevant that the partitioning indexset is obtained via ParMetis?partitiong

   Yes, ParMetis provides no guarantee about how many points would get assigned to each process.

   Barry




More information about the petsc-users mailing list