GraphIt-DSL/graphit

Incorrect results on varying threadcount for pagerank algorithm

Closed this issue · 1 comments

Hi,
I generated a test.cpp using the command: python graphitc.py -a ../../test/input/pagerank_with_filename_arg.gt -f ../../test/input_with_schedules/pagerank_pull_parallel.gt -o test.cpp
I was able to compile and run the same using OpenMP flags of varying thread count from 1 to 24. The error value(part of pagerank algorithm) it prints is the same for varying numbers of threads for a given input graph.

Similarly I generated another test.cpp using the command: python graphitc.py -a ../../test/input/pagerank_with_filename_arg.gt -f ../../test/input_with_schedules/pagerank_push_parallel.gt -o test.cpp
The schedule file is push instead of pull here. I was able to compile and run using the OpenMP flags of varying thread count 1 to 24. The error value it prints was the same for the given input graph with number of threads = 1. But with an increase in the thread count the error value is changing for push-based scheduling which should not be the case, right?

Kindly help in resolving the issue. Thank you

Hi, here's a guess, I think the pull schedule doesn't use atomics for synchronizing the updates and is more deterministic. The push based schedule uses atomics for synchronization and thus might be subject to undeterminism when increasing the number of threads. Hope this helps.