CUDA 2.0 seems to fail for long executions multiple process on one card fail


I am developing a hybrid CPU/GPU scheduler and I am having some problems with NVIDIA card running CUDA 2.0 beta.

I have several CUDA applications and I launch different sets of them (around 4 processes each time) many times. In order to execute the whole set of combinations for different applications it takes some hours.

The problem is that after being executing for some time, the card/driver seems to start working strange. It is difficult to post some code which allows to reproduce the error, because it just randomly appears.

As far as I know when some process executes on CUDA and it finishes all the GPU memory is freed (even if cudaFree() is not called). But after executing many processes eventually the next execution fails with different errors (depending on the application failing), but it seems to be lack of GPU memory. In fact if I try to allocate just 1 byte in the card, it says “out of memory”.

Just in order to give some examples of the errors I get I attach a small list:

CUDA error: out of memory
CUBLAS: Library has not been initialized. ==> but call to cublasInit() it is indeed in the code
CUBLAS: Object could not be allocated due to lack of resources.
CUDA error: the launch timed out and was terminated
CUDA error: unspecified launch failure

So as you can see I am using a mix of just-CUDA, CUFFT and CUBLAS applications. The errors start appearing in most of the executions after some hours executing. Then everything starts to fail.

If you have any insight why this is happening I would be very glad!


I don’t see anything attached to your post. If you’d like further assistance, please attach a test app which reproduces this problem, along with an nvidia-bug-report.log.


I am sorry. I did not heard about nvidia bug log before.

So here it is some code which eventually fails. I also attach bug log.

// NxN matrix multiply

void kernel_matmul_gpu(const float* A, const float* B, float* C, int N) {

  float alpha = 1.0;

  float beta = 0.0;

  int lda = N;

  int ldb = N;

  int ldc = N;

  float* d_A;

  float* d_B;

  float* d_C;

 int M = N;

  int K = N;






 /* perform C := alpha*op(A)*op(B) + beta*C */








void chk_cublas(cublasStatus status)


  if (status == CUBLAS_STATUS_SUCCESS)


  switch (status) {


      cerr << "CUBLAS: Library has not been initialized." << endl;



      cerr << "CUBLAS: Object could not be allocated due to lack of resources." << endl;



      cerr << "CUBLAS: Invalid value." << endl;



      cerr << "CUBLAS: An error occurred accessing GPU memory." << endl;



      cerr << "CUBLAS: Function failed to launch on GPU." << endl;



      cerr << "CUBLAS: Object could not be deallocated." << endl;





Just tell me if something else is needed.



The file was not attached in the previous post. I needed to change .log extension, so I added .txt at the end.

nvidia_bug_report.log.txt (113 KB)

This time the machine just rebooted at some time of the execution and looking at the system logs I could find this information. It seems related to the problem and I hope it can help:



Today my machine became unresponsive after executing some CUDA programs in parallel. I was able to obtain this trace:

I hope it can help.

BTW, any clue on the possible error?