Skip to content

Commit

Permalink
fix randomly failing coarsening test for small random graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
euphoricpoptarts committed Aug 19, 2022
1 parent 62b71b4 commit ed8b222
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions unit_test/graph/Test_Graph_coarsen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,12 @@ bool verify_aggregator(crsMat A, crsMat agg) {
if (A.numRows() != static_cast<ordinal_t>(agg.nnz())) {
return false;
}
// aggregator should have fewer columns than A has rows
if (A.numRows() <= agg.numCols()) {
// column count gives number of vertices in coarse graph
// aggregator should not have more columns than A has rows
// it is valid for coarse graph to be same size as input graph
// some graphs (for example a graph with only self-loops) may produce
// coarsenings that don't shrink the graph
if (A.numRows() < agg.numCols()) {
return false;
}
typename c_entries_t::HostMirror entries =
Expand Down

0 comments on commit ed8b222

Please sign in to comment.