Errors trying to run the samples "cudaMalloc failed"


This is the second time I am installing CUDA in Ubuntu. First time went fine but this time after a fresh Ubuntu install.
CUDA installed fine. But I am getting errors while making the CUDA samples, After installing some library, the make finshed although with some warning.
Now when I try to run a file, I get the following error:
cutilCheckMsg() CUTIL CUDA error: cudaMalloc failed in file <>, line 49 : invalid argument.

another one:
Initializing data…
…allocating CPU memory.
…generating input data
…allocating GPU memory and copying input data
Running GPU histogram (1 iterations)…
cutilCheckMsg() CUTIL CUDA error: histogram64Kernel() execution failed
in file <histogram64_kernel.cuh>, line 235 : invalid device function .

Any help is greatly appreciated.


Information on what software you install would be useful.

Thanks a lot netlama.

Actually it was a driver problem. I tried installing 180.xx driver but my Ubuntu wouldnt like it for strange reason. And seems I have installed the 2.1 CUDA packages which are not supported by 177.xx driver.

I downgraded to 2.0x and now seems fine. Thank you a lot.

This sounds like an known Ubuntu ‘feature’ where it reinstalls its own nvidia driver package after every reboot. This has been discussed, with solutions, in great detail elsewhere on this forum.