22 int main(
int argc,
char *argv[])
25 char *curptr, *newptr;
43 printf(
"***The input graph is not contiguous.\n" 44 "***The specified -contig option will be ignored.\n");
52 for (i=0; i<graph->
ncon; i++) {
55 errexit(
"Error parsing entry #%"PRIDX" of ubvec [%s] (possibly missing).\n",
62 if (params->
iptype == -1) {
92 switch (params->
ptype) {
112 printf(
"***It seems that Metis did not free all of its memory! Report this.\n");
118 printf(
"\n***Metis returned with an error.\n");
149 else if (graph->
ncon == 1)
155 printf(
"******************************************************************************\n");
157 printf(
" (HEAD: %s, Built on: %s, %s)\n", SVNINFO, __DATE__, __TIME__);
158 printf(
" size of idx_t: %zubits, real_t: %zubits, idx_t *: %zubits\n",
161 printf(
"Graph Information -----------------------------------------------------------\n");
162 printf(
" Name: %s, #Vertices: %"PRIDX", #Edges: %"PRIDX", #Parts: %"PRIDX"\n",
165 printf(
" Balancing constraints: %"PRIDX
"\n", graph->
ncon);
168 printf(
"Options ---------------------------------------------------------------------\n");
169 printf(
" ptype=%s, objtype=%s, ctype=%s, rtype=%s, iptype=%s\n",
173 printf(
" dbglvl=%"PRIDX
", ufactor=%.3f, no2hop=%s, minconn=%s, contig=%s, nooutput=%s\n",
176 (params->
no2hop ?
"YES" :
"NO"),
177 (params->
minconn ?
"YES" :
"NO"),
178 (params->
contig ?
"YES" :
"NO"),
182 printf(
" seed=%"PRIDX
", niter=%"PRIDX
", ncuts=%"PRIDX
"\n",
187 for (i=0; i<graph->
ncon; i++)
188 printf(
"%s%.2e", (i==0?
"":
" "), (
double)params->
ubvec[i]);
193 switch (params->
ptype) {
195 printf(
"Recursive Partitioning ------------------------------------------------------\n");
198 printf(
"Direct k-way Partitioning ---------------------------------------------------\n");
214 printf(
"\nTiming Information ----------------------------------------------------------\n");
218 printf(
"\nMemory Information ----------------------------------------------------------\n");
220 printf(
"******************************************************************************\n");
void errexit(char *f_str,...)
#define I2RUBFACTOR(ufactor)
idx_t idx_t idx_t idx_t idx_t idx_t idx_t real_t real_t idx_t idx_t idx_t * part
#define gk_startcputimer(tmr)
#define gk_stopcputimer(tmr)
static char rtypenames[][15]
size_t gk_GetMaxMemoryUsed()
NonlinearFactorGraph graph
int METIS_SetDefaultOptions(idx_t *options)
void WritePartition(char *fname, idx_t *part, idx_t n, idx_t nparts)
static const SmartProjectionParams params
params_t * parse_cmdline(int argc, char *argv[])
size_t gk_GetCurMemoryUsed()
void ReadTPwgts(params_t *params, idx_t ncon)
static char objtypenames[][15]
int main(int argc, char *argv[])
static char ptypenames[][15]
void GPPrintInfo(params_t *params, graph_t *graph)
idx_t idx_t idx_t idx_t idx_t idx_t real_t idx_t idx_t * objval
void ComputePartitionInfo(params_t *params, graph_t *graph, idx_t *where)
void gk_malloc_cleanup(int showstats)
void GPReportResults(params_t *params, graph_t *graph, idx_t *part, idx_t objval)
#define gk_getcputimer(tmr)
graph_t * ReadGraph(params_t *params)
static char iptypenames[][15]
void gk_free(void **ptr1,...)
static char ctypenames[][15]
int METIS_PartGraphKway(idx_t *nvtxs, idx_t *ncon, idx_t *xadj, idx_t *adjncy, idx_t *vwgt, idx_t *vsize, idx_t *adjwgt, idx_t *nparts, real_t *tpwgts, real_t *ubvec, idx_t *options, idx_t *objval, idx_t *part)
int METIS_PartGraphRecursive(idx_t *nvtxs, idx_t *ncon, idx_t *xadj, idx_t *adjncy, idx_t *vwgt, idx_t *vsize, idx_t *adjwgt, idx_t *nparts, real_t *tpwgts, real_t *ubvec, idx_t *options, idx_t *objval, idx_t *part)
Recursive partitioning routine.
#define PMETIS_DEFAULT_UFACTOR
#define MCPMETIS_DEFAULT_UFACTOR
#define KMETIS_DEFAULT_UFACTOR