Error in function :ParMETIS_V3_PartGeom

Hi Everyone,

I get the following error at runtime,
PARMETIS ERROR: The ndims should be <= 3
but as you can see the ndims is set to 3,
I have also specified XYZ,

idx_t *part=NULL;
part=(idx_t*)malloc(cube.size()*sizeof(idx_t));
idx_t ndims=3;
MPI_Comm cworld;
MPI_Comm_dup(MPI_COMM_WORLD, &cworld);
ParMETIS_V3_PartGeom(vtx_dist,&ndims,XYZ,part,&cworld);

I appreciate your help
Thanks,

Dr J