# Errors in GROMACS 2022 installation

**URL:** <https://gromacs.bioexcel.eu/t/errors-in-gromacs-2022-installation/3818>\
**Category:** User discussions\
**Tags:** installation-error\
**Created:** [March 10, 2022, 9:17am UTC](https://gromacs.bioexcel.eu/t/errors-in-gromacs-2022-installation/3818 "2022-03-10T09:17:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![void](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@void](https://gromacs.bioexcel.eu/u/void)\
**Post date:** [March 10, 2022, 9:17am UTC](https://gromacs.bioexcel.eu/t/errors-in-gromacs-2022-installation/3818/1 "2022-03-10T09:17:53Z")

</div>

GROMACS version: 2022  
GROMACS modification: No  
Here post your question

Dear Gromacs Users,

I had trouble installing GROMACS 2022 on Windows 11 (Build 22000.556) with GPU enabled (GPU: NVIDIA Geforce RTX 3060 Ti).

Versions of related software:  
FFTW: 3.3.10  
CMake: 3.20.21032501-MSVC\_2  
CUDA: 11.6  
Nvidia Studio driver: 511.65

Here is what I run to build GROMACS 2022:

cmake … -DCMAKE\_INSTALL\_PREFIX=C:/gmx2022\_GPU -DGMX\_FFT\_LIBRARY=fftw3 -DCMAKE\_PREFIX\_PATH=C:/fftw-3.3.10 -G “Visual Studio 16 2019” -DGMX\_GPU=CUDA -DCUDA\_TOOLKIT\_ROOT\_DIR=“C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.6”

cmake --build . --target INSTALL --config Release

And then these errors occurred:

…  
正在生成代码…  
muparser.vcxproj → C:\Users\HP\Downloads\Compressed\gromacs-2022\build\lib\Release\muparser.lib  
Building NVCC (Device) object src/gromacs/CMakeFiles/libgromacs.dir/nbnxm/cuda/Release/libgromacs\_generated\_nbnxm\_cud  
a.cu.obj  
nbnxm\_cuda.cu  
C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\nbnxm\cuda\nbnxm\_cuda\_kernel\_utils.cuh(537): error : expected  
a comma (the one-argument version of static\_assert is not enabled in this mode) [C:\Users\HP\Downloads\Compressed\grom  
acs-2022\build\src\gromacs\libgromacs.vcxproj]

1 error detected in the compilation of “C:/Users/HP/Downloads/Compressed/gromacs-2022/src/gromacs/nbnxm/cuda/nbnxm\_cu  
da.cu”.  
nbnxm\_cuda.cu  
CMake Error at libgromacs\_generated\_nbnxm\_cuda.cu.obj.Release.cmake:284 (message):  
Error generating file  
C:/Users/HP/Downloads/Compressed/gromacs-2022/build/src/gromacs/CMakeFiles/libgromacs.dir/nbnxm/cuda/Release/libgro  
macs\_generated\_nbnxm\_cuda.cu.obj

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241  
,5): error MSB8066: “C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\nbnxm\cuda\nbnxm\_cuda.cu;C:\Users\HP\Dow  
nloads\Compressed\gromacs-2022\src\gromacs\nbnxm\cuda\nbnxm\_cuda\_data\_mgmt.cu;C:\Users\HP\Downloads\Compressed\gromacs-  
2022\src\gromacs\nbnxm\cuda\nbnxm\_cuda\_kernel\_F\_noprune.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\nb  
nxm\cuda\nbnxm\_cuda\_kernel\_F\_prune.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\nbnxm\cuda\nbnxm\_cuda\_k  
ernel\_VF\_noprune.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\nbnxm\cuda\nbnxm\_cuda\_kernel\_VF\_prune.cu;  
C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\nbnxm\cuda\nbnxm\_cuda\_kernel\_pruneonly.cu;C:\Users\HP\Downloa  
ds\Compressed\gromacs-2022\src\gromacs\nbnxm\cuda\nbnxm\_gpu\_buffer\_ops\_internal.cu;C:\Users\HP\Downloads\Compressed\gro  
macs-2022\src\gromacs\domdec\gpuhaloexchange\_impl.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\utility  
cuda\_version\_information.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\mdlib\gpuforcereduction\_impl.cpp;  
C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\mdlib\gpuforcereduction\_impl\_internal.cu;C:\Users\HP\Download  
s\Compressed\gromacs-2022\src\gromacs\mdlib\leapfrog\_gpu.cpp;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs  
mdlib\leapfrog\_gpu\_internal.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\mdlib\lincs\_gpu.cpp;C:\Users\H  
P\Downloads\Compressed\gromacs-2022\src\gromacs\mdlib\lincs\_gpu\_internal.cu;C:\Users\HP\Downloads\Compressed\gromacs-20  
22\src\gromacs\mdlib\settle\_gpu.cpp;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\mdlib\settle\_gpu\_internal  
.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\mdlib\update\_constrain\_gpu\_impl.cpp;C:\Users\HP\Downloads  
\Compressed\gromacs-2022\src\gromacs\mdlib\update\_constrain\_gpu\_internal.cu;C:\Users\HP\Downloads\Compressed\gromacs-20  
22\src\gromacs\listed\_forces\listed\_forces\_gpu\_impl.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\listed  
\_forces\listed\_forces\_gpu\_internal.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\nbnxm\nbnxm\_gpu\_data\_mg  
mt.cpp;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\nbnxm\nbnxm\_gpu\_buffer\_ops.cpp;C:\Users\HP\Downloads\C  
ompressed\gromacs-2022\src\gromacs\ewald\pme\_gather.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\ewald  
pme\_solve.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\ewald\pme\_spread.cu;C:\Users\HP\Downloads\Compre  
ssed\gromacs-2022\src\gromacs\ewald\pme\_gpu\_program\_impl.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\e  
wald\pme\_pp\_comm\_gpu\_impl.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\ewald\pme\_force\_sender\_gpu\_impl.  
cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\ewald\pme\_coordinate\_receiver\_gpu\_impl.cu;C:\Users\HP\Down  
loads\Compressed\gromacs-2022\src\gromacs\ewald\pme\_gpu\_grid.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\groma  
cs\ewald\pme\_gpu\_internal.cpp;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\ewald\pme\_gpu\_timings.cpp;C:\Us  
ers\HP\Downloads\Compressed\gromacs-2022\src\gromacs\fft\gpu\_3dfft.cpp;C:\Users\HP\Downloads\Compressed\gromacs-2022\sr  
c\gromacs\fft\gpu\_3dfft\_cufft.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\gpu\_utils\device\_stream\_mana  
ger.cpp;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\gpu\_utils\device\_stream.cu;C:\Users\HP\Downloads\Comp  
ressed\gromacs-2022\src\gromacs\gpu\_utils\gpu\_utils.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\gpu\_ut  
ils\pinning.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\gpu\_utils\pmalloc.cu;C:\Users\HP\Downloads\Com  
pressed\gromacs-2022\src\gromacs\hardware\detecthardware.cpp;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs  
hardware\device\_management\_common.cpp;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\hardware\device\_managem  
ent.cu;C:\Users\HP\Downloads\Compressed\gromacs-2022\src\gromacs\mdtypes\state\_propagator\_data\_gpu\_impl\_gpu.cpp;C:\User  
s\HP\Downloads\Compressed\gromacs-2022\build\CMakeFiles\0c2f43ba57a4d16e3cc5de40d184a589\baseversion-gen.cpp.rule”的自定义生  
成已退出，代码为 1。 [C:\Users\HP\Downloads\Compressed\gromacs-2022\build\src\gromacs\libgromacs.vcxproj]  
Building Custom Rule C:/Users/HP/Downloads/Compressed/gromacs-2022/src/external/muparser/CMakeLists.txt  
t\_ParserTest.cpp  
C:\Users\HP\Downloads\Compressed\gromacs-2022\src\external\muparser\include\muParserBase.h(177,46): warning C4310: 类型  
强制  
转换截断常量值 [C:\Users\HP\Downloads\Compressed\gromacs-2022\build\_deps\muparser-build\t\_ParserTest.vcxproj]  
t\_ParserTest.vcxproj → C:\Users\HP\Downloads\Compressed\gromacs-2022\build\bin\Release\t\_ParserTest.exe  
Building Custom Rule C:/Users/HP/Downloads/Compressed/gromacs-2022/src/external/googletest/googlemock/CMakeLists.txt  
gtest-all.cc  
gmock-all.cc  
正在生成代码…  
gmock.vcxproj → C:\Users\HP\Downloads\Compressed\gromacs-2022\build\lib\Release\gmock.lib

I assume these errors might result from an improper version of the compiler, but I know nothing about how to correct that. Could anyone suggest me a way out?

Thank you!

---

<div class="post-metadata">

**Author:** ![Nas](https://avatars.discourse-cdn.com/v4/letter/n/e9c0ed/32.png) [@Nas](https://gromacs.bioexcel.eu/u/Nas)\
**Post date:** [March 10, 2022, 3:13pm UTC](https://gromacs.bioexcel.eu/t/errors-in-gromacs-2022-installation/3818/2 "2022-03-10T15:13:27Z")

</div>

Hello,

My setup is very similar to yours and I get exactly the same problems as you specified.  
I am not experienced in compiling from source code and would appreciate if someone knowledgeable can explain how to solve these problems.

Many thanks,  
Nas

---

<div class="post-metadata">

**Author:** ![void](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@void](https://gromacs.bioexcel.eu/u/void)\
**Post date:** [March 10, 2022, 4:12pm UTC](https://gromacs.bioexcel.eu/t/errors-in-gromacs-2022-installation/3818/3 "2022-03-10T16:12:33Z")

</div>

Hello Nas,

Thanks for your reply. After posting this thread I tried uninstalling Visual Studio 2019 and reinstalled VS 2022 instead, and also reinstalled CUDA 11.6, but even more errors occured. Then I read the GROMACS 2022 manual and found that CUDA 11.3 would result in a crash upon compilation due to a potential bug. I don’t know whether this bug also exists in CUDA 11.6 and ruined my installation efforts. I reinstalled VS 2019 and CUDA 11.2, but the MSB8066 error was still there.

As a remedy I searched around and found a solution at Zhihu ([Windows 11系统中 GROMACS-GPU版在WSL2-Ubuntu18.04中的编译 - 知乎](https://zhuanlan.zhihu.com/p/431519638))(written in Chinese). I did exactly as this article says (except that I manually installed the latest version of CMake in UBUNTU 18.04 at WSL2) and it worked. Hope this be of some help.

Still, it is much appreciated if anyone could kindly provide insights on troubleshooting the installation errors occured in Windows environment.
