本人使用的是Ubuntuxit
Linux test 5.4.0-94-generic #106-Ubuntu SMP Thu Jan 6 23:58:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
使用sob的教程先安装了9.1版本的cp2k,测试能够正常运行。
编译cp2k时,首先执行make -j ARCH=local VERSION="ssmp psmp" ,再执行 make -j ARCH=local VERSION="ssmp psmp" libcp2k
测试cp2k安装成功。
之后解压Gromacs-22安装包
mkdir build cd build cmake .. -DBUILD_SHARED_LIBS=OFF -DGMXAPI=OFF -DGMX_INSTALL_NBLIB_API=OFF -DGMX_DOUBLE=ON -DGMX_CP2K=ON -DCP2K_DIR=/home/test/soft/cp2k-9.1/lib/local/psmp -DGMX_FFT_LIBRARY=fftw3 -DFFTWF_LIBRARY=/home/test/soft/cp2k-9.1/tools/toolchain/install/fftw-3.3.10/lib -DFFTWF_INCLUDE_DIR=/home/test/soft/cp2k-9.1/tools/toolchain/install/fftw-3.3.10/include -DGMX_BLAS_USER=/home/test/soft/cp2k-9.1/tools/toolchain/install/openblas-0.3.19/lib/libopenblas.a -DGMX_LAPACK_USER=/home/test/soft/cp2k-9.1/tools/toolchain/install/scalapack-2.1.0/lib/libscalapack.a -DGMX_MPI=ON -DCP2K_LINKER_FLAGS="-Wl,--enable-new-dtags -pthread -L'/home/test/soft/cp2k-9.1/tools/toolchain/install/elpa-2021.11.001/cpu/lib' -L'/home/test/soft/cp2k-9.1/tools/toolchain/install/fftw-3.3.10/lib' -L'/home/test/soft/cp2k-9.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/lib' -L'/home/test/soft/cp2k-9.1/tools/toolchain/install/libxc-5.1.7/lib' -L'/home/test/soft/cp2k-9.1/tools/toolchain/install/libxsmm-1.17/lib' -L'/home/test/soft/cp2k-9.1/tools/toolchain/install/scalapack-2.1.0/lib' -L'/home/test/soft/cp2k-9.1/tools/toolchain/install/elpa-2021.11.001/cpu/lib' -lelpa_openmp -lscalapack -lxsmmf -lxsmm -ldl -lpthread -lxcf03 -lxc -lint2 -lfftw3_mpi -lfftw3 -lfftw3_omp -lmpi -lopenblas -lstdc++ " -DCMAKE_INSTALL_PREFIX=/home/test/soft/gromacs-2022
上一步也没有报错 -- Performing Test HAVE_NO_DEPRECATED_COPY -- Performing Test HAVE_NO_DEPRECATED_COPY - Success -- Performing Test HAS_WARNING_EVERYTHING -- Performing Test HAS_WARNING_EVERYTHING - Failed -- Performing Test HAS_NO_STRINGOP_TRUNCATION -- Performing Test HAS_NO_STRINGOP_TRUNCATION - Success -- Performing Test HAS_NO_REDUNDANT_MOVE -- Performing Test HAS_NO_REDUNDANT_MOVE - Success -- Performing Test HAS_NO_UNUSED -- Performing Test HAS_NO_UNUSED - Success -- Performing Test HAS_NO_UNUSED_PARAMETER -- Performing Test HAS_NO_UNUSED_PARAMETER - Success -- Performing Test HAS_NO_MISSING_DECLARATIONS -- Performing Test HAS_NO_MISSING_DECLARATIONS - Success -- Performing Test HAS_NO_NULL_CONVERSIONS -- Performing Test HAS_NO_NULL_CONVERSIONS - Success -- Looking for inttypes.h -- Looking for inttypes.h - found -- Configuring done -- Generating done
make -j 224
[100%] Linking CXX static library ../../lib/libgromacs_mpi_d.a
[100%] Built target libgromacs
[100%] Linking CXX executable ../../bin/gmx_mpi_d
/usr/bin/ld: /home/test/soft/cp2k-9.1/lib/local/psmp/libcp2k.a(space_groups.o): in function `__space_groups_MOD_spgr_create':
/home/test/soft/cp2k-9.1/src/motion/space_groups.F:229: undefined reference to `spg_get_international'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/motion/space_groups.F:238: undefined reference to `spg_get_multiplicity'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/motion/space_groups.F:245: undefined reference to `spg_get_symmetry'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/motion/space_groups.F:248: undefined reference to `spg_get_schoenflies'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/motion/space_groups.F:256: undefined reference to `spg_get_pointgroup'
/usr/bin/ld: /home/test/soft/cp2k-9.1/lib/local/psmp/libcp2k.a(cryssym.o): in function `__cryssym_MOD_kpoint_gen':
/home/test/soft/cp2k-9.1/src/cryssym.F:281: undefined reference to `spg_get_ir_reciprocal_mesh'
/usr/bin/ld: /home/test/soft/cp2k-9.1/lib/local/psmp/libcp2k.a(cryssym.o): in function `__cryssym_MOD_crys_sym_gen':
/home/test/soft/cp2k-9.1/src/cryssym.F:161: undefined reference to `spg_get_major_version'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/cryssym.F:162: undefined reference to `spg_get_minor_version'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/cryssym.F:163: undefined reference to `spg_get_micro_version'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/cryssym.F:170: undefined reference to `spg_get_international'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/cryssym.F:175: undefined reference to `spg_get_multiplicity'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/cryssym.F:179: undefined reference to `spg_get_symmetry'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/cryssym.F:182: undefined reference to `spg_get_schoenflies'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/cryssym.F:187: undefined reference to `spg_get_pointgroup'
/usr/bin/ld: /home/test/soft/cp2k-9.1/lib/local/psmp/libcp2k.a(voronoi_interface.o): in function `__voronoi_interface_MOD_entry_voronoi_or_bqb':
/home/test/soft/cp2k-9.1/src/voronoi_interface.F:420: undefined reference to `libvori_setPrefix_Voronoi'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:421: undefined reference to `libvori_setRefinementFactor'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:422: undefined reference to `libvori_setVoronoiSkipFirst'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:423: undefined reference to `libvori_setVoriOverwrite'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:424: undefined reference to `libvori_setEMPOutput'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:474: undefined reference to `libvori_setGrid'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:499: undefined reference to `libvori_pushAtoms'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:551: undefined reference to `libvori_push_rho_zrow'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:589: undefined reference to `libvori_setRadii_User'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:426: undefined reference to `libvori_setPrefix_BQB'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:430: undefined reference to `libvori_setBQBFilename'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:431: undefined reference to `libvori_setBQBParmString'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:575: undefined reference to `libvori_setRadii_Unity'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:604: undefined reference to `libvori_step'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:619: undefined reference to `libvori_get_radius'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:621: undefined reference to `libvori_get_charge'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:623: undefined reference to `libvori_get_volume'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:626: undefined reference to `libvori_get_dipole'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:631: undefined reference to `libvori_get_quadrupole'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:636: undefined reference to `libvori_get_wrapped_pos'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:641: undefined reference to `libvori_get_charge_center'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:692: undefined reference to `libvori_processBQBFrame'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:444: undefined reference to `libvori_setBQBOptimization'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:445: undefined reference to `libvori_setBQBHistory'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:446: undefined reference to `libvori_setBQBSkipFirst'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:447: undefined reference to `libvori_setBQBCheck'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:448: undefined reference to `libvori_setBQBOverwrite'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:449: undefined reference to `libvori_setBQBStoreStep'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:596: undefined reference to `libvori_sanitycheck'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:578: undefined reference to `libvori_setRadii_Covalent'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/voronoi_interface.F:581: undefined reference to `libvori_setRadii_User'
/usr/bin/ld: /home/test/soft/cp2k-9.1/lib/local/psmp/libcp2k.a(voronoi_interface.o): in function `__voronoi_interface_MOD_finalize_libvori':
/home/test/soft/cp2k-9.1/src/voronoi_interface.F:749: undefined reference to `libvori_finalize'
/usr/bin/ld: /home/test/soft/cp2k-9.1/lib/local/psmp/libcp2k.a(metadynamics.o): in function `__metadynamics_MOD_metadyn_integrator':
/home/test/soft/cp2k-9.1/src/metadynamics.F:299: undefined reference to `plumed_gcmd'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/metadynamics.F:300: undefined reference to `plumed_gcmd'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/metadynamics.F:301: undefined reference to `plumed_gcmd'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/metadynamics.F:302: undefined reference to `plumed_gcmd'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/metadynamics.F:303: undefined reference to `plumed_gcmd'
/usr/bin/ld: /home/test/soft/cp2k-9.1/lib/local/psmp/libcp2k.a(metadynamics.o):/home/test/soft/cp2k-9.1/src/metadynamics.F:304: more undefined references to `plumed_gcmd' follow
/usr/bin/ld: /home/test/soft/cp2k-9.1/lib/local/psmp/libcp2k.a(metadynamics.o): in function `__metadynamics_MOD_metadyn_finalise_plumed':
/home/test/soft/cp2k-9.1/src/metadynamics.F:208: undefined reference to `plumed_gfinalize'
/usr/bin/ld: /home/test/soft/cp2k-9.1/lib/local/psmp/libcp2k.a(metadynamics.o): in function `__metadynamics_MOD_metadyn_initialise_plumed':
/home/test/soft/cp2k-9.1/src/metadynamics.F:166: undefined reference to `plumed_installed'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/metadynamics.F:171: undefined reference to `plumed_gcreate'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/metadynamics.F:172: undefined reference to `plumed_gcmd'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/metadynamics.F:173: undefined reference to `plumed_gcmd'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/metadynamics.F:174: undefined reference to `plumed_gcmd'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/metadynamics.F:175: undefined reference to `plumed_gcmd'
/usr/bin/ld: /home/test/soft/cp2k-9.1/src/metadynamics.F:176: undefined reference to `plumed_gcmd'
/usr/bin/ld: /home/test/soft/cp2k-9.1/lib/local/psmp/libcp2k.a(metadynamics.o):/home/test/soft/cp2k-9.1/src/metadynamics.F:177: more undefined references to `plumed_gcmd' follow
collect2: error: ld returned 1 exit status
make[2]: *** [src/programs/CMakeFiles/gmx.dir/build.make:107: bin/gmx_mpi_d] Error 1
make[1]: *** [CMakeFiles/Makefile2:6082: src/programs/CMakeFiles/gmx.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
出现如上错误,我认为是/usr/bin/ld 下面的一个动态库出现了问题,请各位老师给与帮助,谢谢。
|