ParMETIS_V3_PartKway Segmentation Fault Even When Correctly Invoked
I am trying to use ParMETIS to partition my graph. In particular, I have written a small program (linked below) which calls ParMETIS_V3_PartKway
with appropriate parameters. Even though all the parameters supplied to the function are correct, the API crashes with a segmentation fault.
Note that I am using the same graph as the example graph on page 12 (Section 4.2.1) in the manual. The xadj
, adjncy
, vtxdist
printed out by my program are exactly same as in the manual.
Program is available here: http://www.cs.ucr.edu/~kvora001/contents/parmetis/partitioner.cpp
Input graph is available here: http://www.cs.ucr.edu/~kvora001/contents/parmetis/sample.ip
The command used to run is: mpirun -np 3 ./partitioner sample.ip 15 3
Output using mvapich2
is available here: http://www.cs.ucr.edu/~kvora001/contents/parmetis/out.mvapich2.out
Output using openmpi
is available here: http://www.cs.ucr.edu/~kvora001/contents/parmetis/out.openmpi.out
Note that the ParMETIS library was successfully compiled with mvapich2-1.9 when the above program was run with mvapich2; similarly, the ParMETIS library was successfully compiled with openmpi-1.6 when the above program was run with openmpi.
Can someone please let me know how to fix the above issue?
- Login to post comments
RE: I compiled your sample code
I compiled your sample code using ParMetis 4.0.3 and openmpi-1.4.3. It appears to have run successfully for me:
mpirun -np 3 ./partitioner sample.ip 15 3
Reading input graph ...
Reading input graph ...
Reading input graph ...
Creating CSR ...
Printing ...
Creating CSR ...
Printing ...
Creating CSR ...
Printing ...
rank 0: vtxdist: 0 5 10 15 rank 2: vtxdist: 0 5 10 15
-----rank 1: vtxdist: 0 5 10 15
-----rank 1: xadj: 0 3 7 11 15 18
-----rank 0: xadj: 0 2 5 8 11 13
-----rank 2: xadj: 0 2 5 8 11 13
----------rank 0: adjncy: 1 5 0 2 6 1 3 7 2 4 8 3 9
rank 2: adjncy: 5 11 6 10 12 7 11 13 8 12 14 9 13
-----rank 1: adjncy: 0 6 10 1 5 7 11 2 6 8 12 3 7 9 13 4 8 14
-----Partitioning ...
-----Partitioning ...
Partitioning ...
Writing partitioning results ...
Writing partitioning results ...
Writing partitioning results ...
Can you run your code and attach gdb to get a stack trace of the segmentation fault? Also, what version of ParMetis are you linking against?
Thank you,
Dominique
RE: Unfortunately I am getting
Unfortunately I am getting these errors on a managed cluster where debugging is not allowed -- hence, no permissions to play with gdb. Oddly, on my local laptop, things seem to work fine.
I am using the latest stable release ParMETIS 4.0.3.