Skip to content

Commit

Permalink
fix(dist): fix diverged code paths caused by vertex-weighted graphs i…
Browse files Browse the repository at this point in the history
…n combination with some empty PEs (#29)
  • Loading branch information
DanielSeemaier authored Nov 13, 2024
1 parent cf86741 commit e5efcee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions apps/dKaMinPar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ NodeID load_kagen_graph(const ApplicationContext &app, dKaMinPar &partitioner) {
}
}();

KASSERT(graph.vertex_range.second >= graph.vertex_range.first, "invalid vertex range from KaGen");

auto vtxdist = BuildVertexDistribution<std::uint64_t>(graph, MPI_UINT64_T, MPI_COMM_WORLD);

// If data types mismatch, we would need to allocate new memory for the graph; this is to do until
Expand Down
4 changes: 3 additions & 1 deletion kaminpar-dist/dkaminpar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,9 @@ void dKaMinPar::import_graph(
)});

// Fill in ghost node weights
if (vwgt != nullptr) {
bool has_vwgt = vwgt != nullptr;
MPI_Allreduce(MPI_IN_PLACE, &has_vwgt, 1, MPI_C_BOOL, MPI_LOR, _comm);
if (has_vwgt) {
graph::synchronize_ghost_node_weights(*_graph_ptr);
}
}
Expand Down

0 comments on commit e5efcee

Please sign in to comment.