Attaching TO VS2005 gives right answers Why CUDA does not run standalone

Hello All,

My program gives me the right results when I run attached to VS2005. If I run it standalone it terminates and does not give me right results. I seem to have freed all the memory so it does not look like a memory issue.

Any ideas?


Does it give any kind of error?

It might be that your VS2005 environment is configured with paths to CUDA’s .dlls, is able to find them and link to the .exe, while when you’re running standalone, that kind of context is not available and the program fails to locate, for example, cudart.dll. If that were the case, copy the .dlls from the toolkit and the SDK /bin folders to the folder from which you launch the standalone app or add those folders to PATH.

Hi, Priyanka, maybe it’s caused by the different runtime library, please use ProceXP to check which dlls are loaded while your program is running, maybe they are different while started by VS and run standalone.

Good luck!

Let me try this. As of now it gives no errors when running standalone.

I tried process explorer as well and the dll loaded from both are the same. Still there is a problem. No error is reported as I do capture that in cudaGetErrorString(). So I assume this is a memory problem?

Hi, can you please post a snippet of your code?