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:
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:
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:
./install_cp2k_toolchain.sh --with-libxsmm=install --install-all --with-openblas=install --with-fftw=install --enable-cuda --gpu-ver=V100