Gromacs GPU installation problem

GROMACS version:
GROMACS modification: Yes/No
Hi,

I installed CUDA 10.1 drivers in GPU enabled machine and tried to install gromacs 2018.1 in GPU compitable using following command.

cmake … -DGMX_GPU=ON -DCMAKE_CXX_COMPILER=g+±7 -DCMAKE_C_COMPILER=gcc-7 -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.1

But it gives following error. I tried gcc-7 and gcc-9 Installation was not successful in both cases.

– Check for working NVCC/C compiler combination
– Check for working NVCC/C compiler combination - broken
CMake Error at cmake/gmxManageGPU.cmake:289 (message):
NVCC/C compiler combination does not seem to be supported. CUDA frequently
does not support the latest versions of the host compiler, so you might
want to try an earlier C/C++ compiler version and make sure your CUDA
compiler and driver are as recent as possible.
Call Stack (most recent call first):
CMakeLists.txt:582 (gmx_gpu_setup)

– Configuring incomplete, errors occurred!
See also “/root/gromacs-2018.1/build/CMakeFiles/CMakeOutput.log”.
See also “/root/gromacs-2018.1/build/CMakeFiles/CMakeError.log”.
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= gcc-7
CMAKE_CXX_COMPILER= g+±7

– Generating done
– Build files have been written to: /root/gromacs-2018.1/build

Can any body help

Thanks,
sainitin