Skip to content
Snippets Groups Projects
Commit dcb99d38 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'mpi-fixes' into 'master'

Fix various issues with MPI and partitioning

These are two bugs and one feature in the current handling of repartitioning
and MPI tasks.

Extracted from current developments so they do not get lost.

See merge request !436
parents 929df6d8 d7a5efc0
Branches
Tags
1 merge request!436Fix various issues with MPI and partitioning
......@@ -383,9 +383,8 @@ static void pick_metis(struct space *s, int nregions, int *vertexw, int *edgew,
/* dumpMETISGraph("metis_graph", idx_ncells, one, xadj, adjncy,
* weights_v, NULL, weights_e);
*/
if (METIS_PartGraphKway(&idx_ncells, &one, xadj, adjncy, weights_v, weights_e,
NULL, &idx_nregions, NULL, NULL, options, &objval,
if (METIS_PartGraphKway(&idx_ncells, &one, xadj, adjncy, weights_v, NULL,
weights_e, &idx_nregions, NULL, NULL, options, &objval,
regionid) != METIS_OK)
error("Call to METIS_PartGraphKway failed.");
......@@ -520,11 +519,7 @@ static void repart_edge_metis(int partweights, int bothweights, int nodeID,
struct task *t = &tasks[j];
/* Skip un-interesting tasks. */
if (t->type != task_type_self && t->type != task_type_pair &&
t->type != task_type_sub_self && t->type != task_type_sub_self &&
t->type != task_type_ghost && t->type != task_type_kick1 &&
t->type != task_type_kick2 && t->type != task_type_timestep &&
t->type != task_type_drift_part && t->type != task_type_drift_gpart)
if (t->cost == 0)
continue;
/* Get the task weight. */
......
......@@ -1038,6 +1038,12 @@ void scheduler_reweight(struct scheduler *s, int verbose) {
case task_type_timestep:
cost = wscale * t->ci->count;
break;
case task_type_send:
cost = 10 * wscale * t->ci->count * t->ci->count;
break;
case task_type_recv:
cost = 5 * wscale * t->ci->count * t->ci->count;
break;
default:
cost = 0;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment