Unable to debug simple CUDA program: CUDBG_ERROR_INITIALIZATION_FAILURE

I have a really simple program that just tries to allocate a buffer. The program is a much simpler version of a more complicated one that has a CUDA kernel that fails to run at all (with no error message).

I am trying to use cuda-gdb and see this error (when running under cuda-gdb) both in this example and in my complex CUDA code (not presented here):

fatal: The CUDA driver initialization failed. (error code = CUDBG_ERROR_INITIALIZATION_FAILURE(0x14)

I attach the files of my program. Just run “make” to build it, then “/usr/local/cuda-10.2/bin/cuda-gdb detect” to debug it and see the error.

detect.cu (187 Bytes)
detect.h (819 Bytes)
main.cpp (112 Bytes)
makefile (572 Bytes)

Does anyone know why this is failing? Thanks.

Hi ,

Are you able to run you code without cuda-gdb? Do you still get initialisation error ?
Another topic with similar issue for your reference :

The solution was to run:

sudo chmod a+rw /dev/nvhost-dbg-gpu

first and then it worked. Thanks. I did not find that link in my searches.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.