Segmentation fault with METIS_PartMeshNode(...)

I have been reading the manual of metis 5.0.x since 5 hours ago and I can't figure out what is happening with my program, I write the following code:

idx_t nelems = 61; /* Each element has 4 nodes (square elements of Finite Element) */
idx_t nnodes = 75;

idx_t eptr[62] = {0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244};

idx_t eind[244] = {13,20,18,14,7,13,14,10,20,29,24,18,2,7,10,5,29,37,34,24,0,2,5,3,37,47,44,34,1,0,3,4,47,57,50,44,8,1,4,6,57,64,53,50,12,8,6,11,64,68,55,53,21,12,11,19,68,70,61,55,30,21,19,27,70,73,62,61,38,30,27,35,73,74,67,62,48,38,35,39,74,72,66,67,58,48,39,45,72,71,63,66,65,58,45,52,71,69,60,63,65,52,60,69,52,45,36,4,0,60,52,40,49,45,39,33,36,39,35,27,33,27,19,23,33,19,11,16,23,4,3,9,6,9,16,1,1,6,3,5,15,9,5,10,17,15,14,22,17,10,18,24,22,14,24,34,31,22,34,44,41,31,44,5,0,53,41,53,55,43,41,55,61,46,43,61,62,51,46,62,67,59,51,67,66,54,59,66,63,56,54,54,56,49,42,60,49,56,63,36,33,23,26,40,36,26,25,49,40,25,42,9,15,25,16,2,5,26,23,16,51,42,32,46,42,25,15,32,43,46,32,28,32,15,17,28,17,22,31,28,28,31,41,43,42,51,59,54};

/* Configure parameters for metis patitioning domain */
idx_t nparts = 3; /* We want 3 partitions */
real_t tpwgts[3] = {0.33,0.33,0.34};
idx_t objval;
idx_t* epart = (idx_t*)calloc(nelems,sizeof(idx_t));
idx_t* npart = (idx_t*)calloc(nnodes,sizeof(idx_t));
idx_t options[METIS_NOPTIONS];
options[METIS_OPTION_PTYPE] = METIS_PTYPE_RB;
options[METIS_OPTION_OBJTYPE] = METIS_OBJTYPE_CUT;
options[METIS_OPTION_CTYPE] = METIS_CTYPE_SHEM;
options[METIS_OPTION_IPTYPE] = METIS_IPTYPE_EDGE;
options[METIS_OPTION_RTYPE] = METIS_RTYPE_FM;
options[METIS_OPTION_NCUTS] = 3;
options[METIS_OPTION_NITER] = 10;
options[METIS_OPTION_SEED] = 12343;
options[METIS_OPTION_UFACTOR] = 1;
options[METIS_OPTION_NUMBERING] = 0;
options[METIS_OPTION_DBGLVL] = METIS_DBG_INFO;

METIS_PartMeshNodal(&nelems, &nnodes, eptr, eind, NULL, NULL, &nparts, tpwgts, options, &objval, epart, npart); /* <----- Segmentation fault */

/* Free memory */
free(epart);
free(npart);

And I always get a "segmentation fault", I can't use gdb to debug my program, because when I try, I get the message: "Permission denied"

Any idea?

I'm using Ubuntu 10.10 with 32bits and have installed metis 5.0.1

RE: When building Metis, do a

When building Metis, do a 'make config gdb=1 debug=1' and then rebuild metis and link it against your program. That should allow you to use gdb. Let me know what you find.

RE: SOLVED

SOLVED! Thank you very much!

RE: Was it an issue with Metis or

Was it an issue with Metis or with your code?

RE: SOLVED

The problem was the installation, I have libmetis.a from metis 3.0 (Ubuntu repositories) and metis.h from metis 5.0.1...
Thank you!