# Is it possible to install GROMACS with GPU acceleration on WSL2?

**URL:** <https://gromacs.bioexcel.eu/t/is-it-possible-to-install-gromacs-with-gpu-acceleration-on-wsl2/1489>\
**Category:** User discussions\
**Created:** [January 26, 2021, 9:32pm UTC](https://gromacs.bioexcel.eu/t/is-it-possible-to-install-gromacs-with-gpu-acceleration-on-wsl2/1489 "2021-01-26T21:32:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eenbns](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@eenbns](https://gromacs.bioexcel.eu/u/eenbns)\
**Post date:** [January 26, 2021, 9:32pm UTC](https://gromacs.bioexcel.eu/t/is-it-possible-to-install-gromacs-with-gpu-acceleration-on-wsl2/1489/1 "2021-01-26T21:32:19Z")

</div>

GROMACS version: 2020.4  
GROMACS modification: No

Dear users,  
I’ve been trying to compile GROMACS using WSL2 to use GPU acceleration on my calculations for a week now without sucess.

I have seen this topic discussed in two drafts here on the forum:  
[GROMACS with GPU installation on WSL2 - GROMACS user forum - GROMACS forums (bioexcel.eu)](https://gromacs.bioexcel.eu/t/gromacs-with-gpu-installation-on-wsl2/755)  
with no answers, except mine  
and,  
[Mdrun: CPU-only much faster than GPU accelerated (WSL2, NVidia) - GROMACS user forum - GROMACS forums (bioexcel.eu)](https://gromacs.bioexcel.eu/t/mdrun-cpu-only-much-faster-than-gpu-accelerated-wsl2-nvidia/1028)  
but the owner of the draft installed a dual boot and did not persue the problem.

I did all the steps presented in the instructions and tested with a CUDA tester and my connection with the GPU is working, but when I try to install GROMACS, it doesn’t find my GPU.

I wanted to know if it is possible to install GROMACS using WSL2 and if anyone has sucessed with it.

There’s a log of my compilation  
user@user:/mnt/c/Users/user/Downloads/gromacs-2020.4/build$ CC=gcc CXX=g++ cmake … -DGMX\_OPENMP=ON -DGMX\_GPU=ON -DGPU\_DEPLOYMENT\_KIT\_ROOT\_DIR=/usr/local/cuda-11.0/bin/ -DGMX\_BUILD\_OWN\_FFTW=ON -DGMX\_PREFER\_STATIC\_LIBS=ON -DCMAKE\_BUILD\_TYPE=Release -DCMAKE\_INSTALL\_PREFIX=:/usr/local/  
– The C compiler identification is GNU 7.5.0  
– The CXX compiler identification is GNU 7.5.0  
– Check for working C compiler: /usr/bin/gcc  
– Check for working C compiler: /usr/bin/gcc – works  
– Detecting C compiler ABI info  
– Detecting C compiler ABI info - done  
– Detecting C compile features  
– Detecting C compile features - done  
– Check for working CXX compiler: /usr/bin/g++  
– Check for working CXX compiler: /usr/bin/g++ – works  
– Detecting CXX compiler ABI info  
– Detecting CXX compiler ABI info - done  
– Detecting CXX compile features  
– Detecting CXX compile features - done  
**– Looking for NVIDIA GPUs present in the system**  
**– Could not detect NVIDIA GPUs**  
– Looking for pthread.h  
– Looking for pthread.h - found  
– Looking for pthread\_create  
– Looking for pthread\_create - not found  
– Looking for pthread\_create in pthreads  
– Looking for pthread\_create in pthreads - not found  
– Looking for pthread\_create in pthread  
– Looking for pthread\_create in pthread - found  
– Found Threads: TRUE  
– Found CUDA: /usr/local/cuda (found suitable version “11.0”, minimum required is “9.0”)  
– Found OpenMP\_C: -fopenmp (found version “4.5”)  
– Found OpenMP\_CXX: -fopenmp (found version “4.5”)  
– Found OpenMP: TRUE (found version “4.5”)  
– Performing Test CFLAGS\_EXCESS\_PREC  
– Performing Test CFLAGS\_EXCESS\_PREC - Success  
– Performing Test CFLAGS\_COPT  
– Performing Test CFLAGS\_COPT - Success  
– Performing Test CFLAGS\_NOINLINE  
– Performing Test CFLAGS\_NOINLINE - Success  
– Performing Test CXXFLAGS\_EXCESS\_PREC  
– Performing Test CXXFLAGS\_EXCESS\_PREC - Success  
– Performing Test CXXFLAGS\_COPT  
– Performing Test CXXFLAGS\_COPT - Success  
– Performing Test CXXFLAGS\_NOINLINE  
– Performing Test CXXFLAGS\_NOINLINE - Success  
– Looking for include file unistd.h  
– Looking for include file unistd.h - found  
– Looking for include file pwd.h  
– Looking for include file pwd.h - found  
– Looking for include file dirent.h  
– Looking for include file dirent.h - found  
– Looking for include file time.h  
– Looking for include file time.h - found  
– Looking for include file sys/time.h  
– Looking for include file sys/time.h - found  
– Looking for include file io.h  
– Looking for include file io.h - not found  
– Looking for include file sched.h  
– Looking for include file sched.h - found  
– Looking for include file xmmintrin.h  
– Looking for include file xmmintrin.h - found  
– Looking for gettimeofday  
– Looking for gettimeofday - found  
– Looking for sysconf  
– Looking for sysconf - found  
– Looking for nice  
– Looking for nice - found  
– Looking for fsync  
– Looking for fsync - found  
– Looking for \_fileno  
– Looking for \_fileno - not found  
– Looking for fileno  
– Looking for fileno - found  
– Looking for \_commit  
– Looking for \_commit - not found  
– Looking for sigaction  
– Looking for sigaction - found  
– Performing Test HAVE\_BUILTIN\_CLZ  
– Performing Test HAVE\_BUILTIN\_CLZ - Success  
– Performing Test HAVE\_BUILTIN\_CLZLL  
– Performing Test HAVE\_BUILTIN\_CLZLL - Success  
– Looking for clock\_gettime in rt  
– Looking for clock\_gettime in rt - found  
– Looking for feenableexcept in m  
– Looking for feenableexcept in m - found  
– Looking for fedisableexcept in m  
– Looking for fedisableexcept in m - found  
– Checking for sched.h GNU affinity API  
– Performing Test sched\_affinity\_compile  
– Performing Test sched\_affinity\_compile - Success  
– Looking for include file mm\_malloc.h  
– Looking for include file mm\_malloc.h - found  
– Looking for include file malloc.h  
– Looking for include file malloc.h - found  
– Checking for \_mm\_malloc()  
– Checking for \_mm\_malloc() - supported  
– Looking for posix\_memalign  
– Looking for posix\_memalign - found  
– Looking for memalign  
– Looking for memalign - not found  
– Check if the system is big endian  
– Searching 16 bit integer  
– Looking for sys/types.h  
– Looking for sys/types.h - found  
– Looking for stdint.h  
– Looking for stdint.h - found  
– Looking for stddef.h  
– Looking for stddef.h - found  
– Check size of unsigned short  
– Check size of unsigned short - done  
– Using unsigned short  
– Check if the system is big endian - little endian  
Searching for static libraries requested, so the GROMACS libraries will also be static (BUILD\_SHARED\_LIBS=OFF)  
– Looking for HWLOC  
– Looking for hwloc – hwloc.h not found  
– Looking for hwloc – lib hwloc not found  
– Could NOT find HWLOC (missing: HWLOC\_LIBRARIES HWLOC\_INCLUDE\_DIRS) (Required is at least version “1.5”)  
– Looking for C++ include pthread.h  
– Looking for C++ include pthread.h - found  
– Atomic operations found  
– Performing Test PTHREAD\_SETAFFINITY  
– Performing Test PTHREAD\_SETAFFINITY - Success  
– Adding work-around for issue compiling CUDA code with glibc 2.23 string.h  
– Check for working NVCC/C++ compiler combination with nvcc ‘/usr/local/cuda/bin/nvcc’  
– Check for working NVCC/C++ compiler combination - works  
– Checking for GCC x86 inline asm  
– Checking for GCC x86 inline asm - supported  
– Detected build CPU vendor - AMD  
– Detected build CPU brand - AMD Ryzen 5 2400G with Radeon Vega Graphics  
– Detected build CPU family - 23  
– Detected build CPU model - 17  
– Detected build CPU stepping - 0  
– Detected build CPU features - aes amd apic avx avx2 clfsh cmov cx8 cx16 f16c fma htt lahf misalignsse mmx msr pclmuldq pdpe1gb popcnt pse rdrnd rdtscp sha sse2 sse3 sse4a sse4.1 sse4.2 ssse3  
– Enabling RDTSCP support - detected on the build host  
– Checking for 64-bit off\_t  
– Checking for 64-bit off\_t - present  
– Checking for fseeko/ftello  
– Checking for fseeko/ftello - present  
– Checking for SIGUSR1  
– Checking for SIGUSR1 - found  
– Checking for pipe support  
– Checking for system XDR support  
– Checking for system XDR support - present  
– Detecting best SIMD instructions for this CPU  
– Detected best SIMD instructions for this CPU - AVX2\_128  
– Performing Test C\_mavx2\_mfma\_FLAG\_ACCEPTED  
– Performing Test C\_mavx2\_mfma\_FLAG\_ACCEPTED - Success  
– Performing Test C\_mavx2\_mfma\_COMPILE\_WORKS  
– Performing Test C\_mavx2\_mfma\_COMPILE\_WORKS - Success  
– Performing Test CXX\_mavx2\_mfma\_FLAG\_ACCEPTED  
– Performing Test CXX\_mavx2\_mfma\_FLAG\_ACCEPTED - Success  
– Performing Test CXX\_mavx2\_mfma\_COMPILE\_WORKS  
– Performing Test CXX\_mavx2\_mfma\_COMPILE\_WORKS - Success  
– Enabling 128-bit AVX2 SIMD instructions using CXX flags: -mavx2 -mfma  
– Detecting flags to enable runtime detection of AVX-512 units on newer CPUs  
– Performing Test C\_xCORE\_AVX512\_qopt\_zmm\_usage\_high\_FLAG\_ACCEPTED  
– Performing Test C\_xCORE\_AVX512\_qopt\_zmm\_usage\_high\_FLAG\_ACCEPTED - Failed  
– Performing Test C\_xCORE\_AVX512\_FLAG\_ACCEPTED  
– Performing Test C\_xCORE\_AVX512\_FLAG\_ACCEPTED - Failed  
– Performing Test C\_mavx512f\_mfma\_FLAG\_ACCEPTED  
– Performing Test C\_mavx512f\_mfma\_FLAG\_ACCEPTED - Success  
– Performing Test C\_mavx512f\_mfma\_COMPILE\_WORKS  
– Performing Test C\_mavx512f\_mfma\_COMPILE\_WORKS - Success  
– Performing Test CXX\_xCORE\_AVX512\_qopt\_zmm\_usage\_high\_FLAG\_ACCEPTED  
– Performing Test CXX\_xCORE\_AVX512\_qopt\_zmm\_usage\_high\_FLAG\_ACCEPTED - Failed  
– Performing Test CXX\_xCORE\_AVX512\_FLAG\_ACCEPTED  
– Performing Test CXX\_xCORE\_AVX512\_FLAG\_ACCEPTED - Failed  
– Performing Test CXX\_mavx512f\_mfma\_FLAG\_ACCEPTED  
– Performing Test CXX\_mavx512f\_mfma\_FLAG\_ACCEPTED - Success  
– Performing Test CXX\_mavx512f\_mfma\_COMPILE\_WORKS  
– Performing Test CXX\_mavx512f\_mfma\_COMPILE\_WORKS - Success  
– Detecting flags to enable runtime detection of AVX-512 units on newer CPUs - -mavx512f -mfma  
– Performing Test \_Wno\_unused\_command\_line\_argument\_FLAG\_ACCEPTED  
– Performing Test \_Wno\_unused\_command\_line\_argument\_FLAG\_ACCEPTED - Success  
– Performing Test \_callconv\_\_\_vectorcall  
– Performing Test \_callconv\_\_\_vectorcall - Failed  
– Performing Test \_callconv\_\_\_regcall  
– Performing Test \_callconv\_\_\_regcall - Failed  
– Performing Test _callconv_  
– Performing Test _callconv_ - Success  
– The GROMACS-managed build of FFTW 3 will configure with the following optimizations: --enable-sse2;–enable-avx;–enable-avx2  
– Using external FFT library - FFTW3 build managed by GROMACS  
– A library with BLAS API not found. Please specify library location.  
– Using GROMACS built-in BLAS.  
– LAPACK requires BLAS  
– A library with LAPACK API not found. Please specify library location.  
– Using GROMACS built-in LAPACK.  
– Checking for dlopen  
– Performing Test HAVE\_DLOPEN  
– Performing Test HAVE\_DLOPEN - Success  
– Checking for dlopen - found  
– GROMACS only supports plugins in a build that uses shared libraries, which can be disabled for various reasons. BUILD\_SHARED\_LIBS=on and a toolchain that supports dynamic linking is required. (Hint: GMX\_PREFER\_STATIC\_LIBS and GMX\_BUILD\_MDRUN\_ONLY can influence the default BUILD\_SHARED\_LIBS, so if you need plugins, reconsider those choices.)  
– Not using dynamic plugins (e.g VMD-supported file formats)  
– Using default binary suffix: “”  
– Using default library suffix: “”  
– Could not convert sample image, ImageMagick convert can not be used. A possible way to fix it can be found here:  
Traceback (most recent call last):  
File “”, line 1, in   
ModuleNotFoundError: No module named ‘pygments’  
– Could NOT find Sphinx (missing: SPHINX\_EXECUTABLE pygments) (Required is at least version “1.6.1”)  
– Performing Test HAVE\_NO\_DEPRECATED\_COPY  
– Performing Test HAVE\_NO\_DEPRECATED\_COPY - Success  
– Performing Test HAS\_NO\_STRINGOP\_TRUNCATION  
– Performing Test HAS\_NO\_STRINGOP\_TRUNCATION - Success  
– Performing Test HAS\_NO\_UNUSED\_MEMBER\_FUNCTION  
– Performing Test HAS\_NO\_UNUSED\_MEMBER\_FUNCTION - Success  
– Performing Test HAS\_NO\_REDUNDANT\_MOVE  
– Performing Test HAS\_NO\_REDUNDANT\_MOVE - Success  
– Performing Test HAS\_NO\_UNUSED  
– Performing Test HAS\_NO\_UNUSED - Success  
– Performing Test HAS\_NO\_UNUSED\_PARAMETER  
– Performing Test HAS\_NO\_UNUSED\_PARAMETER - Success  
– Performing Test HAS\_NO\_MISSING\_DECLARATIONS  
– Performing Test HAS\_NO\_MISSING\_DECLARATIONS - Success  
– Performing Test HAS\_NO\_NULL\_CONVERSIONS  
– Performing Test HAS\_NO\_NULL\_CONVERSIONS - Success  
– Performing Test HAS\_DECL\_IN\_SOURCE  
– Performing Test HAS\_DECL\_IN\_SOURCE - Failed  
– Performing Test HAS\_NO\_CLASS\_MEMACCESS  
– Performing Test HAS\_NO\_CLASS\_MEMACCESS - Success  
– Check if the system is big endian  
– Searching 16 bit integer  
– Using unsigned short  
– Check if the system is big endian - little endian  
– Looking for inttypes.h  
– Looking for inttypes.h - found  
– Configuring done
