Code Monkey home page Code Monkey logo

Comments (7)

maawad avatar maawad commented on June 11, 2024

Hi @Yongze-zzz, We don't update any host-side graph metadata but there is an internal graph iterator that is used to access the graph. If you want to update the graph, please follow the example here. If you want to implement SSSP, please use "SIMPLE" advance mode and see example here and here.

Another example for loading Matrix Market graph

from gunrock.

Yongze-zzz avatar Yongze-zzz commented on June 11, 2024

Hi @Yongze-zzz, We don't update any host-side graph metadata but there is an internal graph iterator that is used to access the graph. If you want to update the graph, please follow the example here. If you want to implement SSSP, please use "SIMPLE" advance mode and see example here and here.

Another example for loading Matrix Market graph

Thanks for your reply! I have reproduced the graph updated phase and simple advance operator according to your example. As the simple advance operator, we construct an edge iterator that scans the entire adjacency list of the vertex like the code below in advance_base.cuh .
1673754281076
But the kernel function GetEdgeCounts runs only one time.I am not sure the graph was updated because of the outpu imformation.
The advance src is 1, matrix graph is gunrock/dataset/small/tree.mtx.Then I inserted only one edge: src 1->dst 3.
image

from gunrock.

maawad avatar maawad commented on June 11, 2024

Is the graph input to the GetEdgeCounts kernel CSR? We don't update the CSR graph if you update the dynamic one. If you want an updated CSR graph, then you need to explicitly ask for that like this:

auto& result_csr_graph = result_graph.csr();
result_csr_graph.Allocate(nodes, new_edges_count, util::HOST | util::DEVICE);
result_dynamic_graph.ToCsr(result_csr_graph);

Then you can run any advance on that CSR graph (not just the SIMPLE one).

But you don't need to convert back to CSR if you want to run SSSP on a dynamic graph. You can 1) follow the example here to load and update the graph, then 2) add the SSSP code with the main difference being changing GraphT to WeightedDynT.

typedef typename app::TestGraph<VertexT, SizeT, ValueT,
graph::HAS_EDGE_VALUES | graph::HAS_CSR>
GraphT;

to

using WeightedDynT =
app::TestGraph<VertexT, SizeT, ValueT,
graph::HAS_EDGE_VALUES | graph::HAS_DYN>;

And finally, specify the advance mode on the command line using the flag --advance-mode=SIMPLE.

This would be a valuable contribution, so please fork and share your code, if possible, and I will be happy to help you resolve any issues.

from gunrock.

Yongze-zzz avatar Yongze-zzz commented on June 11, 2024

1675488023181
Hello author!
I've forked your dynamic-graph branch and modify some code(https://github.com/Yongze-zzz/gunrock/tree/dynamic-graph).You could clone the code and take a look, the codes implemented dynamic graph update,but when I try to run sssp algorithm by calling advance operation on graph.dyn() ,there is a compile error like below.
1675416252418

I modified /examples/test_sssp.cu by call sssp_app.cu and you could run it by command "./bin/sssp --src 0 market ../dataset/small/test_sssp.mtx --advance-mode SIMPLE".I look forward to your reply.Thanks!

from gunrock.

maawad avatar maawad commented on June 11, 2024

Thanks, @Yongze-zzz, for adding the SSSP code! I tried your code, and I saw the compilation error you reported. There was another error about PairT not being defined, but that was easy to fix.
I will look into the FLAG error as soon as possible; it should be easy to fix.

from gunrock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.