Problem with cudaThreadSynchronize on Xubuntu 10.04

Hi,

My program has a weird behaviour on linux. When the same code runs on windows 7 there aren’t any problems (except for the watchdog), but when it runs on linux, it seems cudaThreadSynchronize() does not working, because the call is returned immediately as if the kernel function was async (bypassing cudaThreadSynchronize())!

what can I do??

External Image

Did you check the status from the kernel launch. It may be, that there was an error and the kernel did not start. You might get something like “Unspecified launch failure” or others. Usually a kernel returning immediately (with cudaThreadSynchronize) indicates a launch failure.

First of all, thank you apaehler for your reply :)

What do you mean for “status from the kernel launch” ?? The code normally start on windows, the same code. On linux it seems to be bypassed, as if the cudaThreadSynchronize() there wasn’t. My code is quite simple, I do something on host, then there is the kernel call (just one), and immediately, among the call and che memcpy (from device to host for the result of the computation) there is the cudaThreaSynchronize():

  • host code ;

  • kernel<<<…>>> ;

  • cudaThreadSynchronize() ;

  • memcpy from device to host;

I also have setted the flags for the type of sync, but nothing… I can’t find a solution :wacko: I need to run this code on linux because on windows it takes more than 2 seconds.