cuda-gdb and program allegedly running on the wrong card

While running my program on cuda-gdb I’m getting the following error

warning: One or more CUDA devices are made unavailable to the application

     because they are used for X11 and cannot be used while debugging.

     This may change the application behavior!

Despite me setting my Tesla as the device my program should run on within the code

cudaSetDeviceFlags( cudaDeviceMapHost| cudaDeviceBlockingSync |cudaDeviceScheduleSpin);

	cudaSetDevice(2);

This is run before any cuda instruction is called and returns no errors. Is there any extra instruction, compilation flag or something I must include for my program to only run in a given device?

Is it actually affecting your ability to debug the code?

You’re not receiving an error, but a warning; “one or more CUDA devices are made unavailable… this may change the application behaviour”.

I’m aware of that, but after that the code goes nuts and starts giving launch errors everywhere.

  1. make sure you test with 3.0
  2. if you post compilable source, I can throw things at the debugger team until they try it

The experience I have is that cuda-gdb only works with device 0.

I assume this is a bug.

-gshi