Skip to content

Commit dd9c7cf

Browse files
committed
make it work for Scotch
1 parent d07f3c1 commit dd9c7cf

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

test/partitioner/external_tools/graph_partitioner.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,11 @@ void GraphPartitioner::partitionUsingScotch(Partition &partition)
311311
return;
312312
}
313313

314+
if (SCOTCH_graphCheck(&graph_sc) != 0) {
315+
std::cerr << "Error: Scotch Graph Check failed" << std::endl;
316+
return;
317+
}
318+
314319
if (SCOTCH_graphPart(&graph_sc, _nbr_parts, &strat, partition.values.data()) != 0) {
315320
std::cerr << "Error: Scotch Graph Partition" << std::endl;
316321
return;
@@ -342,7 +347,6 @@ void GraphPartitioner::partitionUsingSBG(sbg_partitioner::PartitionMap &partitio
342347
void GraphPartitioner::readGraphFromSBG()
343348
{
344349
_nbr_vtxs = sbg_graph->V().cardinal();
345-
_edges = sbg_graph->E().cardinal();
346350
// asumming all setpiece are unidimensional and have step 1
347351
int max_node = -1;
348352
for (const auto &v : sbg_graph->V()) {
@@ -377,6 +381,8 @@ void GraphPartitioner::readGraphFromSBG()
377381
_xadj.push_back(_xadj.back() + nodes_vector.size());
378382
}
379383

384+
_edges = grp_t(_adjncy.size());
385+
380386
/*// @todo: Add logging, for the moment just comment the code.
381387
for (int i = 0; i < _nbr_vtxs; ++i) {
382388
std::cout << "Node " << i << " Connections: ";

0 commit comments

Comments
 (0)