This is a Julia wrapper around Gunrock, an open source library for graph computations on the GPU. The original library is here.
There are currently five algorithms that Gunrock.jl supports:
First, clone the Gunrock library and follow the instructions on how to build it here. This should have built a libgunrock.so
file in the path "path_to_gunrock/build/lib/"
Add the location of libgunrock.so
to your LD_LIBRARY_PATH
.
Next, install the package by doing:
Pkg.add("Gunrock")
Gunrock interacts with graphs via sparse matrices.
using Gunrock
a = sprand(100,100,0.1)
a = a + a' #to make it symmetric
bfs(a,1)
bc(a,1)
cc(a)
pagerank(a)
sssp(a)
Let's generate a 2D square 5-point mesh, using Meshpart with 1 million nodes.
using Meshpart
a = Meshpart.grid5(1000,1000)
We shall now perform a comparison with the LightGraphs package for graph algorithms, which is a purely single-threaded CPU implementation.
using LightGraphs
g1 = Graph(a)
g2 = DiGraph(a)
The following chart compares the performance of Gunrock with LightGraphs:
This release currently works only on Linux. Future releases will support Mac OSX and Windows.