The implementation of the paper "Parallel Personalized PageRank on Dynamic Graphs"
This repository is the implementation of [1].
To compile the program, enter into ‘gpu’, ‘cpu’, ‘workload’ and ‘encoder’ separately and then execute ‘make’.
For ‘gpu’, you may need to mofity CFLAGS and INCLUDE in makefile, depending on the compute capability of your gpu and the directory of your CUB.
There are some flags that you can add in Makefile for compilation
The input graph data file should be encoded as our binary format.
The program ‘workload’ reads in the SNAP data file, randomize the edges, calculate the 0-based vertex ids and generate a more compressed binary data file
(The SNAP format is a list of edges per line, where one line contains two vertex ids separated by tab or space).
As an example, download the youtube graph file from https://snap.stanford.edu/data/com-Youtube.html.
wget https://snap.stanford.edu/data/bigdata/communities/com-youtube.ungraph.txt.gz
Then, REMEMBER to delete any line of comments starting with ‘#’,
as the input file to encoder should be made up of only edges.
./encoder input_filename reverse
The argument ‘reverse’ means whether to reverse the direction of the edges, which is normally set to 0.
For our example, run:
./encoder $DATA_DIR/com-youtube.ungraph.txt 0
After executing this command, you could see an output file in the ‘encoder’ folder, i.e. com-youtube.ungraph.bin.
We run our experiment on the same set of source vertices.
‘workload’ can generate the source vertex ids with top-10, top-1000, and top-1000000 degrees in the graph.
If you have chosen your own set of source vertices, you can just skip this step.
For convenience, you could directly use the pre-generated source vertices in the ‘scripts/exp_vids’ folder.
./workload filename directed is_window is_choose_outdegree
./workload $DATA_DIR/com-youtube.ungraph.bin 0 0 1
The gpu and cpu implmentation has similar arguments, which we would explain as follows.
EXAMPLE: ./pagerank -d ../data/com-dblp.ungraph.bin -a 0 -i 0 -y 1 -n 0 -r 0.01 -b 100 -s 1
Users may be interested in the following three categories of arguments when they run the program:
EXAMPLE: ./pagerank -d ../data/com-dblp.ungraph.bin -a 0 -i 0 -y 1 -n 1 -c 100 -l 10000 -s 1
For your reference, we provide useful scripts in ‘cpu’ and ‘gpu’ folder as a hint for how to run the program.