Fix primitive bug discovered in MG edge betweenness centrality testing#3723
Conversation
| edge_partition.major_hypersparse_idx_from_major_nocheck(major); | ||
| assert(major_hypersparse_idx); | ||
| major_idx = edge_partition.major_offset_from_major_nocheck(*major_hypersparse_first) + | ||
| *major_hypersparse_idx; |
There was a problem hiding this comment.
What's the difference between these two?
First, if ((major_hypersparse_first) && (*major_hypersparse_first < major)) should be if ((major_hypersparse_first) && (*major_hypersparse_first <= major))
And if I am not mistaken, if we're using DCSR/DCSC and major is in the hypersparse range, we are setting major_idx to major_hypersparse_idx + major_idx of the beginning of the hypersparse range. Otherwise major_idx is just major_offset.
I am not sure how these two are different.
There was a problem hiding this comment.
Oh, I see, this isn't about major_idx, but this is about major_offset, let me take a closer look.
There was a problem hiding this comment.
if ((major_hypersparse_first) && (*major_hypersparse_first < major))
=>
if ((major_hypersparse_first) && (major >= *major_hypersparse_first))
Otherwise, LGTM.
jnke2016
left a comment
There was a problem hiding this comment.
Reviewed and tested. Looks good to me.
|
/merge |
@jnke2016 found a bug in MG edge betweenness centrality. Upon investigation, the
major_offsetin this block of code wasn't being set correctly ifmajoris in the hypersparse region.