[petsc-users] Imbalance in ParMETIS

Matthew Knepley knepley at gmail.com
Mon Jul 1 05:09:56 CDT 2019


On Mon, Jul 1, 2019 at 3:00 AM Eda Oktay <eda.oktay at metu.edu.tr> wrote:

> Dear Matt,
>
> In order to get a nice cut, I am trying to change the balance, that is why
> I tried to change ubvec. But still I couldn't understand why it didn't
> change anything.
>
> I tried to change vertex weights but it only made Max and Min change but
> it didn't change the cut.
>

I think you are confusing concepts. The "cut" is the number of edges
discarded when you divide the mesh
into pieces, but each piece is supposed to have an equal size. The only way
you can get the partitioner to
divide the mesh into pieces of unequal size is to use vertex weights.

  Thanks,

     Matt


> Thanks,
>
> Eda
>
>
> On Fri, Jun 28, 2019, 1:49 PM Matthew Knepley <knepley at gmail.com> wrote:
>
>> On Fri, Jun 28, 2019 at 5:38 AM Eda Oktay via petsc-users <
>> petsc-users at mcs.anl.gov> wrote:
>>
>>> Hello everyone,
>>>
>>> I am trying to change load balance in ParMETIS in order to give
>>> different number of elements to different processors. In the manual, it
>>> states that changing "ubvec" parameter should work. So, instead of 1.05, I
>>> gave 1.2,1.5 and so on but load balance didn't change. I always get Max 5
>>> Min 5 when I view load balance. The partitioning part of my code is:
>>>
>>
>> ParMetis is always balancing. ubvec changes the balance between having
>> even partitions and a nice cut. If
>> you want unbalanced partitions, you have to change the vertex weights.
>>
>>   Thanks,
>>
>>     Matt
>>
>>
>>>  ierr = MatConvert(A,MATMPIADJ,MAT_INITIAL_MATRIX,&AL);CHKERRQ(ierr);
>>>
>>>   ierr = MatPartitioningCreate(MPI_COMM_WORLD,&part);CHKERRQ(ierr);
>>>   ierr = MatPartitioningSetAdjacency(part,AL);CHKERRQ(ierr);
>>>
>>>   ierr = MatPartitioningSetFromOptions(part);CHKERRQ(ierr);
>>>   ierr = MatPartitioningApply(part,&partitioning);CHKERRQ(ierr);
>>>   MatPartitioningViewImbalance(part,partitioning);
>>>
>>> What should I do? Why changing ubvec didn't change anything, am I
>>> missing something?
>>>
>>> Thanks,
>>>
>>> Eda
>>>
>>
>>
>> --
>> 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
>>
>> https://www.cse.buffalo.edu/~knepley/
>> <http://www.cse.buffalo.edu/~knepley/>
>>
>

-- 
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

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190701/d6dc2a95/attachment.html>


More information about the petsc-users mailing list