Skip to content

Commit db0e37a

Browse files
authored
Merge pull request #365 from bigwater/master
Fix a bug that graph-convert does not work for graph with less than 500 edges.
2 parents 1afe1ce + 03738c8 commit db0e37a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/graph-convert/graph-convert.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ struct Mtx2Gr : public HasNoVoidSpecialization {
687687
}
688688

689689
for (size_t edge_num = 0; edge_num < nedges; ++edge_num) {
690-
if ((edge_num % (nedges / 500)) == 0) {
690+
if ( (nedges / 500 > 0) && (edge_num % (nedges / 500)) == 0) {
691691
printf("Phase %d: current edge progress %lf%%\n", phase,
692692
((double)edge_num / nedges) * 100);
693693
}

0 commit comments

Comments
 (0)