Problems with Release and Debug Mode

Hi there!

I have tried various display drivers (169.21 (from Nvidia), 169.62 and 174.93 (from laptopvideo2go)) but the sample codes in “C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\bin” still fail to run in release or debug mode. However, it runs fine in emuRelease (since it is actually running on the host). Does this imply that the display driver does not work with my graphics card or is it because my low end graphics card (Geforce 8400M G) is not capable of running simple examples like the SobelFilter, Matrix Multiplication and BoxFilter? For your information, I have installed the display driver (with modded inf for notebooks), toolkit and sdk accordingly without any errors and I can even compile the sample source codes without any problems. Appreciate anyone who can assist me. Thanks in advance!

For your information, this is what happens when i run the SobelFilter in release mode (attached image). The program is sort of stuck once it prints out “reading image lena.pgm” and nothing else happens. I tried other samples but nothing else happens either.
sobelfilter.bmp (662 KB)

I have found another problem. It seems that DeviceQuery is able to work and my graphics is detected. Then, i tried to build a simple program which compiles without any errors in Visual Studio 2005. In that program, I manage to obtain the device properties using cuDeviceComputeCapability (similar to what DeviceQuery does). Then when i start to allocate memory for a variable using cudaMalloc() the program freezes. This also happens when CUT_DEVICE_INIT() is used. Please tell me how this issue can be resolved. Thanks.

Something that I observed after running simpleGL in debug mode is that the program automatically exits with the following output

First-chance exception at 0x7c812a5b in simpleGL.exe: Microsoft C++ exception: cudaError_enum at memory location 0x0012fcf0…
First-chance exception at 0x7c812a5b in simpleGL.exe: Microsoft C++ exception: cudaError_enum at memory location 0x0012fcec…
First-chance exception at 0x7c812a5b in simpleGL.exe: Microsoft C++ exception: cudaError at memory location 0x0012fd6c…
The program ‘[2460] simpleGL.exe: Native’ has exited with code 1 (0x1).

how much video memory is on your 8400M G notebook? Can you please print out the results of deviceQuery? This model GPU has 8 processors and is available up to 256MB, but you probably have 128MB is my guess as the problem so that would be tough to run CUDA along with OpenGL interfacing.

This is the result of deviceQuery:

There is 1 device supporting CUDA

Device 0: “GeForce 8400M G”
Major Revision Number: 1
Minor Revision Number: 1
Total Amount of Global Memory: 133890048 bytes
Total Amount of Constant Memory: 65536 bytes
Total Amount of Shared Memory Per Block: 16384 bytes
Total Num. of Registers Avail. Per Block: 8192
Warp Size: 32
Maximum Number of Threads Per Block: 512
Maximum Sizes of Each Dimension of a Block: 512 x 512 x 64
Maximum Sizes of Each Dimension of a Grid: 65535 x 65535 x 1
Maximum Memory Pitch: 262144 bytes
Texture alignment: 256 bytes
Clock Rate: 337500 kilohertz

Assuming that what you say is correct (that running CUDA with OpenGL using 8400M G might be tough), I still cannot figure out why even simple samples like the matrix multiplication sample and the bandwidth test samples do not run in Release or Debug mode. Looking into the provided source codes in Visual Studio 2005, these programs require only minimal memory requirements. I manage to compile these codes in Visual Studio without any errors, but it fails to run unfortunately. Do you have any idea why this is happening? Thanks alot! Your help is appreciated!

Just to clear things a little. When i say that the matrix multiplication and bandwidth samples fail to run, it did not exit as it did with the simpleGL sample. Whenever i execute those samples in Debug or Release mode, the console pops up, and eventually nothing happens. But in EmuRelease mode, it works and something is printed on the console.

You only have 128MB of memory on the device. That’s not enough. Try using CUDA v1.0 some people are able to use this with only 128MB.

Thanks for the advice. Well, at least i can run some examples with CUDA v1.0. I saw the new CUDA 2.0 beta version today and thought of giving it a try and to my surprise, it worked even better than CUDA v1.0 (as in more of the samples work under 2.0) and I couldn’t explain why. Anyway, thanks for your help!

Thanks very much for trying the beta 2.0. I had been asking if anyone tried it with 128MB. That’s good to hear.

Just to let you know. I can run the samples in release mode without compiling the solutions (which is great initially). Then, what i subsequently did was to compile the solutions. Problem comes after compilation. The samples fail to run. Then i ran a test on a simple piece of codes (my own codes) which compiled successfully previously using version 1.0 and 1.1. However, this piece of code will not compile using 2.0 with exactly the same settings. However, now i have reverted back to 1.0 temporarily until this issue is resolved.