> On Jun 20, 2019, at 3:47 AM, Eda Oktay via petsc-users 
> <[email protected]> wrote:
> 
> Hello everyone,
> 
> I am trying to partition a matrix into unequal parts: for example I am trying 
> to partition a 10*10 matrix into 4*4 and 6*6 submatrices. However, ParMETIS 
> is always dividing the matrix into 2 equal parts (5*5).
> 
> The reason why I am trying to do this is that I am using spectral 
> partitioning method.First, I find the eigenvector corresponding to second 
> smallest eigenvalue and then sort the vector according to signs of elements. 
> So, if there is 4 negative values in the vector, the matrix should be divided 
> as 4*4 and 6*6. But I can't do it by using ParMETIS.

  I don't understand, if you have your own spectral partitioning code then why 
would you need or want to use ParMETIS? All ParMETIS does is decide what 
variables to assign to each process, nothing more.

   Would you like to register your spectral partitioning routine and use it 
with MatPartitioning calls? If so take a look at src/mat/partition/partion.c 
and the routine MatPartitioningCreate_Current to get an idea of how it is done.

> 
> I tried MatPartitioningSetPartitionWeights but it doesn't work since it only 
> shows when I looked at view imbalance option that partitioning imbalance 
> info: max 6 min 4 but still the matrix was divided into 5*5 and 5*5.
> 
> How can I change the load balance?
> 
> Thanks,
> 
> Eda

Reply via email to