Closed GSanchis closed 6 years ago
Thanks for reporting!
This error apparently happens when the clustering is over and the result is written to host memory. https://github.com/src-d/kmcuda/blob/develop/src/kmcuda.cc#L515 takes devs.back()
as the array index while I really should take devs.size() - 1
instead. Can you please fix this on lines 510 and 513 and test?
Thanks for responding so quickly!
Yup, that did solve the problem! :)
Do you want me to commit the code, or will you do it?
Where do you want me to add cudaSetDevice()
?
I would be happy to accept a PR!
cudaSetDevice()
should not be required here because it is guaranteed that the last device is activated at that time. However, we can go defensive and add it before line 510, no problem.
Fixed
Hi,
I'm trying to get the KMCuda library running in Python, but I am getting the following error:
I'm running this on a machine with 4 GPUs, and I have been experimenting and I'm getting that error whenever I set
device
to something other than {1,3,7,15}, i.e. there seems to be some relation between this error and not using the first GPU. Any hints?Thanks in advance!!