Internal Memcheck Error: Memcheck failed initialization as profiler is attached

I have always successfully used cuda-memcheck under Windows 7.

Unfortunately, on my laptop I’m now getting the following error message:

========= Internal Memcheck Error: Memcheck failed initialization as profiler is attached. Try unsetting CUDA_PROFILE or disabling the profiler.
=========     Saved host backtrace up to driver entry point at error
=========     Host Frame:C:\windows\system32\nvcuda.dll (cuD3D11CtxCreate + 0x103dbd) [0x11fe1d]
=========     Host Frame:C:\Users\user\Documents\Project\StackOverflow\Debug\cudart32_55.dll (_cudaRegisterDeviceFunction + 0x5eb2) [0xdaf2]
=========     Host Frame:C:\Users\user\Documents\Project\StackOverflow\Debug\cudart32_55.dll (_cudaRegisterDeviceFunction + 0x600d) [0xdc4d]
=========     Host Frame:C:\Users\user\Documents\Project\StackOverflow\Debug\cudart32_55.dll (_cudaRegisterDeviceFunction + 0x6576) [0xe1b6]
=========     Host Frame:C:\Users\user\Documents\Project\StackOverflow\Debug\cudart32_55.dll (_cudaRegisterDeviceFunction + 0x3609) [0xb249]
=========     Host Frame:C:\Users\user\Documents\Project\StackOverflow\Debug\cudart32_55.dll [0x3137]
=========     Host Frame:C:\Users\user\Documents\Project\StackOverflow\Debug\cudart32_55.dll (cudaMalloc + 0xb5) [0x152d5]
=========     Host Frame:C:\Users\user\Documents\Project\StackOverflow\Debug\StackOverflow.exe (main + 0x59) [0x2289]
=========     Host Frame:C:\Users\user\Documents\Project\StackOverflow\Debug\StackOverflow.exe (__tmainCRTStartup + 0x1bf) [0xa3ef]
=========     Host Frame:C:\Users\user\Documents\Project\StackOverflow\Debug\StackOverflow.exe (mainCRTStartup + 0xf) [0xa21f]
=========     Host Frame:C:\windows\syswow64\KERNEL32.dll (BaseThreadInitThunk + 0x12) [0x1336a]
=========     Host Frame:C:\windows\SysWOW64\ntdll.dll (RtlInitializeExceptionChain + 0x63) [0x39f72]
=========     Host Frame:C:\windows\SysWOW64\ntdll.dll (RtlInitializeExceptionChain + 0x36) [0x39f45]
========= ERROR SUMMARY: 1 error

I have checked about the existence of a CUDA_PROFILE environmental variable, but it is not defined neither as a system nor as a user variable. I have anyway set


but with no effect. I’m using CUDA 5.5.

I have tried using cuda-memcheck also on other two systems, a 4-GPU, NVIDIA K20c system and a system having a single Tesla C2050 card. On the former I have the same problem, on the latter cuda-memcheck works fine.

The fact that the error says the profile is attached makes me think that the problem could be due to a Visual Studio attachments to process that I have previously done on the two machines cuda-memcheck is not working on. The machine cuda-memcheck is working on has been freshly installed, instead. However, I have checked that NSIGHT_CUDA_DEBUGGER environmental variable used for such a kind of attachments is set to 0. Also. I couldn’t spot any appearent process that could still be attached to the debugger.

I have checked that, on the Nsight Monitor tray icon, “Use this Monitor for CUDA attach” is set to false. I have also removed the environmental variables CUDA_INJECTION32_PATH and CUDA_INJECTION64_PATH, but with no effect.

Could anyone suggest any hint to solve the problem?

Thank you very much in advance for any help.

I solved the problem. I had to set the environmental variable COMPUTE_PROFILE to 0, not CUDA_PROFILE, as indicated by the error message. So, cuda-memcheck now works correctly having set COMPUTE_PROFILE = 0, regardless to the value of CUDA_PROFILE (it worked with either 0 or 1).