Error while installing gromacs

GROMACS version:2018
GROMACS modification: Yes/No

I was trying to install gromacs 2019 in an non-standard. but i countered this error:

/usr/lib/gcc/x86_64-linux-gnu/5/include/mwaitxintrin.h(36): error: identifier “__builtin_ia32_monitorx” is undefined

/usr/lib/gcc/x86_64-linux-gnu/5/include/mwaitxintrin.h(42): error: identifier “__builtin_ia32_mwaitx” is undefined

2 errors detected in the compilation of “/tmp/tmpxft_00003864_00000000-19_nbnxn_cuda.compute_52.cpp1.ii”.
CMake Error at (message):
Error generating file

src/gromacs/CMakeFiles/libgromacs.dir/build.make:63: recipe for target ‘src/gromacs/CMakeFiles/libgromacs.dir/mdlib/nbnxn_cuda/’ failed
make[2]: *** [src/gromacs/CMakeFiles/libgromacs.dir/mdlib/nbnxn_cuda/] Error 1
CMakeFiles/Makefile2:2778: recipe for target ‘src/gromacs/CMakeFiles/libgromacs.dir/all’ failed
make[1]: *** [src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2
Makefile:160: recipe for target ‘all’ failed
make: *** [all] Error 2

could you tell me how i can resolve this problem?

Greetings Azam,

A quick google search of your error message directs to a bunch of posts of people complaining about such error message during the compilation or use of CUDA-related applications.

  • What was the command you used to compile gromacs?
  • What is your CUDA version?

Also, unless you need it for some reason, it would not hurt to install the 2020 version of gromacs ;)

Updating your CUDA will likely solve the issue, but there seem to be workarounds

Kind regards, let me know how it goes

Hi Mikel,
thanks for your reply. I used nstallation guide — GROMACS 2019.5 documentation and after make
command and downloding 32% this error appeared !
Screenshot from 2020-06-14 09-45-16|625x500

nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:27:32_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17

my grafic card is geforce gt 1030 and is not cuda enabled according to this website:
So i think updating cuda not work.
coud you tell me other suggest?

best wishes

Hello again

It would be important to know that. The guide includes a number of different commands that you have to tailor to your individual needs. Maybe you have to manually specificy that you dont want CUDA support. Please do paste the command that gave rise to the output that you have attached

Hello Mikel. these are commands that i used to compile gromacs:
1.tar xfz gromacs-2019.5.tar.gz
2. cd gromacs-2019.5
3. mkdir build
4. cd build
5. cmake … -DGMX_BUILD_OWN_FFTW=ON -DCMAKE_INSTALL_PREFIX=/home/azam/Desktop/gromacs-2019.5 -DGMX_GPU=on -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda7.5.18
6. make
after make command i countered that error.
also when I used this command without gpu
cmake … -DGMX_BUILD_OWN_FFTW=ON -DCMAKE_INSTALL_PREFIX=/home/azam/Desktop/gromacs-2019.5
but in both states i countered that error.

Hello again

Take a look at this post Gmx mdrun is too slow for my cpu

It might be just what you need

Let me know if running cmake with -DGMX_GPU=OFF works for you

Dear Mikel,

Thank you for your advice . Running cmake with -DGMX_GPU=OFF workd and i was able to install gromacs-2020 in my Ubuntu .
But you said me that late because i bought my new grafic card and it will arrive to me soon. can you guide me if i compil gromacs 2020 using `-DGMX_GPU=on , how i uninstall the current version?

Again, thank you for all of your help.

Best regards,

Hi Azam
To uninstall the present version of gromacs go to the present build directory

$ cd gromacs-2019.5/build

Then type the following command …

$ sudo make uninstall

This should do the job.

Once done, you may like to clean the directory by deleting all files and start afresh.

Hope it helps



I would also suggest updating CUDA: v7.5.18 is getting very old now. You will probably need newer NVidia driver as well.


hello zhmurov,

thankyou for your advice. i did that and it worked.