# gromacs23.2+Cp2k23.2 installation error

**URL:** <https://gromacs.bioexcel.eu/t/gromacs23-2-cp2k23-2-installation-error/7218>\
**Category:** User discussions\
**Tags:** installation, installation-error, cmake-error, make-error, qm-mm\
**Created:** [September 19, 2023, 8:04am UTC](https://gromacs.bioexcel.eu/t/gromacs23-2-cp2k23-2-installation-error/7218 "2023-09-19T08:04:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AKA](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@AKA](https://gromacs.bioexcel.eu/u/AKA)\
**Post date:** [September 19, 2023, 8:04am UTC](https://gromacs.bioexcel.eu/t/gromacs23-2-cp2k23-2-installation-error/7218/1 "2023-09-19T08:04:25Z")

</div>

GROMACS version: 2023.2  
GROMACS modification: No  
Hello. I am trying to compile gromacs 2023.2 with cp2k 2023.2 support. I am facing the following error while running make:

```auto
lto1: fatal error: multiple prevailing defs for ‘__def_init_helium_types_Density_properties_type’
compilation terminated.
lto-wrapper: fatal error: /home/aka/Documents/cp2k-2023.2/tools/toolchain/install/gcc-13.1.0/bin/g++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[2]: *** [src/programs/CMakeFiles/gmx.dir/build.make:97: bin/gmx_d] Error 1
make[1]: *** [CMakeFiles/Makefile2:5682: src/programs/CMakeFiles/gmx.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

```

The cmake command I used is:

```auto
cmake .. -DBUILD_SHARED_LIBS=OFF -DGMXAPI=OFF -DGMX_INSTALL_NBLIB_API=OFF -DGMX_EXTERNAL_BLAS=ON -DGMX_EXTERNAL_LAPACK=ON 
-DCMAKE_PREFIX_PATH="/home/wangyiwen/software/cp2k/cp2k-8.2/tools/toolchain/install/openblas-0.3.10;/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/scalapack-2.2.1;/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/fftw-3.3.10" 
-DGMX_DOUBLE=ON -DGMX_CP2K=ON -DCP2K_DIR=/home/aka/Documents/cp2k-2023.2/lib/Linux-gnu-x86_64/psmp 
-DCP2K_LINKER_FLAGS=/home/aka/Documents/cp2k-2023.2/lib/Linux-gnu-x86_64/psmp/libcp2k.a /home/aka/Documents/cp2k-2023.2/src/start/libcp2k.h -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs-cp2k/bin/ 
-DCMAKE_C_COMPILER=/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/gcc-13.1.0/bin/gcc -DCMAKE_CXX_COMPILER=/home/aka/Documents/cp2k-2023.2/tools/toolchain/install/gcc-13.1.0/bin/g++

```

Also, I compiled cp2k with cuda on a 1660Ti gpu machine. What is the best possible way to compile groamacs to achieve max perfomance?. The cp2k toolchain build command was:

```auto
./install_cp2k_toolchain.sh --with-libxsmm=install --install-all --with-openblas=install --with-fftw=install --enable-cuda --gpu-ver=V100

```

---

<div class="post-metadata">

**Author:** ![dmorozov](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dmorozov](https://gromacs.bioexcel.eu/u/dmorozov)\
**Post date:** [November 30, 2023, 8:58am UTC](https://gromacs.bioexcel.eu/t/gromacs23-2-cp2k23-2-installation-error/7218/2 "2023-11-30T08:58:18Z")

</div>

Hi,

CP2K could not use normal GeForces very effectively, so you would not see any performance increase. For CP2K full double precision Tesla cards needed.

As for lto1 error, unfortunately I don’t know what happens with its linker. Could you use just normal GNU gcc/gfortran/ld stack?
