-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix primitive bug discovered in MG edge betweenness centrality testing #3723
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ((major_hypersparse_first) && (*major_hypersparse_first < major))
=>
if ((major_hypersparse_first) && (major >= *major_hypersparse_first))
Otherwise, LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed and tested. Looks good to me.
/merge |
@jnke2016 found a bug in MG edge betweenness centrality. Upon investigation, the
major_offset
in this block of code wasn't being set correctly ifmajor
is in the hypersparse region.