# The best performance match between CPU and GPU

**URL:** <https://gromacs.bioexcel.eu/t/the-best-performance-match-between-cpu-and-gpu/2593>\
**Category:** User discussions\
**Created:** [July 26, 2021, 2:39am UTC](https://gromacs.bioexcel.eu/t/the-best-performance-match-between-cpu-and-gpu/2593 "2021-07-26T02:39:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wxl\_wwwww](https://avatars.discourse-cdn.com/v4/letter/w/a9adbd/32.png) [@wxl\_wwwww](https://gromacs.bioexcel.eu/u/wxl_wwwww)\
**Post date:** [July 26, 2021, 2:39am UTC](https://gromacs.bioexcel.eu/t/the-best-performance-match-between-cpu-and-gpu/2593/1 "2021-07-26T02:39:49Z")

</div>

GROMACS version:2019.04  
GROMACS modification: No  
I calculate GROMACS on the supercomputer. The configuration is 64vcpu + 8 \* V100 32g  
How do I allocate resources to achieve the best balance?  
I tried to calculate with 1 core + 1gpu, which is not very good

---

<div class="post-metadata">

**Author:** ![UltraJessi](https://avatars.discourse-cdn.com/v4/letter/u/57b2e6/32.png) [@UltraJessi](https://gromacs.bioexcel.eu/u/UltraJessi)\
**Post date:** [July 29, 2021, 2:40am UTC](https://gromacs.bioexcel.eu/t/the-best-performance-match-between-cpu-and-gpu/2593/2 "2021-07-29T02:40:50Z")

</div>

Gromacs works bad with multiple GPUs, speedup is much less than what the first gpu do. According to: [GitHub - Biu-G/gromacs-rocm: Gromacs that can be accelerated at AMD GPU](https://github.com/Biu-G/gromacs-rocm)

---

<div class="post-metadata">

**Author:** ![pszilard](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pszilard/32/21_2.png) [@pszilard](https://gromacs.bioexcel.eu/u/pszilard)\
**Post date:** [July 29, 2021, 2:34pm UTC](https://gromacs.bioexcel.eu/t/the-best-performance-match-between-cpu-and-gpu/2593/3 "2021-07-29T14:34:46Z")

</div>

> [@wxl\_wwwww](#):
>
> I calculate GROMACS on the supercomputer. The configuration is 64vcpu + 8 \* V100 32g  
> How do I allocate resources to achieve the best balance?  
> I tried to calculate with 1 core + 1gpu, which is not very good

Typically 3-6 cores per GPU are sufficient to get near peak performance. However, running across multiple GPUs requires a simulation system large enough to scale, a GPU interconnect fast enough as well as direct GPU communication enabled. You also need to make sure to use appropriate task assignment (e.g. 3 PP + 1 PME GPU).

> [@UltraJessi](#):
>
> According to: [GitHub - Biu-G/gromacs-rocm: Gromacs that can be accelerated at AMD GPU](https://github.com/Biu-G/gromacs-rocm)

What you linked does not have any information on what and how was benchmarked, hence it can not be verified or assessed. Please refer to reliable and reproducible performance data.

---

<div class="post-metadata">

**Author:** ![wxl\_wwwww](https://avatars.discourse-cdn.com/v4/letter/w/a9adbd/32.png) [@wxl\_wwwww](https://gromacs.bioexcel.eu/u/wxl_wwwww)\
**Post date:** [August 21, 2021, 4:37am UTC](https://gromacs.bioexcel.eu/t/the-best-performance-match-between-cpu-and-gpu/2593/4 "2021-08-21T04:37:58Z")

</div>

OK, mine is 8 v100,64vcpus for a single node. Computationally, it does not get better performance than CPU, compared with AMD 256core. Eight V100 cards have no advantage

---

<div class="post-metadata">

**Author:** ![pszilard](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pszilard/32/21_2.png) [@pszilard](https://gromacs.bioexcel.eu/u/pszilard)\
**Post date:** [August 24, 2021, 4:55pm UTC](https://gromacs.bioexcel.eu/t/the-best-performance-match-between-cpu-and-gpu/2593/5 "2021-08-24T16:55:41Z")

</div>

Have you tested scalability of your simulations on your hardware (i.e. that you get speedup from 1 to 2 to \>2 GPUs)? Is it quite common that a simulation system is just too small and/or CPU-GPU (or GPU-GPU) interconnect too limiting to be able to efficiently scale across many GPUs.
