Metis.jl icon indicating copy to clipboard operation
Metis.jl copied to clipboard

partioning to 2 zones in a 3 node system gives no partition

Open Arjunayodya opened this issue 3 years ago • 1 comments

I am trying to use metis like this

using Metis
edges= [1 2; 2 1; 2 3] 
zone = 2
g = SimpleGraph()

add_vertices!(g, maximum(edges))

for b = 1:size(edges)[1]
     add_edge!(g, edges[b, 1], edges[b, 2])
end

area=Metis.partition(g, zone, alg = :KWAY)

in the area, I am supposed to get 1,1,2 or 2,1,2 or 2, 2,1. But I am getting only

3-element Vector{Int32}:
 2
 2
 2

means no partitioning is done?

Is there something defined in Metis, with a minimum no of the vertex/ edges to get the partitioning work? I am getting done only when the no of vertex is 4?

But the partitioning is working (even with 2 vertex) when we change the algorithm from KWAY to RECURSIVE

Arjunayodya avatar Aug 08 '22 10:08 Arjunayodya

Can you check/have you checked if this happens when using Metis directly?

fredrikekre avatar Aug 29 '22 14:08 fredrikekre

I have seen elsewhere that Metis behaves somewhat strange with few vertices. I don't think this is a problem with the Julia wrapper, but something that is wrong in the Metis library.

fredrikekre avatar Jan 19 '23 14:01 fredrikekre