errors when running program outside of VS

Hi everyone

My CUDA program works fine when run in inside Visual Studio but I receive multiple errors if I run it outside. I receive errors when binding data to a texture, allocating memory and launching kernels.

I am new to CUDA but with all my knowledge of C++, & hours trawling the internet, have been unable to find the issue.

Any pointers/common pitfalls on this topic would be gratefully received.

I have used CUDA 7.5 & 8.0RC on a Geforce GTX 970.

Sounds like perhaps your compiled executable is not finding the CUDA runtime DLLs? Specific errors would help to diagnose the problem…

Hi, thanks for your reply

The 1st error comes when binding some data to a texture …

code=11(cudaErrorInvalidValue) “cudaCreateTextureObject (&d_volume_texture, &d_volume_resource_description, &d_volume_texture_description, nullptr)”

If I ignore that by removing “checkCudaErrors”, the next error I receive is when allocating memory on the device …

code=2(cudaErrorMemoryAllocation) “cudaMalloc ((void **)&d_voxel_vertices, buffer_size)”

If I ignore them, I receive errors when launching a kernel.

The folder in which the executable sits contains the 2 cuda rt dlls cudart32_75.dll & cudart64_75.dll by virtue of the “Post Build Event”. I am reluctant to agree that it is failing to find the runtime because of this and the fact that I do not receive a “pop up” message complaining of a missing library.

Am I missing something?

Thank you.