78 ok = MPI_Bcast(sizes, 2, MPI_INT, 0, comm);
92 ok = MPI_Bcast(sizes, 2, MPI_INT, 0, comm);
121 #ifdef DEBUG_LAY_METIS
122 #define debug(...) { if( hit_Rank == 0 ) { printf(__VA_ARGS__); fflush(stdout); }}
123 #define debugall(...) { printf(__VA_ARGS__);}
150 int numParts =
hit_min(numVertices,numProcessors);
157 if(numProcessors <= numVertices){
163 if(linearRank < numVertices){
177 for(i=0;i<numParts;i++){
192 int options[5] = {0,0,0,0,0};
198 if(numProcessors > 1){
203 &wgtflag, &numflag, &numParts, options, &edgecut, part);
207 bzero(part, (
size_t) numVertices *
sizeof(
int));
211 #ifdef DEBUG_LAY_METIS
224 if(part[i] == group){
240 for(link=first; link<last; link++){
244 if((part[vertex] == group && part[neighbor] == group) ){
251 #ifdef DEBUG_LAY_METIS
253 debugall(
"p(%d): ",group);
254 debugall(
" n=%d, m=%d \n",n,m);}
264 if( part[i] == group ){
272 #ifdef DEBUG_LAY_METIS
274 debugall(
"globalName(%d): ",group);
306 for(link=first; link<last; link++){
321 #ifdef DEBUG_LAY_METIS
323 debugall(
"xadj(%d): ",group);
331 debugall(
"adjncy(%d): ",group);
#define hit_cShapeAdjncy(shape)
HitLayout HIT_LAYOUT_NULL
#define hit_layShape(lay)
#define hit_cShapeNedges(shape)
HitPTopology * hit_ptopSplit(HitPTopology *in, int group)
int hit_topRankInternal(HitTopology topo, HitRanks ranks)
#define hit_topRanks(topo)
void hit_cShapeCreateInvNames(HitShape *shape)
HitShape hit_csrShape(int nvertices, int nedges)
void hit_layout_list_addGroup(HitLayout *lay, int leader, int np)
HitPTopology * hit_ptopDup(HitPTopology *in)
HitPTopology * pTopology[HIT_MAXDIMS+1]
#define hit_cShapeXadj(shape)
#define hit_mpiTestError(ok, cad)
#define hit_cShapeNvertices(shape)
#define hit_cShapeVertexToLocal(s, vertex)
Hitmap functions to allocate memory.
#define hit_cShapeNameList(shape, dim)
void hit_sparseShapeBcastInternal(HitShape *shape, HitTopology topo)
void METIS_PartGraphKway(int *nvtxs, idxtype *xadj, idxtype *adjncy, idxtype *vwgt, idxtype *adjwgt, int *wgtflag, int *numflag, int *nparts, int *options, int *edgecut, idxtype *part)
HitLayout hit_layout_plug_layMetis(HitTopology topo, HitShape *shape)
int hit_topCard(HitTopology topo)
HitShape HIT_CSR_SHAPE_NULL
#define hit_topSelfRankInternal(topo)
int numActives[HIT_MAXDIMS]
int hit_lay_procGroup(HitLayout layout, int processor)
void hit_layout_list_initGroups(HitLayout *lay, int numElementsTotal)