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

MG Tests are Failing due to Neighbor Sampling Bug #2665

Closed
alexbarghi-nv opened this issue Sep 7, 2022 · 0 comments · Fixed by #2751
Closed

MG Tests are Failing due to Neighbor Sampling Bug #2665

alexbarghi-nv opened this issue Sep 7, 2022 · 0 comments · Fixed by #2751
Assignees
Milestone

Comments

@alexbarghi-nv
Copy link
Member

Currently, the fix is not to use -1 in the MG tests, but this is not a permanent fix. The new primitive added in #2623 should resolve this issue once it is implemented @seunghwak . Once that happens, the tests should changed back to using -1.

MRE:

import cugraph

import cudf
import dask_cudf
import cupy

import dask

from dask.distributed import Client
from dask_cuda import LocalCUDACluster
from cugraph.experimental import MGPropertyGraph
import cugraph.dask.comms.comms as Comms

if __name__ == '__main__':
    # begin test
    dask.config.set({'temporary_directory': './dask_tmp'})

    cluster = LocalCUDACluster(
                n_workers=3,
                rmm_managed_memory=False
    )
    
    client = Client(cluster)

    Comms.initialize(p2p=True)

    ddf = dask_cudf.from_cudf(
            cudf.DataFrame({
                'src': cupy.array([
                    0,
                    0,
                    1,
                    2,
                    2,
                    3
                ], dtype='int32'),
                'dst': cupy.array([
                    1,
                    2,
                    4,
                    3,
                    4,
                    1
                ], dtype='int32')
            }),
            npartitions=3
    )

    G = cugraph.Graph(directed=True)
    G.from_dask_cudf_edgelist(ddf, source='src', destination='dst', legacy_renum_only=True)

    sampling_results = cugraph.dask.uniform_neighbor_sample(
        G,
        cudf.Series([0, 1, 2, 3, 4], dtype='int32'),
        [-1],
        with_replacement=True
    )

    print(sampling_results.compute())
    Comms.destroy()

Expected:

   sources  destinations  indices
0        0             1      1.0
1        1             4      1.0
2        2             4      1.0
3        3             1      1.0
0        0             2      1.0
1        2             3      1.0

Actual:

   sources  destinations        indices
0        0             0   0.000000e+00
1        0             1   0.000000e+00
2        0             1   1.000000e+00
3        0             3   0.000000e+00
4        1             4   1.000000e+00
0        0             0 -2.121996e-314
1        0             4  3.969731e-314
2        0             2   1.000000e+00
@alexbarghi-nv alexbarghi-nv added ? - Needs Triage Need team to review and classify Fix labels Sep 7, 2022
@alexbarghi-nv alexbarghi-nv added this to the 22.10 milestone Sep 7, 2022
@alexbarghi-nv alexbarghi-nv removed the ? - Needs Triage Need team to review and classify label Sep 7, 2022
@alexbarghi-nv alexbarghi-nv self-assigned this Sep 7, 2022
rapids-bot bot pushed a commit that referenced this issue Sep 9, 2022
…#2666)

This PR will correct an error that shows up occasionally in the MG tests, especially when running on an odd number of GPUs.  This error is related to issue #2665 and resolves it temporarily while the C++ team works on a permanent fix.

Authors:
  - Alex Barghi (https://github.com/alexbarghi-nv)

Approvers:
  - Rick Ratzel (https://github.com/rlratzel)

URL: #2666
@rapids-bot rapids-bot bot closed this as completed in #2751 Oct 3, 2022
@rapids-bot rapids-bot bot closed this as completed in 83f27a1 Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant