# question about multiple GPUs

**URL:** <https://forums.developer.nvidia.com/t/question-about-multiple-gpus/12018>\
**Category:** CUDA Programming and Performance\
**Created:** [September 7, 2009, 9:30pm UTC](https://forums.developer.nvidia.com/t/question-about-multiple-gpus/12018 "2009-09-07T21:30:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shingoxlf](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@shingoxlf](https://forums.developer.nvidia.com/u/shingoxlf)\
**Post date:** [September 7, 2009, 9:30pm UTC](https://forums.developer.nvidia.com/t/question-about-multiple-gpus/12018/1 "2009-09-07T21:30:24Z")

</div>

in the CUDA\_SDK, there is a example called “simpleMultiGPU”.

Here is how it uses multiGPUs

for(i = 0; i \< GPU\_N; i++)  
threadID[i] = cutStartThread((CUT\_THREADROUTINE)solverThread, (void \*)(plan + i));  
cutWaitForThreads(threadID, GPU\_N);

My question is these threads in CPU are parallel or not?

It seems like they just sequentially call the function “solverThread” in which the kernel function is involved.

Anyone can help?

---

<div class="post-metadata">

**Author:** ![eyalhir74](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@eyalhir74](https://forums.developer.nvidia.com/u/eyalhir74)\
**Post date:** [September 8, 2009, 6:07am UTC](https://forums.developer.nvidia.com/t/question-about-multiple-gpus/12018/2 "2009-09-08T06:07:53Z")

</div>

> [@](#):
>
> in the CUDA\_SDK, there is a example called “simpleMultiGPU”.
> 
> Here is how it uses multiGPUs
> 
> for(i = 0; i \< GPU\_N; i++)
> 
> threadID[i] = cutStartThread((CUT\_THREADROUTINE)solverThread, (void \*)(plan + i));
> 
> cutWaitForThreads(threadID, GPU\_N);
> 
> My question is these threads in CPU are parallel or not?
> 
> It seems like they just sequentially call the function “solverThread” in which the kernel function is involved.
> 
> Anyone can help?

Look at the cutStartThread method implementation - it is a wrapper around the WinAPI CreateThread function

call, which indeed starts a new CPU thread. The solverThread method is the function called by each CPU thread.

eyal
