vetter / shoc

The SHOC Benchmark Suite
Other
247 stars 102 forks source link

Data race in OpenCL sort top_scan kernel #30

Closed jeroenk closed 10 years ago

jeroenk commented 10 years ago

I believe the OpenCL version of the top_scan kernel in the sort benchmark has a data race. On line 127 of src/opencl/level1/sort/sort.cl the __local s_seed variable is read by all threads with get_local_id(0) < n and on line 132 the variable is written to by thread get_local_id(0) == n - 1, while there is no barrier in between the statements.