# Assigning each CPU with a GPU

**URL:** <https://pyfr.discourse.group/t/assigning-each-cpu-with-a-gpu/584>\
**Category:** General\
**Created:** [11 April 2022 15:40 UTC](https://pyfr.discourse.group/t/assigning-each-cpu-with-a-gpu/584 "2022-04-11T15:40:45Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Zhenyang](https://avatars.discourse-cdn.com/v4/letter/z/ec9cab/32.png) [@Zhenyang](https://pyfr.discourse.group/u/Zhenyang)\
**Post date:** [11 April 2022 19:58 UTC](https://pyfr.discourse.group/t/assigning-each-cpu-with-a-gpu/584/3 "2022-04-11T19:58:18Z")

</div>

> [@fdw](#):
>
> Hence, what you want to focus on is ensuring that each pyfr instance uses the appropriate IB adapter (5\_0, 5\_1 for GPU0 and GPU1, 5\_2, 5\_2 for GPU2 and GPU3, etc) and that MPI is properly CUDA aware. This should give you the best overall performance.

Hi Freddie, thanks for your reply. I am not sure how do that exactly. Can you indicate it more detailly?

And according to our last discussion [PyFR 1.13.0: CUDAOSError - #14 by Zhenyang](https://pyfr.discourse.group/t/pyfr-1-13-0-cudaoserror/555/14), I recompiled my mpi library without cuda support. Should I turn back to CUDA aware MPI?

Best wishes,  
Zhenyang

---

_[View the full topic](https://pyfr.discourse.group/t/assigning-each-cpu-with-a-gpu/584)._
