ParMETIS_V3_PartKway causes [ 0] ***ASSERTION failed on line 383 of file kwayrefine.c: myrinfo->inbr != -1

Recently I updated the ParMetis package from 3.0 version to 4.0.1 and faced with the error:

[ 0] ***ASSERTION failed on line 383 of file kwayrefine.c: myrinfo->inbr != -1

I use the ParMETIS_V3_PartKway interface in our code and old version ( ParMETIS_V3_PartVKway ) works well with the same matrix. Our code remains the same as well.
So the graph structure should be ok. All weight are equal 1, I also tried with NULL weights arrays - same error .
Could anybody guess what may cause the problem ?

Thanks in advance.

P.S. I performed the experiments with mpich2-1.4.1p1 under Ubuntu Linux 10.04. Number of parts was 2.

RE: update

I've tested the matrix with serial metis and it works but I got the messages (debug mode was turned on):

***ASSERTION failed on line 185 of file Metis/src/debug.c: nbnd == graph->nbnd
180 182

Metis/src/debug.c:185: libmetis__CheckBnd2: Assertion `nbnd == graph->nbnd' failed

These messages appear only for number of parts 32 and more. As discussed in the thread (http://glaros.dtc.umn.edu/gkhome/node/768) it shouldn't affect on partitioning.
But could it cause the problem described in the first post ?
It looks reasonable because while I increase the number of partitions the probability of appearance of non-connected subgraph increases. So could it cause some kind of problems during refinement procedure in MPI partitioning ?

And one more question: what version of Metis is included into ParMetis package ?

Thanks.

RE: Did you run the graph through

Did you run the graph through Metis' graph checking program to see if it is correct? If it is, then open an issue at flyspray and provide a link from where I can download the graph.

RE: graph checked

I've just done that.
The output:

**********************************************************************
METIS 5.0 Copyright 1998-11, Regents of the University of Minnesota
(HEAD: , Built on: Oct 24 2011, 18:24:25)
size of idx_t: 32bits, real_t: 32bits, idx_t *: 64bits

Graph Information ---------------------------------------------------
Name: A_symm.txt, #Vertices: 17436, #Edges: 216480

Checking Graph... ---------------------------------------------------
The format of the graph is correct!

432960

RE: Open an issue at flyspray.

Open an issue at flyspray.

RE: update

Sorry the previous post was not completed...
Here is the full:

Thank you for response.
I've just run the graph through Metis' graph checking program.
The output of the graphchk program:

**********************************************************************
METIS 5.0 Copyright 1998-11, Regents of the University of Minnesota
(HEAD: , Built on: Oct 24 2011, 18:24:25)
size of idx_t: 32bits, real_t: 64bits, idx_t *: 64bits
Graph Information ---------------------------------------------------
Name: A_symm.txt, #Vertices: 17436, #Edges: 216480
Checking Graph... ---------------------------------------------------
The format of the graph is correct!

But I'm not sure that the bug takes place because the parmetis program didn't fail with the graph.
Here is its output:

mpiexec -n 2 ./parmetis A_symm.txt 1 2 1 1 5 1
reading file: A_symm.txt
finished reading file: A_symm.txt
[ 17436 432960 8718 8718] [50] [ 0.000] [ 0.000]
[ 8970 238968 4438 4532] [50] [ 0.000] [ 0.000]
[ 4664 94140 2325 2339] [50] [ 0.000] [ 0.000]
[ 2462 40956 1219 1243] [50] [ 0.000] [ 0.000]
[ 1320 20302 654 666] [50] [ 0.000] [ 0.001]
[ 704 10206 351 353] [50] [ 0.000] [ 0.002]
[ 377 5098 185 192] [50] [ 0.000] [ 0.004]
[ 205 2546 102 103] [50] [ 0.000] [ 0.007]
[ 112 1196 56 56] [50] [ 0.000] [ 0.014]
[ 66 544 33 33] [50] [ 0.000] [ 0.025]
[ 61 492 29 32] [50] [ 0.000] [ 0.027]
nvtxs: 61, cut: 6701, balance: 1.003
nvtxs: 66, cut: 6228, balance: 1.034
nvtxs: 112, cut: 5893, balance: 1.016
nvtxs: 205, cut: 5597, balance: 1.046
nvtxs: 377, cut: 5171, balance: 1.034
nvtxs: 704, cut: 5062, balance: 1.034
nvtxs: 1320, cut: 4933, balance: 1.034
nvtxs: 2462, cut: 4728, balance: 1.040
nvtxs: 4664, cut: 4555, balance: 1.041
nvtxs: 8970, cut: 4377, balance: 1.040
nvtxs: 17436, cut: 3726, balance: 1.040
Setup: Max: 0.029, Sum: 0.058, Balance: 1.000
Matching: Max: 0.006, Sum: 0.012, Balance: 1.000
Contraction: Max: 0.007, Sum: 0.012, Balance: 1.090
InitPart: Max: 0.001, Sum: 0.001, Balance: 1.002
Project: Max: 0.000, Sum: 0.001, Balance: 1.263
Initialize: Max: 0.001, Sum: 0.003, Balance: 1.055
K-way: Max: 0.003, Sum: 0.005, Balance: 1.002
Remap: Max: 0.000, Sum: 0.000, Balance: 1.014
Total: Max: 0.060, Sum: 0.119, Balance: 1.000

Now I'm confused by the number of edges used in the graph file.
According to Fig. 2a on the page 11 of the Metis manual, the file must contain all edges e.g. both (u,v) and (v,u).
At the same time the number of edges in the first line of the file has to be two times less ( e.g. only indirect edges are counted ).
I tried put the total number of edges and it gave me a error.
The ParMETIS_V3_PartKway routine does not have the number of edges as a input parameter. That means the local number of edges has to be taken from the local xadj array at position nvtxs[ rank + 1 ] (correct me if I'm wrong ), where rank is the number of the MPI process.
But the xadj[ nvtxs[ rank + 1 ] ] contains the total number of the local graph edges ( e.g. both (u,v) and (v,u) ) (Fig.5c on the page 12 of the ParMetis manual).
Could this make sense ?

Soon I will be able to give you a link to download the graph. Do you have any preferences about graph file format ?
I'm on my way to install flyspray...

Thanks.

RE: Please provide the graph in

Please provide the graph in the format that Metis uses.