Metis yields 3 partitions when nparts = 8

I have a small test graph, 16 nodes, 32 edges. I ask for 8 partitions, but Metis yields only 3. What's happening? When will I get fewer than the requested partitions? (Input file and gpmetis output after the break)

Here is the input file:


% Metis graph file:
16 32
% edges for each vertex (starting with vertex 1)
3 4 8 12 16
3 4
1 2 4 5 10 14 16
1 2 3 8 16
3 6 7 9 13
5 10 11 13
5 15
1 4 10 12 15
5 10 12
3 6 8 9
6 12 13
1 8 9 11 13 15
5 6 11 12
3 15
7 8 12 14
1 3 4
% last vertex: 16 (should equal )
% last adjacency: 64 (should be 2 * )

Here is the gpmetis command and output (it's really v5.0.1; METIS_VER_ SUBMINOR was unchanged in the bug fix):


$ gpmetis -ptype=kway -minconn test/exp.metis 8
******************************************************************************
METIS 5.0 Copyright 1998-11, Regents of the University of Minnesota
(HEAD: , Built on: Sep 30 2011, 12:39:22)
size of idx_t: 32bits, real_t: 32bits, idx_t *: 64bits

Graph Information -----------------------------------------------------------
Name: test/exp.metis, #Vertices: 16, #Edges: 32, #Parts: 8

Options ---------------------------------------------------------------------
ptype=kway, objtype=cut, ctype=shem, rtype=greedy, iptype=metisrb
dbglvl=0, ufactor=1.030, minconn=YES, contig=NO, nooutput=NO
seed=-1, niter=10, ncuts=1

Direct k-way Partitioning ---------------------------------------------------
- Edgecut: 12, communication volume: 17.

- Balance:
constraint #0: 3.000 out of 0.500

- Most overweight partition:
pid: 7, actual: 6, desired: 2, ratio: 3.00.

- Subdomain connectivity: max: 2, min: 0, avg: 0.75

- There are 0 non-contiguous partitions.
Total components after removing the cut edges: 3,
max components: 1 for pid: 2.

Timing Information ----------------------------------------------------------
I/O: 0.000 sec
Partitioning: 0.002 sec (METIS time)
Reporting: 0.000 sec

Memory Information ----------------------------------------------------------
Max memory used: 0.063 MB
******************************************************************************

RE: [ 4%] Building C object

[ 4%] Building C object libmetis/CMakeFiles/metis.dir/__/GKlib/mcore.c.o
cd /ascldap/users/secorwe/parmetis-4.0.1/build/Linux-x86_64/libmetis && /usr/netpub/mpi/OpenMPI/1.4/64Bit/intel/bin/mpicc -DLINUX -D_FILE_OFFSET_BITS=64 -Werror -DNDEBUG -DNDEBUG2 -DHAVE_EXECINFO_H -DHAVE_GETLINE -O3 -g -I/ascldap/users/secorwe/parmetis-4.0.1/include -I/usr/netpub/mpi/OpenMPI/1.4/64Bit/intel/include - seo I/ascldap/users/secorwe/parmetis-4.0.1/metis/GKlib -I/ascldap/users/secorwe/parmetis-4.0.1/metis/include -I/ascldap/users/secorwe/parmetis-4.0.1/metis/libmetis/. -o CMakeFiles/metis.dir/__/GKlib/mcore.c.o -c /ascldap/users/secorwe/parmetis-4.0.1/metis/GKlib/mcore.c
/ascldap/users/secorwe/parmetis-4.0.1/metis/GKlib/mcore.c(210): error #186: pointless comparison of unsigned integer with zero
if (mcore->corecpos < 0)
^

compilation aborted for /ascldap/users/secorwe/parmetis-4.0.1/metis/GKlib/mcore.c (code 2)
make[3]: *** [libmetis/CMakeFiles/metis.dir/__/GKlib/mcore.c.o] Error 2
make[3]: Leaving directory `/home/secorwe/parmetis-4.0.1/build/Linux-x86_64'
make[2]: *** [libmetis/CMakeFiles/metis.dir/all] Error 2
make[2]: Leaving directory `/home/secorwe/parmetis-4.0.1/build/Linux-x86_64'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/secorwe/parmetis-4.0.1/build/Linux-x86_64'
make: *** [install] Error 2

Thanks in advance for any suggestions you might have.

RE: That is indeed an error in

That is indeed an error in gklib. Just comment the test on line 210 of mcore.c for now. Will be fixed in the future.

RE: For such a small graph

For such a small graph relatively to the number of partitions, try the -ptype=rb version of the partitioning as the kway cannot handle such cases.

RE: When to use rb vs. kway?

I'm doing a study of likely partitions for a representative graph model as a function of graph size, up to 10^9 nodes. The graph posted above is just a (very) small example. I'd like to be able to minimize the resulting subdomain connectivity graph, or minimize the communication volume, so I think I need kway, right? I also want to look at the limit of very few nodes per partition, so that should be recursive bisection?

When should I switch between them?

Thanks,
Peter

RE: The kway partitioning is what

The kway partitioning is what you need. However, due to the load imbalance tolerance on that code, if you push it to find very small partitions, it may return some partitions that are empty. You may want to experiment with the load imbalance tolerance.