I have included helper_cuda.h
and I am using the checkCudaErrors
macro on every CUDA call in my code. I have forced an error through the following code:
checkCudaErrors(cudaMalloc(&GPUCameraData, sizeof(float) /*<-- Should be HCameraData */ ));
checkCudaErrors(cudaMemcpy(GPUCameraData, CPUCameraData, sizeof(HCameraData)
, cudaMemcpyHostToDevice));
The application simply exits with error code 1, as it should, but no information is printed. If I break on the first line and step into the second line, I see that _cudaGetErrorEnum()
in helper_cuda.h
does return "cudaErrorInvalidValue"
, but no information is printed in the output.
The development environment I use is Visual Studio 2013 and I have tested this both in Debug and Release mode.
Note: I have the same issue with OpenGL and glGetError. It seems as if any fprintf(stderr, ...);
calls from code that is not directly inside my own file structure will not print anything.