bkloppenborg / liboi

OpenCL Interferometry Library
https://github.com/bkloppenborg/liboi/wiki
GNU Lesser General Public License v3.0
5 stars 6 forks source link

OpenCL Chi/Chi2 and loglike values returning NaNs #15

Closed bkloppenborg closed 12 years ago

bkloppenborg commented 12 years ago

(importing from Redmine)

Sometimes the Chi, Chi2, and Loglike OpenCL values are NaN's whereas the CPU-based version of the tests always reports a valid number. This appears to be an issue with the parallel sum kernel.

bkloppenborg commented 12 years ago

In ac60283a45e67c456164beb973e5fc21e655a264 we switched to the NVidia implementation of a parallel sum in hopes this was a lingering bug in the Apple implementation used before this. It worked fine about 80% of the time on my computer, 0% on Fabien's machine.

In dbc6066fee7b5d3f6ac90be9d8594a9e6bd1e5ef we tried inserting a clFinish into the queue, this appeared to work, but no dice.

In 13ed24cc9536799f694c1cda5eea6a5dcf22fbc9 we zero out the temporary sum buffer before the parallel sum kernel is initially executed.