!!!! device access error (write)

when I run this code below, which call cudafree and meet error:



!!! device access error (write)

I install cuda 6.5 with latest driver, my card is GTX 760 with 4GB mem.

is this a hardware issue?

There’s no way to know from what you have shown here. checkCudaErrors is not a standard part of the CUDA runtime API. It is a function call or a macro that is provided by your code. Furthermore, if it is simply reporting (printing) a CUDA runtime API error that is returned by cudaFree, it would be useful to know what the numerical code actually was, since it’s not obvious from the text.

Perhaps if you provide a complete code, that someone else could compile and run, you might get a more useful reply. It’s likely you will need to trap and display the actual numerical error being returned by cudaFree, in order to get any useful suggestions.

code from here: https://github.com/s271/win_convnet

the error happen below, “memory free error”. I try both cudaFree() and cublasFree(), they are the same.

The problem is, it is python code call CUDA DLL: Python.exe process load CUDA DLL modules. I try to use Nsight attach to process to debug, but it cannot, as main process is Python.exe but not that DLL.

What should I do to debug into CUDA DLL, which is called by python.exe?

NVMatrix::~NVMatrix() {
if(_ownsData && _numElements > 0) {
cublasStatus status = cublasFree(_devData);
if (status != CUBLAS_STATUS_SUCCESS) {
fprintf(stderr, “!!! memory free error\n”);

for starters, print out the actual numerical value of the status variable

I get status is 14

Your application appears to be using the CUBLAS legacy API, for which cublasFree is a thin wrapper around cudaFree. (the non-legacy API has no cublasFree function).
Error 14 can be found in the CUDA documentation:


as well as in driver_types.h in the CUDA header files. It is:

cudaErrorMapBufferObjectFailed = 14 This indicates that the buffer object could not be mapped.

This is not one of the 3 possible return codes from cudaFree:


Therefore I would assume, as described in the cudaFree documentation, that is an error code “left over” from some previous asynchronous activity. You should probably work backward in your code, making sure you have adequately done proper CUDA and CUBLAS error checking at each point. You might also want to run your code with cuda-memcheck, which may yield some clues.