ParMETIS_V3_PartMeshKway gives that most of the elements belong to another processor

Hi,
I'm trying to use ParMETIS_V3_PartMeshKway to compute a repartitioning for a distributed finite element mesh that has been adaptively refined locally on each processor. However, whatever I do, this routine gives as a result that most of the elements should belong to another processor than they currently reside on. Below is a small 3-processor case that illustrates the problem.

Input on processor 1:

elmdist: 1 19 32 51

eptr: 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55

eind: 2 12 1 12 2 13 3 13 2 13 3 14 4 14 3 14 4 15 4 5 36 15 4 36 15 36 35 36 5 34 35 34 16 34 35 36 13 23 12 23 13 24 14 24 13 24 14 25 15 25 14 25 15 26

Input on processor 2:

elmdist: 1 19 32 51

eptr: 1 4 7 10 13 16 19 22 25 28 31 34 37 40

eind: 9 19 8 19 9 20 10 20 9 20 10 21 11 21 10 21 11 22 29 19 30 20 30 19 30 20 31 21 31 20 31 21 32 22 32 21 32 22 33

Input on processor 3:

elmdist: 1 19 32 51

eptr: 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58

eind: 5 6 37 5 37 34 37 16 34 17 16 37 6 17 37 7 17 6 17 7 18 8 18 7 18 8 19 26 15 38 38 15 35 16 38 35 27 26 38 16 27 38 17 27 16 27 17 28 18 28 17 28 18 29 19 29 18

For all 3 processors, I use the parameters:

wgtflag=0
num_flag=1
ncon=1
ncommonnodes=2
nparts=3
tpwgts=3*0.333333
ubvec=1.050000
options=0 0 0

This gives me the result:

On processor 1:
part: 2 2 2 2 2 2 2 2 3 2 3 3 2 2 2 2 2 3
edgecut=7

On processor 2:
part: 1 1 1 1 1 1 1 1 1 1 1 1 1
edgecut=7

On processor 3:
part: 3 3 3 3 3 3 1 1 1 3 3 3 3 3 3 3 3 3 1
edgecut=7

So, it wants nearly all the elements on processor 1 to move to processor 2, in exchange of all elements currently on processor 2. But wouldn't it be better to let all elements currently on processor 2 stay there, only adding some extra ones from processor 1 (or 3) instead? Only for processor 3 the results are somewhat as expected.

Can someone explain why this happens, or what I am doing wrong?

Thanks,
Knut

RE: SEGV for the above mesh

Hi,

I'm trying to partition 8 node brick element mesh. I managed to set up the distributed CSR mesh input for ParMETIS_V3_PartMeshKway function. I got Segmentation violation.
So I picked up the above mentioned simple mesh to find out if my understanding of parameters for ParMETIS_V3_PartMeshKway were correct.

however I get the following error,
***Cannot bisect a graph with 0 vertices!
***You are trying to partition a graph into too many parts!
***Cannot bisect a graph with 0 vertices!
***You are trying to partition a graph into too many parts!
***Cannot bisect a graph with 0 vertices!
***You are trying to partition a graph into too many parts!

could someone comment on it please.

thanks in Advance.
Prashanth

P.S: I use parmetis 3.0.

RE: Use ParMETIS_V3_AdaptiveRepart instead

Hello again,

I now tried to use ParMETIS_V3_Mesh2Dual followed by ParMETIS_V3_AdaptiveRepart instead, since the meshes in question were results from an adaptive refinement. And that gave me much better results. In fact, it now looks more as expected.

Can anyone comment on this? Why does not PartMeshKway behave in this case?

-kmo

RE: The adaptive routine is

The adaptive routine is designed to compute a partitioning that is as similar to the old one, whereas the other one is designed to compute a partitioning that does not take into account the initial graph distribution.