Skip to content

Commit 03738c8

Browse files
committed
fix a bug that graph-convert does not work for graph with less than 500 edges
1 parent 5d1370f commit 03738c8

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
@@ -686,7 +686,7 @@ struct Mtx2Gr : public HasNoVoidSpecialization {
686686
}
687687

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

0 commit comments

Comments
 (0)