Errors in GROMACS 2022 installation

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!

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

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中的编译 - 知乎)(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.