/[escript]/trunk/finley/src/Mesh_optimizeDOFDistribution.c
ViewVC logotype

Diff of /trunk/finley/src/Mesh_optimizeDOFDistribution.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1723 by gross, Fri Aug 22 04:24:19 2008 UTC revision 1763 by gross, Mon Sep 8 02:47:55 2008 UTC
# Line 136  void Finley_Mesh_optimizeDOFDistribution Line 136  void Finley_Mesh_optimizeDOFDistribution
136           for (i=0; i<ncon; i++) ubvec[i] = 1.05;           for (i=0; i<ncon; i++) ubvec[i] = 1.05;
137           options[0] = 3;           options[0] = 3;
138           options[1] = 15;           options[1] = 15;
139    
140    {
141    int k=distribution[in->MPIInfo->rank+1]-distribution[in->MPIInfo->rank];
142    int min_i,max_i;
143    printf("INPUT PARMETIS: %d\n",k);
144    for(i=0;i<in->MPIInfo->size+1;++i) printf("%d ",distribution[i]);
145    printf("\n");
146    min_i=pattern->index[0];
147    max_i=pattern->index[0];
148    for(i=0;i<pattern->ptr[k];++i) {
149    min_i=MIN(min_i,pattern->index[i]);
150    max_i=MAX(max_i,pattern->index[i]);
151    }
152    printf("index range = %d : %d\n",min_i,max_i);
153    
154    for(i=0;i<k+1;++i) printf("%d ",pattern->ptr[i]);
155    printf("\n");
156    /*
157    for(i=0;i<pattern->ptr[k];++i) printf("%d ",pattern->index[i]);
158    printf("\n");
159    */
160    }
161    
162           ParMETIS_V3_PartGeomKway(distribution,           ParMETIS_V3_PartGeomKway(distribution,
163                                   pattern->ptr,                                   pattern->ptr,
164                                   pattern->index,                                   pattern->index,
# Line 153  void Finley_Mesh_optimizeDOFDistribution Line 176  void Finley_Mesh_optimizeDOFDistribution
176                                   &edgecut,                                   &edgecut,
177                                   partition,             /* new CPU ownership of elements */                                   partition,             /* new CPU ownership of elements */
178                                   &(in->MPIInfo->comm));                                   &(in->MPIInfo->comm));
179           printf("ParMETIS number of edges cut by partitioning: %d\n", edgecut);           printf("ParMETIS number of edges cut by partitioning per processor: %d\n", edgecut/MAX(in->MPIInfo->size,1));
180                   TMPMEMFREE(ubvec);                   TMPMEMFREE(ubvec);
181                   TMPMEMFREE(tpwgts);                   TMPMEMFREE(tpwgts);
182            } else {            } else {
# Line 235  void Finley_Mesh_optimizeDOFDistribution Line 258  void Finley_Mesh_optimizeDOFDistribution
258                }                }
259             }             }
260             for (i=0;i<mpiSize+1;++i) distribution[i]=new_distribution[i];             for (i=0;i<mpiSize+1;++i) distribution[i]=new_distribution[i];
   
             
261           }           }
262           TMPMEMFREE(index_list);           TMPMEMFREE(index_list);
263       }       }

Legend:
Removed from v.1723  
changed lines
  Added in v.1763

  ViewVC Help
Powered by ViewVC 1.1.26