25 idx_t pid, ndom, maxndom, minndom, tndom, *pptr, *pind, *pdom;
26 idx_t ncmps, nover, *cptr, *cind, *cpwgts;
39 printf(
" - Edgecut: %"PRIDX", communication volume: %"PRIDX".\n\n",
46 for (
i=0;
i<nvtxs;
i++) {
52 printf(
" - Balance:\n");
71 if (unbalance < kpwgts[
i]/(
tpwgts[
i]*tvwgt)) {
72 unbalance = kpwgts[
i]/(
tpwgts[
i]*tvwgt);
77 printf(
" - Most overweight partition:\n"
87 pind =
imalloc(nvtxs,
"ComputePartitionInfo: pind");
94 for (tndom=0, pid=0; pid<
nparts; pid++) {
96 for (ii=pptr[pid]; ii<pptr[pid+1]; ii++) {
103 ndom += (pdom[
i] > 0 ? 1 : 0);
105 if (pid == 0 || maxndom < ndom)
107 if (pid == 0 || minndom > ndom)
111 printf(
" - Subdomain connectivity: max: %"PRIDX", min: %"PRIDX", avg: %.2"PRREAL"\n\n",
112 maxndom, minndom, 1.0*tndom/
nparts);
118 cptr =
imalloc(nvtxs+1,
"ComputePartitionInfo: cptr");
119 cind =
imalloc(nvtxs,
"ComputePartitionInfo: cind");
124 printf(
" - Each partition is contiguous.\n");
127 for (nover=0,
i=0;
i<ncmps;
i++) {
128 cpwgts[
where[cind[cptr[
i]]]]++;
129 if (cpwgts[
where[cind[cptr[
i]]]] == 2)
132 printf(
" - There are %"PRIDX" non-contiguous partitions.\n"
133 " Total components after removing the cut edges: %"PRIDX",\n"
134 " max components: %"PRIDX" for pid: %"PRIDX".\n",
138 printf(
" - The original graph had %"PRIDX" connected components and the resulting\n"
139 " partitioning after removing the cut edges has %"PRIDX" components.",