Probalems after upgrading from Cuda 4.2 to Cuda 5.0

I have a GPU program running okay under cuda 4.2 on a Quadro 4000, but when I recently upgraded CUDA to 4.2 to 5.0, the results are wrong. I used vs 2010, and I did not change the code (do we need to change?). VS 2010 compiler did not show any warnings or errors. I really don’t know what I missed. Can anyone tell me what I should do after cuda upgradation. Thank you.

Help, please.

Many things can happen, your program may have hidden errors and now they come up, try to debug your program.

You’re going to have to give more information than that for us to be of any assistance. Have you added error checking code to all your CUDA calls? It’s highly probable that something is failing silently.

i.e. put something like this after your CUDA calls (cudaMalloc, cudaMemcpy, kernel invocations, etc)

  cudaError_t cu_error = cudaGetLastError();
  if(cu_error != cudaSuccess)

Thank you. I did use cudaGetLastError(), but it did not tell any error. However, I found some blocks did not run, and it seems that only the first block runs. It is weird. Does anyboday have the same experience?

There were several changes done from 4.x to 5.0. For my code I had problem with the cudamemcpyto symbol function. In 4.x I used “” to put the name of the symbol on gpu, while in 5.0 there were no “” needed. Please try to track where is the code failing, there might be a similar case.

Awesome! pasoleatis! This is really exactly what is my problem. Thank you a lot. Is any place where we can find the difference between Cuda 4 and Cuda 5? This kind of problem is really hard to debug and the new compiler has no warning even when I set the warning level to 4.

Again, thank you, pasoleatis!


One should try the list of what’s new and what options were removed.

Regarding the copy to symbol function:

I had this problem a few months ago and posted it on linkendin: