Hi! <div>After having installed CP2K (2025.1 version) following the installation instructions and compiling both the executable and a static library (libcp2k.a), I try to link to Gromacs (2022.1 version). By trying all different kind of variables in the cmake function and different compilers I only get a lot of "underfined reference" errors when the download reaches 100%. </div><div><br /></div><div>Here is the cmake command I'm using:</div><div><br /></div><div>cmake .. \<br />         -DGMX_BUILD_OWN_FFTW=OFF \<br />         -DREGRESSIONTEST_DOWNLOAD=ON \<br />         -DCMAKE_INSTALL_PREFIX=~/gromacs \<br />         -DBUILD_SHARED_LIBS=OFF \<br />         -DGMX_PREFER_STATIC_LIBS=ON \<br />         -DGMXAPI=OFF \<br />         -DGMX_INSTALL_NBLIB_API=OFF \<br />         -DGMX_DOUBLE=ON \<br />         -DGMX_FFT_LIBRARY=fftw3 \<br />         -DFFTWF_LIBRARY=/home/jonasbaa/Documents/WaterPhase/cp2k/tools/toolchain/install/fftw-3.3.10/lib/libfftw3.a \<br />         -DFFTWF_INCLUDE_DIR=/home/jonasbaa/Documents/WaterPhase/cp2k/tools/toolchain/install/fftw-3.3.10/include \<br />         -DGMX_BLAS_USER=/home/jonasbaa/Documents/WaterPhase/cp2k/tools/toolchain/install/openblas-0.3.28/lib/libopenblas.a \<br />         -DGMX_LAPACK_USER=/home/jonasbaa/Documents/WaterPhase/cp2k/tools/toolchain/install/openblas-0.3.28/lib/libopenblas.a \<br />         -DCP2K_DIR=/home/jonasbaa/Documents/WaterPhase/cp2k/lib/Linux-gnu-x86_64/psmp \<br />         -DGMX_CP2K=ON \<br />         -DCMAKE_C_COMPILER=/home/jonasbaa/Documents/WaterPhase/cp2k/tools/toolchain/install/openmpi-5.0.6/bin/mpicc \<br />         -DCMAKE_CXX_COMPILER=/home/jonasbaa/Documents/WaterPhase/cp2k/tools/toolchain/install/openmpi-5.0.6/bin/mpicxx \<br />         -DCMAKE_Fortran_COMPILER=/home/jonasbaa/Documents/WaterPhase/cp2k/tools/toolchain/install/openmpi-5.0.6/bin/mpifort</div><div><br /></div><div>Please take an extra look at the FFTWF, BLAS and LAPACK lines as they produce warnings. Cmake gives the following output: "DFFTWF_LIBRARY and DFFTWF_INCLUDE_DIR  is not used by the project". </div><div><br /></div><div>Here is a few examples of the undefined reference errors, as they are produced in huge amounts for all libraries downloaded with CP2K:</div><div><br /></div><div>/usr/bin/ld: /home/jonasbaa/Documents/WaterPhase/cp2k/lib/Linux-gnu-x86_64/psmp/exts/dbcsr/libdbcsr.a(dbcsr_mpiwrap.o): in function `__dbcsr_mpiwrap_MOD_mp_file_write_at_all_iv':<br />/home/jonasbaa/Documents/WaterPhase/cp2k/obj/Linux-gnu-x86_64/psmp/exts/dbcsr/dbcsr_mpiwrap.F90:5394:(.text+0x1da0c): undefined reference to `mpi_file_write_at_all_f08_'<br />/usr/bin/ld: /home/jonasbaa/Documents/WaterPhase/cp2k/lib/Linux-gnu-x86_64/psmp/exts/dbcsr/libdbcsr.a(dbcsr_mpiwrap.o): in function `__dbcsr_mpiwrap_MOD_mp_file_write_at_i':<br />/home/jonasbaa/Documents/WaterPhase/cp2k/obj/Linux-gnu-x86_64/psmp/exts/dbcsr/dbcsr_mpiwrap.F90:5364:(.text+0x1dac7): undefined reference to `mpi_file_write_at_f08_'<br />/usr/bin/ld: /home/jonasbaa/Documents/WaterPhase/cp2k/lib/Linux-gnu-x86_64/psmp/exts/dbcsr/libdbcsr.a(dbcsr_mpiwrap.o): in function `__dbcsr_mpiwrap_MOD_mp_file_write_at_iv':<br />/home/jonasbaa/Documents/WaterPhase/cp2k/obj/Linux-gnu-x86_64/psmp/exts/dbcsr/dbcsr_mpiwrap.F90:5342:(.text+0x1dbc8): undefined reference to `mpi_file_write_at_f08_'<br />/usr/bin/ld: /home/jonasbaa/Documents/WaterPhase/cp2k/lib/Linux-gnu-x86_64/psmp/exts/dbcsr/libdbcsr.a(dbcsr_mpiwrap.o): in function `__dbcsr_mpiwrap_MOD_mp_deallocate_i':<br />/home/jonasbaa/Documents/WaterPhase/cp2k/obj/Linux-gnu-x86_64/psmp/exts/dbcsr/dbcsr_mpiwrap.F90:5544:(.text+0x1dc83): undefined reference to `mpi_free_mem_f08_'<br />/usr/bin/ld: /home/jonasbaa/Documents/WaterPhase/cp2k/lib/Linux-gnu-x86_64/psmp/exts/dbcsr/libdbcsr.a(dbcsr_mpiwrap.o): in function `__dbcsr_mpiwrap_MOD_mp_allocate_i':<br />/home/jonasbaa/Documents/WaterPhase/cp2k/obj/Linux-gnu-x86_64/psmp/exts/dbcsr/dbcsr_mpiwrap.F90:5531:(.text+0x1dd30): undefined reference to `mpi_type_size_f08_'</div><div>/home/jonasbaa/Documents/WaterPhase/cp2k/obj/Linux-gnu-x86_64/psmp/exts/dbcsr/dbcsr_block_operations.F90:1584:(.text+0xf4b9): undefined reference to `__libxsmm_MOD_libxsmm_ptr_s0'<br />/usr/bin/ld: /home/jonasbaa/Documents/WaterPhase/cp2k/obj/Linux-gnu-x86_64/psmp/exts/dbcsr/dbcsr_block_operations.F90:1584:(.text+0xf4ee): undefined reference to `__libxsmm_MOD_libxsmm_ptr_s0'<br />/usr/bin/ld: /home/jonasbaa/Documents/WaterPhase/cp2k/obj/Linux-gnu-x86_64/psmp/exts/dbcsr/dbcsr_block_operations.F90:1584:(.text+0xf52b): undefined reference to `__libxsmm_MOD_libxsmm_otrans_p0'<br />/usr/bin/ld: warning: creating DT_TEXTREL in a PIE<br />collect2: error: ld returned 1 exit status<br />make[2]: *** [src/programs/CMakeFiles/gmx.dir/build.make:101: bin/gmx_d] Error 1<br />make[1]: *** [CMakeFiles/Makefile2:7251: src/programs/CMakeFiles/gmx.dir/all] Error 2<br />make: *** [Makefile:166: all] Error 2</div><div><br /></div><div>Will appreciate all the help I can get! </div><div><br /></div><div>Best regards,</div><div>Jonas </div><div><br /></div><div><br /></div><div><br /></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "cp2k" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br />
To view this discussion visit <a href="https://groups.google.com/d/msgid/cp2k/41fb67d1-7dc7-475b-b3e5-9c217cd71fe5n%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/41fb67d1-7dc7-475b-b3e5-9c217cd71fe5n%40googlegroups.com</a>.<br />