Error 500 related to cuMemGetAddressRange

In my program, I called cuMemGetAddressRange() but get 500 error (CUDA_ERROR_NOT_FOUND).
This error happens sometimes but is not reproducible for each test.
I used latest cuda 6.0 and Driver Version is 331.75 (through nvidia-smi command)
What might be the reason for this error?

BTW, cuInit is called and device memory has been allocated.

Thanks a lot.

Referring to the documentation:

CUDA_ERROR_NOT_FOUND = 500 This indicates that a named symbol was not found. Examples of symbols are global/constant variable names, texture names, and surface names.

Although that is not actually listed as one of the possible return error codes:



It may be coming from a previous operation, however:

Note that this function may also return error codes from previous, asynchronous launches.

You might want to build some harness around this call, and capture the specific pointer or data passed to it when the error occurs. You may also want to add an extra error check prior to the function call to see if the error is present from a previous CUDA operation.

Thanks for the suggestion, I will try that.