How to change device in NVIDIA CUDA sample programs


I have just installed a 8800 GTX card that I intend to use as a GPU. I also have a 8500 card as a regular video card in the machine. I am trying to run the sample programs supplied with the CUDA package … however, the all run on the 8500 not the 8800! I have already gleaned that I need them to run on device 1 and not device 0. In programs like ‘bandwidthtest’ I can simply change device 0 to device 1 in the code - no problem. On the program ‘particles’ I can see no such command. I am new to this and don’t, as yet, know what I am doing … a bit of help to get started would be great

You do not need to change the code, you can just run the program with a different commandline

bandwidthtest -device=0

particles -device=1

all work