#include #include #include void dynamico_partition_graph(int mpi_rank, int mpi_size, idx_t vtxdist[], idx_t xadj_loc[], idx_t adjncy_loc[], idx_t nparts, idx_t part[]) { MPI_Comm comm = MPI_COMM_WORLD; /* avoid passing a communicator as argument due to Fortran/C issues */ idx_t edgecut; idx_t options[]={0}, wgtflag=0, numflag=0, ncon=1; real_t tpwgts[2*nparts], ubvec[]={1.05}; /* int ParMETIS V3 PartKway ( idx t *vtxdist, idx t *xadj, idx t *adjncy, idx t *vwgt, idx t *adjwgt, idx t *wgtflag, idx t *numflag, idx t *ncon, idx t *nparts, real t *tpwgts, real t *ubvec, idx t *options, idx t *edgecut, idx t *part, MPI Comm *comm ) */ /* printf("sizeof : %d %d \n", sizeof(int), sizeof(idx_t)); printf("partition_graph : %d %d %d\n", mpi_rank, mpi_size, nparts); printf("vtxdist : \n"); for(int i=0; i