Cuda Toolkit 5.5 on Windows 7/64bits + Optimus

Enviroment : Notebook Dell Precision 6600, Nvidia Quadro 4000M, Windows 7 64bits.
All works fine with Cuda sdk 4.2.
I’ve installed Cuda 5.5 sdk and then I’ve upgraded driver to 331.82.
Now for all samples that show some result on display (ex. MarchingCube) work only application compiled for win32.
Other samples (ex. BandWidhtTest) work fine compiled for win32 and for x64.
If I disable optimus in Bios Setup all applications works in 32 and 64bit mode.
Here the two examples in win64

C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\Bin\win64\Release>bandwidthTest.exe
[CUDA Bandwidth Test] - Starting…
Running on…

Device 0: Quadro 4000M
Quick Mode

Host to Device Bandwidth, 1 Device(s)
PINNED Memory Transfers
Transfer Size (Bytes) Bandwidth(MB/s)
33554432 5775.6

Device to Host Bandwidth, 1 Device(s)
PINNED Memory Transfers
Transfer Size (Bytes) Bandwidth(MB/s)
33554432 5955.0

Device to Device Bandwidth, 1 Device(s)
PINNED Memory Transfers
Transfer Size (Bytes) Bandwidth(MB/s)
33554432 61853.8

Result = PASS

C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\Bin\win64\Release>marchingCubes.exe
[marchingCubes.exe] - Starting…
grid: 32 x 32 x 32 = 32768 voxels
max verts = 102400
Read ‘…/…/…/2_Graphics/marchingCubes/data/Bucky.raw’, 32768 bytes
CUDA error at .\marchingCubes.cpp:464 code=46(cudaErrorDevicesUnavailable) “cuda
Malloc((void **) &d_volume, size)”

Any idea?

A little update.
Debugging MarchingCubes I’ve found that problem is generated from the first call
to cudaMalloc after the call to cudaGLSetGLDevice.
Seems that binding to opengl make cuda device unavailable.
This only happen in 64 bit mode.

Nobody can’t help me?
Put in another way OpenGL + Optimus + Cuda + win64 cause the problem.
How can obtain support from Nvidia eng?


I have the same problem.

Mi toolkit is 6.5.14. Information about device:

/share/apps/cuda/toolkit/6.5.14/samples/bin/x86_64/linux/release/deviceQuery Starting…

CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: “Tesla K20m”
CUDA Driver Version / Runtime Version 6.5 / 6.5
CUDA Capability Major/Minor version number: 3.5
Total amount of global memory: 5120 MBytes (5368512512 bytes)
(13) Multiprocessors, (192) CUDA Cores/MP: 2496 CUDA Cores
GPU Clock rate: 706 MHz (0.71 GHz)
Memory Clock rate: 2600 Mhz
Memory Bus Width: 320-bit
L2 Cache Size: 1310720 bytes
Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers
Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 2048
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and kernel execution: Yes with 2 copy engine(s)
Run time limit on kernels: No
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device PCI Bus ID / PCI location ID: 8 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 6.5, CUDA Runtime Version = 6.5, NumDevs = 1, Device0 = Tesla K20m
Result = PASS

The application runs in a server. I run the program from a client, with OpenGL 4.4 from ATI and a AMD Radeon HD 5800 card.

The graphic applications of the toolkit don’t work in this system.

Can anybody help me?

The graphics applications of the toolkit generally require an OpenGL rendering context in the same system as the CUDA context. This won’t happen correctly if the GPU on which your OpenGL context is based is in a different system. Those samples are not designed to run this way.