Skip to content
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

Modify MNMG louvain to support an empty vertex partition #1744

Conversation

ChuckHastings
Copy link
Collaborator

@ChuckHastings ChuckHastings commented Jul 28, 2021

Discovered in MNMG testing.

Closes #1713

@ChuckHastings ChuckHastings requested a review from a team as a code owner July 28, 2021 22:04
@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2021

Codecov Report

❗ No coverage uploaded for pull request base (branch-21.10@10d25c4). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head a79d7ec differs from pull request most recent head 4f7b592. Consider uploading reports for the commit 4f7b592 to get more accurate results
Impacted file tree graph

@@               Coverage Diff               @@
##             branch-21.10    #1744   +/-   ##
===============================================
  Coverage                ?   59.75%           
===============================================
  Files                   ?       77           
  Lines                   ?     3523           
  Branches                ?        0           
===============================================
  Hits                    ?     2105           
  Misses                  ?     1418           
  Partials                ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 10d25c4...4f7b592. Read the comment docs.

@BradReesWork BradReesWork added this to the 21.10 milestone Jul 29, 2021
@BradReesWork BradReesWork added 3 - Ready for Review improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jul 29, 2021
vertex_t* clustering)
{
if (graph_view.get_number_of_local_vertices() > 0)
CUGRAPH_EXPECTS(clustering != nullptr, "Invalid input argument: clustering is null");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really an invalid use? I assume it is valid (even though hugely inefficient) to ask cuGraph to compute Louvain for a tiny graph using many GPUs (e.g. # GPUs > # vertices).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the number of local vertices is 0 then the clustering pointer is never referenced, nothing is required to be written.

The issue that triggered this is that if the graph is poorly distributed (karate over 8 GPUs apparently ends up with at least 1 cluster which has no vertices assigned to it) then the python code creates a cudf column with 0 entries. This results in one of the calls using clustering == nullptr, which was failing. This check will allow clustering to be nullptr if there are no vertices assigned to this GPU. If there are vertices assigned to this GPU it will fail if clustering is nullptr

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah... I see. I misunderstood the code and thanks for the explanation.

@BradReesWork
Copy link
Member

@gpucibot merge

@rapids-bot rapids-bot bot merged commit e1787ce into rapidsai:branch-21.10 Aug 3, 2021
@ChuckHastings ChuckHastings deleted the bug_mnmg_louvain_empty_partition branch February 1, 2022 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Test_mg_louvain returns a RuntimeError
5 participants