Skip to content

Commit 50941ca

Browse files
committed
netlocscotch: fix wrong rank files in some cases
Scotch can give to a slot several ranks, and no nodes for others. This fix uses a strategy that force to use all the slots. Signed-off-by: Cyril Bordage <[email protected]>
1 parent 142d8cf commit 50941ca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

netloc/scotch.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,9 @@ int netlocscotch_get_mapping_from_graph(SCOTCH_Graph *graph,
244244

245245
SCOTCH_Strat strategy;
246246
SCOTCH_stratInit(&strategy);
247+
/* We force Scotch to use all the processes
248+
* barat is 0.01 as in SCOTCH_STRATDEFAULT */
249+
SCOTCH_stratGraphMapBuild(&strategy, SCOTCH_STRATQUALITY, graph_size, 0.01);
247250

248251
/* The ranks are the indices of the nodes in the complete graph */
249252
int *ranks = (int *)malloc(graph_size*sizeof(int));

0 commit comments

Comments
 (0)