ParMETIS_V3_PartKway with locally no vertices crash

Hi all,
Here's some background before the question/crash description:
I'm trying to partition a graph distributed among processors, however, the number of vertices is smaller than the number of processors.
What do I do with the arrays passed into ParMETIS_V3_PartKway that would be zero-sized on the processors that contain no vertices (adjncy,vwgt,adjwgt)?
I'm using Fortran, and a zero sized array is not well defined. However, even a(0:0) sized allocation does not work. I get the following traceback from ParMetis:

Error! ***Memory allocation failed for AllocateWSpace: wspace->core. Requested size: -28 bytesforrtl: error (76): Abort trap signal
Image PC Routine Line Source
libpthread.so.0 0000003552C0DE80 Unknown Unknown Unknown
libc.so.6 0000003552430155 Unknown Unknown Unknown
libc.so.6 0000003552431BF0 Unknown Unknown Unknown
lit 00000000007F9108 errexit__ 34 util.c
lit 00000000007F94AA GKmalloc__ 153 util.c
lit 00000000007F9358 idxmalloc__ 100 util.c
lit 00000000007F56FE AllocateWSpace 28 memory.c
lit 00000000007C8FDF ParMETIS_V3_PartK 115 kmetis.c
lit 00000000007C564A parmetis_v3_partk 72 frename.c
lit 0000000000699DF2 sg_m_mp_sg_load_b 511 sg_m.F90
lit 000000000068E6B5 sg_m_mp_sg_init_ 187 sg_m.F90
lit 00000000004C64FD lit_coupler_m_mp_ 182 lit_coupler_m.F90
lit 0000000000405DC4 MAIN__ 31 lit.f90
lit 0000000000405C82 Unknown Unknown Unknown
libc.so.6 000000355241D8B4 Unknown Unknown Unknown
lit 0000000000405BA9 Unknown Unknown Unknown
forrtl: error (76): Abort trap signal

Do I have to add dummy vertices to have at least one vertex per processor? Could I give those dummy vertices zero weights and the edges connecting to them 0 weights?

Thanks in advance for looking into this!

Marcus Herrmann

RE: Parmetis will not work in

Parmetis will not work in such cases. It requires that each processor to have some vertices.

RE: RE: Parmetis will not work in

thanks for the quick reply. I'll try to find a workaround then with dummy vertices, and zero, or maybe very small weights for the vertex and the edges.
Marcus