Device properties error

I’m trying to run on my GeForce 820m an error correction simulation.
Every thread deals with big matrices of unsigned int. Just to give you an idea of the amount of data, I declare two matrices of approximately 500*5000 unsigned int per thread. I have no issues during the compilation, but, when I run my program, I run into this error:
I bet that the following is a silly question, but I’m somewhat new at CUDA: what does this error mean?
I hope that this not mean that I’m trying to use too much space, just because a CPU simulation would take too much time.

Thank you in advance

This is not an error code:


It is a device attribute.

500x5000x4 bytes per thread is 10MB per thread. A single SM can support up to 2048 threads, so just for a single SM (not necessarily the whole GPU) you would need ~20GB of storage.

I don’t think that is going to work based on your description.

I’ve written error just because
is returned by cudaMemcpy after calling the “big matrices” function.
When no error occurs, cudaMemcpy returns cudaSuccess, so I thought this value is a failure, so an error.
In conclusion, when I force the system to store too much data, cudaMemcpy warns me with this device attribute.

I really thank you,
bye bye

cudaMemcpy returns an enum type, called cudaError_t

This enum type (cudaError) is defined in driver_types.h (a CUDA header file, in /usr/local/cuda/include, on a linux install)


doesn’t appear anywhere in that type enumeration (all items except for the first one in the enumeration start with cudaError…). So I think you are misinterpreting something. Perhaps you need to verify that your error interpretation code is correct. You should be using something like:

cudaError_t err = cudaMemcpy(...);
if (err != cudaSuccess) printf("cudaMemcpy error: %s\n", cudaGetErrorString(err));

Oh, fantastic!
I was printing the number returned by cudaMemcpy, i.e. 77.
So looking for that number in /usr/include/cuda.h, I’ve found
but I was wrong, cudaGetErrorString returns:
an illegal memory access was encountered

You can use cuda-memcheck to help discover more about that error, using the methodology described here:

Thank you very much!