tags:

views:

49

answers:

2

I've got a Nvidia Tesla s2050; a host with a nvidia quadro card.CentOS 5.5 with CUDA 3.1 When i run cuda app, i wanna use 4 Tesla c-2050, but not including quadro on host in order not to lagging the whole performance while split the job by 5 equally.any way to implement this?

+1  A: 

Yes. Check CUDA Support/Choosing a GPU

Problem

Running your code on a machine with multiple GPUs may result in your code executing on an older and slower GPU.

Solution

If you know the device number of the GPU you want to use, call cudaSetDevice(N). For a more robust solutions, include the code shown below at the beginning of your program to automatically select the best GPU on any machine.

Check their website for further explanation.

You may also find this post very interesting.

karlphillip
+1  A: 

I'm assuming you have four processes and four devices, although your question suggests you have five processes and four devices, which means that manual scheduling may be preferable (with the Tesla devices in "shared" mode).

The easiest is to use nvidia-smi to specify that the Quadro device is "compute prohibited". You would also specify that the Teslas are "compute exclusive" meaning only one context can attach to each of these at any given time.

Run man nvidia-smi for more information.

Tom