Closed dkoutsou closed 4 years ago
Thank you for your interest.
What --niter tells is how many times you want to compute PageRank to convergence _after warm-up. The default convergence criteria is whichever is first reached: 1) 1e-8 (see https://github.com/gunrock/graphblast/blob/1a052558a71f2cd67f5d6fe9db3b274c303ef8f6/example/gpr.cu#L68). 2) PageRank iteration count reaches max_niter (see https://github.com/gunrock/graphblast/blob/1a052558a71f2cd67f5d6fe9db3b274c303ef8f6/graphblas/algorithm/pr.hpp#L50).
If you set --timing 1
(error with the run_pr.sh script that only echoes --timing 1
but actually executes --timing 0
), you should see a print out that looks as follows. Since my GPU is 1 generation older than yours, it took me 217.967ms to process 10 PageRank iterations. Then the per PageRank iteration would be 217.967ms / 10 iterations = ~21.8ms / iteration, which is close to the number in the paper.
$ bin/gpr --timing 1 --mxvmode 0 --niter 1 --max_niter 10 /mario-2TB/ctcyang/qe-dataset/soc-LiveJournal1/soc-LiveJournal1.mtx
Undirected due to mtx: 1
Undirected due to cmd: 0
Undirected: 1
Remove self-loop: 1
%%MatrixMarket matrix coordinate pattern symmetric
4847571 4847571 85702474
Allocate 4847572
Allocate 102842968
Allocate 102842968
Error: Unable to open file for writing!
Do not allocate 4847571 0x7fd188043010
Do not allocate 85702474 0x7fd08981e010
Do not allocate 85702474 0x7fd070fcd010
Do not allocate 4847571 0x7fd188043010
Do not allocate 85702474 0x7fd08981e010
Do not allocate 85702474 0x7fd070fcd010
output:
[0]:1.12354e-06 [1]:4.34784e-06 [2]:2.16458e-06 [3]:1.48264e-06 [4]:1.68473e-06 [5]:1.11411e-06 [6]:2.48564e-06 [7]:9.69221e-07 [8]:5.61167e-07 [9]:1.47378e-06 [10]:8.87791e-07 [11]:1.77316e-06 [12]:1.18192e-06 [13]:7.88482e-06 [14]:1.31274e-06 [15]:3.38896e-07 [16]:1.20574e-06 [17]:1.02075e-06 [18]:2.78271e-07 [19]:1.04159e-05 [20]:7.94688e-07 [21]:1.20331e-06 [22]:4.49042e-07 [23]:5.67421e-07 [24]:5.63578e-07 [25]:1.58316e-07 [26]:9.8955e-07 [27]:4.66949e-07 [28]:9.72953e-07 [29]:3.67839e-07 [30]:2.34166e-07 [31]:1.38741e-06 [32]:1.72217e-06 [33]:4.49905e-07 [34]:8.2128e-07 [35]:1.35088e-07 [36]:7.25688e-07 [37]:2.52794e-07 [38]:5.797e-07 [39]:9.27886e-07
CPU PR finished in 1873.186157 msec. Search depth is: 4. Resultant: 0.000000
1, 0.000985679/4847571, 4847570, pull, 22.6468
2, 0.000483457/4847571, 4847570, pull, 21.8343
3, 0.000184684/4847571, 4847570, pull, 21.8025
4, 0.00013746/4847571, 4847570, pull, 21.8063
5, 8.16702e-05/4847571, 4847570, pull, 21.7956
6, 6.52675e-05/4847571, 4847570, pull, 21.8284
7, 4.3504e-05/4847571, 4847570, pull, 21.8376
8, 3.55718e-05/4847571, 4847570, pull, 21.8678
9, 2.48263e-05/4847571, 4847570, pull, 21.8801
11, 2.05546e-05/4847571, 4847570, pull, 21.8526
CORRECT
1, 0.000985679/4847571, 4847570, pull, 21.8169
2, 0.000483457/4847571, 4847570, pull, 21.8275
3, 0.000184684/4847571, 4847570, pull, 21.8266
4, 0.00013746/4847571, 4847570, pull, 21.77
5, 8.16702e-05/4847571, 4847570, pull, 21.7376
6, 6.52675e-05/4847571, 4847570, pull, 21.7971
7, 4.3504e-05/4847571, 4847570, pull, 21.8248
8, 3.55718e-05/4847571, 4847570, pull, 21.8723
9, 2.48263e-05/4847571, 4847570, pull, 21.8034
11, 2.05546e-05/4847571, 4847570, pull, 21.8062
cpu, 1910.01,
warmup, 300.533, 0
tight, 217.967
vxm, 297.536
CORRECT
Another difference is I changed the header to make the graph be treated as a symmetric graph. In the paper, this is reflected Table 12 by an rs
beside soc-LiveJournal1 (s
for symmetric).
%%MatrixMarket matrix coordinate pattern symmetric
4847571 4847571 85702474
If you are a purist and want to treat the graph as directed, you can by passing in a --directed 1
flag. Running the graph as directed, runtime goes down to 18.8185ms / iteration.
Thank you very much for your answer! Now one iteration on my GPU takes about 5ms. Makes much more sense!
Hey,
I am trying to reproduce your Page Rank number on the socLiveJournal-1. I installed CUDA-9.1 and gcc-5.4.0. I downloaded the data from here. I remove the first comment lines and added the required ones to convert the data to an .mtx file:
I compiled the Page Rank example (using the Makefile with
make gpr
). Here is my output after running it:If I interpret the numbers correctly one GPU iteration does 290ms whereas in the paper you mention that an iteration does 21ms. Also my GPU is a Tesla P100, which I believe is better than the one that you have used in your experiments. What am I doing wrong? I would appreciate any help!
Thank you for your time in advance.