Simple multi-gpu problem

Dear all,

I’m using at the moment currently a GTX295, and I have written a CFD simulation program for it. In the program you can specify different simulations, and the program will automatically schedule and start them. Now comes the program, because always 2 threads will run on the processor to coordinate the GPUs.

My question is that do I have to use the SetDevice before each function-call, or only just in the beginning of each CPU-thread?

On the other hand how does the program specify to which GPU to allocate the memories?

                            Thanks for the help in advance!
                                       Laszlo Daroczy

Just once per CPU thread.