Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

PageRank seems to have an error.Please help! #1

Open
CinderaLuo opened this issue Aug 20, 2015 · 7 comments
Open

PageRank seems to have an error.Please help! #1

CinderaLuo opened this issue Aug 20, 2015 · 7 comments

Comments

@CinderaLuo
Copy link

When I run bfs in CUSHA using --output result.txt , from the file of result.txt, I'm sure that the result of bfs is right.But,when I run pagrerank by only changing the code in cusha-UserStructures.h as below ,the output file shows that the rank of every vertices is "inf".Am I missing something ? I saw your code,but did not find the reason why i'm wrong.Please help.


5 //#define CUSHA_BFS 1
6 //#define CUSHA_SSSP 1
7 #define CUSHA_PR 1
8
9 // User's Compile-time constant definitions
10 #define CUSHA_BFS_INF 1073741824
11 #define CUSHA_SSSP_INF 1073741824
12 #define CUSHA_PR_INITIAL_VALUE 1.0f
13 #define CUSHA_PR_DAMPING_FACTOR 0.5f
14 #define CUSHA_PR_TOLERANCE 0.002f

@farkhor
Copy link
Owner

farkhor commented Aug 20, 2015

Can you please be more specific about the structure of the input file? Note that implemented PR requires the number of neighbors of the destination vertex be provided in the input file as the third argument of every edge in the edge-list (after the source vertex index and destination vertex index).

@CinderaLuo
Copy link
Author

Thank you so much ! Your answer helps me solve the problem,and my input file indeed differs from you .The third argument of my input file is fixed as 1024.

@CinderaLuo
Copy link
Author

Do you have the program to change the structure of the input file? Is the structure of the input file the same ,when you test the BFS and Pagerank algorithm in your paper? Please help me to understand your work deeply, I'm looking forward to your reply!

@farkhor
Copy link
Owner

farkhor commented Aug 31, 2015

Please use this program to transform the structure of your input file to the form required for PR.
https://gist.github.com/farkhor/34aaccb593022fc9fe87

@CinderaLuo
Copy link
Author

That is so nice of you.Thank you so much!

@YumornZhang
Copy link

I think this problem is very great,very good,it help me a lot.

@bhaskar2khaneja
Copy link

Hi @farkhor I am benchmarking Pagerank on Cusha but can't get the final output to match that of nvgaph's (I made sure to set identical values for damping factor and tolerance). I was wondering if you could validate my steps here, in case I am doing something wrong (especially the conversion to Pagerank formatted file):

My starting graph.txt file looks like:

# Nodes: 6 Edges: 5
0 1
0 2
2 4
2 5
5 3 

Even though the above file only contains (x, y) pairs, the graph I want to finally be benchmarking on should have both (x, y) and (y, x) pairs.

The first thing I do is run pp_input_provider.cpp on graph.txt: ./pp_input_provider --input graph.txt --output pr_graph.txt and that gives me:

# Nodes: 6 Edges: 5
0	1	0
0	2	0
2	4	1
2	5	1
5	3	1

The third column is where I think I am faulting but I am not sure what the correct arguments should be. Anyway, after that, I run Pagerank: ./cusha --input pr_graph.txt --method CW --device 1 --undirected --output out.txt. Do you know if I am missing anything? Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants