gwdidonato / hpgda-spring22

8 stars 10 forks source link

[CUDA][BUG] Precision not correctly updated when debug=false #6

Closed feDann closed 2 years ago

feDann commented 2 years ago

HI, i noticed that when i run the executable without the -d flag even if the -c flag is present the cpu_validation function is never called so the gpu_result column of the csv is always to zero. This happens only for the ppr implementation because the actual value of the precision is updated inside the cpu_validation function https://github.com/gwdidonato/hpgda-spring22/blob/2416e55ce0c6406bf3bab7a8a8f383628fc6bc42/cuda_CONTEST/src/benchmarks/personalized_pagerank.cu#L167

A possible solution could be to move line 84 outside the if statement and also modify the cpu_validation function to print line 136 only if debug=true: https://github.com/gwdidonato/hpgda-spring22/blob/2416e55ce0c6406bf3bab7a8a8f383628fc6bc42/cuda_CONTEST/src/benchmark.cu#L81-L88

https://github.com/gwdidonato/hpgda-spring22/blob/2416e55ce0c6406bf3bab7a8a8f383628fc6bc42/cuda_CONTEST/src/benchmarks/personalized_pagerank.cu#L136

gwdidonato commented 2 years ago

Fixed here: (https://github.com/gwdidonato/hpgda-spring22/commit/6eeed08110cb6b07d559ad3a2c7a99e7715bd11c)