# Install GROMACS 2021.5 on Mac M1 with enabling GPU

**URL:** <https://gromacs.bioexcel.eu/t/install-gromacs-2021-5-on-mac-m1-with-enabling-gpu/4254>\
**Category:** User discussions\
**Tags:** installation-error\
**Created:** [June 2, 2022, 7:40am UTC](https://gromacs.bioexcel.eu/t/install-gromacs-2021-5-on-mac-m1-with-enabling-gpu/4254 "2022-06-02T07:40:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![marzouk](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@marzouk](https://gromacs.bioexcel.eu/u/marzouk)\
**Post date:** [June 2, 2022, 7:40am UTC](https://gromacs.bioexcel.eu/t/install-gromacs-2021-5-on-mac-m1-with-enabling-gpu/4254/1 "2022-06-02T07:40:10Z")

</div>

GROMACS version:  
GROMACS modification: No  
I installed GROMACS 2021.5 on iMac M1 based on the installation steps in the manual.  
I used these flags with cmake  
cmake … -DGMX\_BUILD\_OWN\_FFTW=OFF -DCMAKE\_INSTALL\_PREFIX=/Users/marzouk/packages/gromacs/2021.5 -DGMX\_GPU=OpenCL  
I wanted to use the GPU of Mac in combination with CPU for that reason I used Open  
CL  
after installation gmx running with only CPU and I detected the GPU but not compatible as in this message

 ![Screen Shot 2022-06-02 at 16.17.44](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/c/c52924863bf28796bdaa1d5d6ae49aa97ec7359e.png)

how can I use the GPU? Should I install again and define something in cmake?

This is the code I used to define the cores  
gmx mdrun -v -deffnm nvt -ntomp 1 -ntmpi 6

> Blockquote

---

<div class="post-metadata">

**Author:** ![al42and](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/al42and/32/1393_2.png) [@al42and](https://gromacs.bioexcel.eu/u/al42and)\
**Post date:** [June 2, 2022, 11:53am UTC](https://gromacs.bioexcel.eu/t/install-gromacs-2021-5-on-mac-m1-with-enabling-gpu/4254/2 "2022-06-02T11:53:07Z")

</div>

Hi @marzouk!

Unfortunately, M1 GPU is really not supported in GROMACS. Not much can be done by a user.

---

<div class="post-metadata">

**Author:** ![marzouk](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@marzouk](https://gromacs.bioexcel.eu/u/marzouk)\
**Post date:** [June 9, 2022, 9:27pm UTC](https://gromacs.bioexcel.eu/t/install-gromacs-2021-5-on-mac-m1-with-enabling-gpu/4254/3 "2022-06-09T21:27:22Z")

</div>

Okay, thank you too much.  
I used cpu only 😭😭

---

<div class="post-metadata">

**Author:** ![al42and](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/al42and/32/1393_2.png) [@al42and](https://gromacs.bioexcel.eu/u/al42and)\
**Post date:** [June 13, 2022, 1:08pm UTC](https://gromacs.bioexcel.eu/t/install-gromacs-2021-5-on-mac-m1-with-enabling-gpu/4254/4 "2022-06-13T13:08:30Z")

</div>

[As noticed in another thread](https://gromacs.bioexcel.eu/t/does-gromacs-supports-gpu-acceleration-on-m1-mac/3466/5), the GPU actually might work if you disable the compatibility check by setting the `GMX_GPU_DISABLE_COMPATIBILITY_CHECK=1` environment variable.

But I’d still advise against using it for anything important.

---

<div class="post-metadata">

**Author:** ![tianyishi](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@tianyishi](https://gromacs.bioexcel.eu/u/tianyishi)\
**Post date:** [June 13, 2022, 2:19pm UTC](https://gromacs.bioexcel.eu/t/install-gromacs-2021-5-on-mac-m1-with-enabling-gpu/4254/5 "2022-06-13T14:19:20Z")

</div>

True, OpenCL is quite crappy and makes the GPU in M1 Pro only having about half the performance of NVIDIA 1650 Ti. It’s much more cost-effective to run on Linux with NVIDIA GPUs.

---

<div class="post-metadata">

**Author:** ![marzouk](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@marzouk](https://gromacs.bioexcel.eu/u/marzouk)\
**Post date:** [June 21, 2022, 10:43pm UTC](https://gromacs.bioexcel.eu/t/install-gromacs-2021-5-on-mac-m1-with-enabling-gpu/4254/6 "2022-06-21T22:43:57Z")

</div>

Thank you for advice
