Commit e70245c0 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

With tasks costs instead of delta-ticks we don't want to pre-scale

parent 4847aedf
...@@ -370,7 +370,7 @@ static void pick_metis(struct space *s, int nregions, int *vertexw, int *edgew, ...@@ -370,7 +370,7 @@ static void pick_metis(struct space *s, int nregions, int *vertexw, int *edgew,
/* Dump graph in METIS format */ /* Dump graph in METIS format */
/* dumpMETISGraph("metis_graph", idx_ncells, one, xadj, adjncy, /* dumpMETISGraph("metis_graph", idx_ncells, one, xadj, adjncy,
* weights_v, weights_e, NULL); * weights_v, NULL, weights_e);
*/ */
if (METIS_PartGraphKway(&idx_ncells, &one, xadj, adjncy, weights_v, weights_e, if (METIS_PartGraphKway(&idx_ncells, &one, xadj, adjncy, weights_v, weights_e,
...@@ -420,7 +420,7 @@ static void repart_edge_metis(int partweights, int bothweights, int nodeID, ...@@ -420,7 +420,7 @@ static void repart_edge_metis(int partweights, int bothweights, int nodeID,
* assume the same graph structure as used in the part_ calls). */ * assume the same graph structure as used in the part_ calls). */
int nr_cells = s->nr_cells; int nr_cells = s->nr_cells;
struct cell *cells = s->cells_top; struct cell *cells = s->cells_top;
float wscale = 1e-3, vscale = 1e-3, wscale_buff = 0.0; float wscale = 1.f, wscale_buff = 0.0;
int wtot = 0; int wtot = 0;
int wmax = 1e9 / nr_nodes; int wmax = 1e9 / nr_nodes;
int wmin; int wmin;
...@@ -609,7 +609,7 @@ static void repart_edge_metis(int partweights, int bothweights, int nodeID, ...@@ -609,7 +609,7 @@ static void repart_edge_metis(int partweights, int bothweights, int nodeID,
if (weights_e[k] == 0) weights_e[k] = 1; if (weights_e[k] == 0) weights_e[k] = 1;
if (bothweights) if (bothweights)
for (int k = 0; k < nr_cells; k++) for (int k = 0; k < nr_cells; k++)
if ((weights_v[k] *= vscale) == 0) weights_v[k] = 1; if (weights_v[k] == 0) weights_v[k] = 1;
/* And partition, use both weights or not as requested. */ /* And partition, use both weights or not as requested. */
if (bothweights) if (bothweights)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment