135 |
for (i=0; i<ncon; i++) ubvec[i] = 1.05; |
for (i=0; i<ncon; i++) ubvec[i] = 1.05; |
136 |
options[0] = 3; |
options[0] = 3; |
137 |
options[1] = 15; |
options[1] = 15; |
138 |
|
ParMETIS_V3_PartGeomKway(distribution, |
139 |
/* |
pattern->ptr, |
140 |
{ |
pattern->index, |
141 |
int k=distribution[in->MPIInfo->rank+1]-distribution[in->MPIInfo->rank]; |
NULL, |
142 |
int min_i,max_i; |
NULL, |
143 |
printf("INPUT PARMETIS: %d\n",k); |
&wgtflag, |
144 |
for(i=0;i<in->MPIInfo->size+1;++i) printf("%d ",distribution[i]); |
&numflag, |
145 |
printf("\n"); |
&dim, |
146 |
min_i=pattern->index[0]; |
xyz, |
147 |
max_i=pattern->index[0]; |
&ncon, |
148 |
for(i=0;i<pattern->ptr[k];++i) { |
&mpiSize, |
149 |
min_i=MIN(min_i,pattern->index[i]); |
tpwgts, |
150 |
max_i=MAX(max_i,pattern->index[i]); |
ubvec, |
151 |
} |
options, |
152 |
printf("index range = %d : %d\n",min_i,max_i); |
&edgecut, |
153 |
|
partition, /* new CPU ownership of elements */ |
154 |
for(i=0;i<k+1;++i) printf("%d ",pattern->ptr[i]); |
&(in->MPIInfo->comm)); |
|
printf("\n"); |
|
|
for(i=0;i<pattern->ptr[k];++i) printf("%d ",pattern->index[i]); |
|
|
printf("\n"); |
|
|
} |
|
|
*/ |
|
|
ParMETIS_V3_PartGeomKway(distribution, |
|
|
pattern->ptr, |
|
|
pattern->index, |
|
|
NULL, |
|
|
NULL, |
|
|
&wgtflag, |
|
|
&numflag, |
|
|
&dim, |
|
|
xyz, |
|
|
&ncon, |
|
|
&mpiSize, |
|
|
tpwgts, |
|
|
ubvec, |
|
|
options, |
|
|
&edgecut, |
|
|
partition, /* new CPU ownership of elements */ |
|
|
&(in->MPIInfo->comm)); |
|
155 |
printf("ParMETIS number of edges cut by partitioning per processor: %d\n", edgecut/MAX(in->MPIInfo->size,1)); |
printf("ParMETIS number of edges cut by partitioning per processor: %d\n", edgecut/MAX(in->MPIInfo->size,1)); |
156 |
TMPMEMFREE(ubvec); |
TMPMEMFREE(ubvec); |
157 |
TMPMEMFREE(tpwgts); |
TMPMEMFREE(tpwgts); |