# Example on MPI + CUDA on Two CPU and Two GPU node

**URL:** <https://forums.developer.nvidia.com/t/example-on-mpi-cuda-on-two-cpu-and-two-gpu-node/24240>\
**Category:** CUDA Programming and Performance\
**Created:** [September 7, 2011, 3:20pm UTC](https://forums.developer.nvidia.com/t/example-on-mpi-cuda-on-two-cpu-and-two-gpu-node/24240 "2011-09-07T15:20:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kiran\_CUDA](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Kiran\_CUDA](https://forums.developer.nvidia.com/u/Kiran_CUDA)\
**Post date:** [September 7, 2011, 3:20pm UTC](https://forums.developer.nvidia.com/t/example-on-mpi-cuda-on-two-cpu-and-two-gpu-node/24240/1 "2011-09-07T15:20:10Z")

</div>

Hi,

Can someone help me write a simple MPI program that executes 1 process per CPU(Assuming two CPUs in the node and two GPUs, and we have single node only) , and each of those processes calls a CUDA kernel (K)? Any pointer to example code/literature will be of real help.

Thanks for your help in advance

K

---

<div class="post-metadata">

**Author:** ![avidday](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/avidday/32/59219_2.png) [@avidday](https://forums.developer.nvidia.com/u/avidday)\
**Post date:** [September 7, 2011, 5:07pm UTC](https://forums.developer.nvidia.com/t/example-on-mpi-cuda-on-two-cpu-and-two-gpu-node/24240/2 "2011-09-07T17:07:20Z")

</div>

Perhaps it might be easier if you post the code you already have written and explain what you can’t get to work or do not understand.
