# Issues installing Gromacs2020.5 with CUDA and NVIDIA

**URL:** <https://gromacs.bioexcel.eu/t/issues-installing-gromacs2020-5-with-cuda-and-nvidia/1472>\
**Category:** User discussions\
**Created:** [January 20, 2021, 1:17pm UTC](https://gromacs.bioexcel.eu/t/issues-installing-gromacs2020-5-with-cuda-and-nvidia/1472 "2021-01-20T13:17:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gripani](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@gripani](https://gromacs.bioexcel.eu/u/gripani)\
**Post date:** [January 20, 2021, 1:17pm UTC](https://gromacs.bioexcel.eu/t/issues-installing-gromacs2020-5-with-cuda-and-nvidia/1472/1 "2021-01-20T13:17:07Z")

</div>

GROMACS version: 2020.5  
GROMACS modification: No

Dear gromacs developers,  
I am trying to install the v 2020.5 of gromacs package, in order to try the new python API (I’ve already used gromacs older versions (5, 19) for several years on the same machine with GPU acceleration)

My NVIDIA Driver is the 418.39 version and CUDA Version is 10.1

I am compiling with gcc 7.4.0 and g++ 7.4.0

I am trying to use the following cmake flags :

CC=gcc CXX=g++ cmake …   
-DGMX\_GPU=ON  
-DGMX\_OPENMP=ON  
-DGMX\_DEPLOYMENT\_KIT\_ROOT\_DIR=/usr/local/cuda-10.1  
-DGMX\_BUILD\_TYPE=Release  
-DGMX\_SIMD=AVX\_256  
-DGMX\_FFT\_LIBRARY=fftw3  
-DBUILD\_SHARED\_LIBS=ON  
-DGMXAPI=ON  
-DGMX\_PYTHON\_PACKAGE=ON  
-DGMX\_DEFAULT\_SUFFIX=OFF  
-DGMX\_BINARY\_SUFFIX=\_20  
-DGMX\_LIBS\_SUFFIX=\_20

But when I ran “make” I get the following error:  
“”"  
Building NVCC (Device) object src/gromacs/CMakeFiles/libgromacs.dir/nbnxm/cuda/libgromacs\_generated\_nbnxm\_cuda.cu.o  
/usr/include/c++/7/bits/basic\_string.tcc: In instantiation of ‘static std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::\_Rep\* std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::\_Rep::\_S\_create(std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::size\_type, std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::size\_type, const \_Alloc&) [with \_CharT = char16\_t; \_Traits = std::char\_traits\<char16\_t\>; \_Alloc = std::allocator\<char16\_t\>; std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::size\_type = long unsigned int]’:  
/usr/include/c++/7/bits/basic\_string.tcc:578:28: required from ‘static \_CharT\* std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::\_S\_construct(\_InIterator, \_InIterator, const \_Alloc&, std::forward\_iterator\_tag) [with \_FwdIterator = const char16\_t\*; \_CharT = char16\_t; \_Traits = std::char\_traits\<char16\_t\>; \_Alloc = std::allocator\<char16\_t\>]’  
/usr/include/c++/7/bits/basic\_string.h:5042:20: required from ‘static \_CharT\* std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::\_S\_construct\_aux(\_InIterator, \_InIterator, const \_Alloc&, std::\_\_false\_type) [with \_InIterator = const char16\_t\*; \_CharT = char16\_t; \_Traits = std::char\_traits\<char16\_t\>; \_Alloc = std::allocator\<char16\_t\>]’  
/usr/include/c++/7/bits/basic\_string.h:5063:24: required from ‘static \_CharT\* std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::\_S\_construct(\_InIterator, \_InIterator, const \_Alloc&) [with \_InIterator = const char16\_t\*; \_CharT = char16\_t; \_Traits = std::char\_traits\<char16\_t\>; \_Alloc = std::allocator\<char16\_t\>]’  
/usr/include/c++/7/bits/basic\_string.tcc:656:134: required from ‘std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::basic\_string(const \_CharT\*, std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::size\_type, const \_Alloc&) [with \_CharT = char16\_t; \_Traits = std::char\_traits\<char16\_t\>; \_Alloc = std::allocator\<char16\_t\>; std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::size\_type = long unsigned int]’  
/usr/include/c++/7/bits/basic\_string.h:6688:95: required from here  
/usr/include/c++/7/bits/basic\_string.tcc:1067:16: error: cannot call member function ‘void std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::\_Rep::\_M\_set\_sharable() [with \_CharT = char16\_t; \_Traits = std::char\_traits\<char16\_t\>; \_Alloc = std::allocator\<char16\_t\>]’ without object  
\_\_p-\>\_M\_set\_sharable();  
~~~~~~~~~ ^~  
/usr/include/c++/7/bits/basic\_string.tcc: In instantiation of ‘static std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::\_Rep\* std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::\_Rep::\_S\_create(std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::size\_type, std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::size\_type, const \_Alloc&) [with \_CharT = char32\_t; \_Traits = std::char\_traits\<char32\_t\>; \_Alloc = std::allocator\<char32\_t\>; std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::size\_type = long unsigned int]’:  
/usr/include/c++/7/bits/basic\_string.tcc:578:28: required from ‘static \_CharT\* std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::\_S\_construct(\_InIterator, \_InIterator, const \_Alloc&, std::forward\_iterator\_tag) [with \_FwdIterator = const char32\_t\*; \_CharT = char32\_t; \_Traits = std::char\_traits\<char32\_t\>; \_Alloc = std::allocator\<char32\_t\>]’  
/usr/include/c++/7/bits/basic\_string.h:5042:20: required from ‘static \_CharT\* std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::\_S\_construct\_aux(\_InIterator, \_InIterator, const \_Alloc&, std::\_\_false\_type) [with \_InIterator = const char32\_t\*; \_CharT = char32\_t; \_Traits = std::char\_traits\<char32\_t\>; \_Alloc = std::allocator\<char32\_t\>]’  
/usr/include/c++/7/bits/basic\_string.h:5063:24: required from ‘static \_CharT\* std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::\_S\_construct(\_InIterator, \_InIterator, const \_Alloc&) [with \_InIterator = const char32\_t\*; \_CharT = char32\_t; \_Traits = std::char\_traits\<char32\_t\>; \_Alloc = std::allocator\<char32\_t\>]’  
/usr/include/c++/7/bits/basic\_string.tcc:656:134: required from ‘std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::basic\_string(const \_CharT\*, std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::size\_type, const \_Alloc&) [with \_CharT = char32\_t; \_Traits = std::char\_traits\<char32\_t\>; \_Alloc = std::allocator\<char32\_t\>; std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::size\_type = long unsigned int]’  
/usr/include/c++/7/bits/basic\_string.h:6693:95: required from here  
/usr/include/c++/7/bits/basic\_string.tcc:1067:16: error: cannot call member function ‘void std::basic\_string\<\_CharT, \_Traits, \_Alloc\>::\_Rep::\_M\_set\_sharable() [with \_CharT = char32\_t; \_Traits = std::char\_traits\<char32\_t\>; \_Alloc = std::allocator\<char32\_t\>]’ without object  
CMake Error at libgromacs\_generated\_nbnxm\_cuda.cu.o.Release.cmake:279 (message):  
Error generating file  
/home/giorgio/Downloads/gromacs-2020.5/build/src/gromacs/CMakeFiles/libgromacs.dir/nbnxm/cuda/./libgromacs\_generated\_nbnxm\_cuda.cu.o

make[2]: \*\*\* [src/gromacs/CMakeFiles/libgromacs.dir/nbnxm/cuda/libgromacs\_generated\_nbnxm\_cuda.cu.o] Error 1  
make[1]: \*\*\* [src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2  
make: \*\*\* [all] Error 2  
“”"

---

<div class="post-metadata">

**Author:** ![pszilard](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pszilard/32/21_2.png) [@pszilard](https://gromacs.bioexcel.eu/u/pszilard)\
**Post date:** [January 22, 2021, 6:44pm UTC](https://gromacs.bioexcel.eu/t/issues-installing-gromacs2020-5-with-cuda-and-nvidia/1472/2 "2021-01-22T18:44:50Z")

</div>

The errors indicate that there is an issue with the gcc version and its interaction with the CUDA release you use. Can you use a newer CUDA and/or gcc?
