I found that some float3 operations (sometimes) generate error messages under cuda-memcheck (e.g., +=, -=, (maybe) some float3 functions like dot()). I do not believe the generated code is in error, and these are spurious error messages from cuda-memcheck. Explicitly re-writing the operation removes the error (indicating an invalid write access to 4-byte word).
float div_v; float3 dr,dv;
div_v += dot(dr,dv); // cuda-memcheck error
div_v += (dr.xdv.x + dr.ydv.y + dr.z*dv.z); // OK under cuda-memcheck
This does NOT happen on all such statements, but it is repeatable when it does happen; so its likely related to what is around the offending statement.
Hi jshaw. Could you post more information about your setup ? Specifically :
- The CUDA toolkit version
- The CUDA driver version
- GPU type
Also, can you post a complete application that reproduces this problem ?
OS: OpenSuSE 12.1
GPU: GTX 480
Unfortunately, I can’t really post the application in a form you can use. Its large (1000’s of lines in total, with ~1600 lines of actual GPU code). I will test test again to see if it still occurs. I was using the beta version of 5.0 when this happened, so I should check the production version.
Thanks for the information. Could you also try updating your CUDA driver to the 304.64 driver ?