计算化学公社

标题: 求助:gromacs和cp2k联合编译,到100%处报错无法解决 [打印本页]

作者
Author:
aw10279    时间: 2023-7-20 19:36
标题: 求助:gromacs和cp2k联合编译,到100%处报错无法解决
本帖最后由 aw10279 于 2023-7-20 20:27 编辑

我参考了Gromacs与cp2k联动使用plumed做QM/MM增强采样 - 分子模拟 (Molecular Modeling) - 计算化学公社 (keinsci.com)分享:安装plumed+cp2k+gromacs时遇到的一些坑 - 分子模拟 (Molecular Modeling) - 计算化学公社 (keinsci.com)这两个教程,在WSL下对gromacs-2023和cp2k-2023.1进行编译,在编译到100%处出现大量报错如下(部分)。看提示好像和MPI与modules有关,但我已经提前安装好了MPICH、OPENMPI和modules,不知道还有什么问题没注意到。我换用版本低一些的gromacs2022和cp2k2022也还是出现这些报错。如果哪位大佬解决过这种报错,麻烦告知下解决方法,已经折腾N天快崩溃了,不胜感激!!

我编译gromacs的命令参数:cmake .. -DCMAKE_INSTALL_PREFIX=/home/fyy/softwares/gmx_qm_gpu -DBUILD_SHARED_LIBS=OFF -DGMXAPI=OFF -DGMX_INSTALL_NBLIB_API=OFF -DGMX_FFT_LIBRARY=fftw3 -DGMX_SIMD=AVX2_256 -DGMX_DOUBLE=ON -DGMX_CP2K=ON -DCP2K_DIR=/home/fyy/soft/cp2k-2023.1/lib/local/psmp -DCP2K_LINKER_FLAGS="-Wl,--enable-new-dtags -pthread -L/usr/lib/x86_64-linux-gnu/openmpi/lib     -L'/home/fyy/soft/cp2k-2023.1/tools/toolchain/install/fftw-3.3.10/lib' -Wl,-rpath,'/home/fyy/soft/cp2k-2023.1/tools/toolchain/install/fftw-3.3.10/lib' -L'/home/fyy/soft/cp2k-2023.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/lib' -L'/home/fyy/soft/cp2k-2023.1/tools/toolchain/install/libxc-6.0.0/lib' -Wl,-rpath,'/home/fyy/soft/cp2k-2023.1/tools/toolchain/install/libxc-6.0.0/lib' -L'/home/fyy/soft/cp2k-2023.1/tools/toolchain/install/libxsmm-1.17/lib' -Wl,-rpath,'/home/fyy/soft/cp2k-2023.1/tools/toolchain/install/libxsmm-1.17/lib' -L'/home/fyy/soft/cp2k-2023.1/tools/toolchain/install/scalapack-2.2.1/lib' -Wl,-rpath,'/home/fyy/soft/cp2k-2023.1/tools/toolchain/install/scalapack-2.2.1/lib' -L'/usr/local/plumed2.90/lib' -Wl,-rpath,'/usr/local/plumed2.90/lib' -lplumed -ldl -lstdc++ -lz -ldl -lscalapack -lxsmmf -lxsmm -ldl -lpthread -lxcf03 -lxc -lint2 -lfftw3_mpi -lfftw3 -lfftw3_omp   -lmpi_cxx -lmpi  -lopenblas -lstdc++" -DGMX_BUILD_OWN_FFTW=ON(不论用系统的fftw还是自建fftw,都一样报错)


[100%] Building CXX object src/programs/CMakeFiles/gmx_objlib.dir/gmx.cpp.o
[100%] Building CXX object src/programs/CMakeFiles/gmx_objlib.dir/legacymodules.cpp.o
[100%] Built target gmx_objlib
[100%] Linking CXX executable ../../bin/gmx_d
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o): in function `__message_passing_MOD_mp_stop':
/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.F:1166: undefined reference to `mpi_error_string_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o): in function `__message_passing_MOD_mp_iallgatherv_iv_internal.constprop.0':
/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.fypp:2609: undefined reference to `mpi_iallgatherv_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o): in function `__message_passing_MOD_mp_iallgatherv_lv_internal.constprop.0':
/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.fypp:2609: undefined reference to `mpi_iallgatherv_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o): in function `__message_passing_MOD_mp_iallgatherv_dv_internal.constprop.0':
/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.fypp:2609: undefined reference to `mpi_iallgatherv_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o): in function `__message_passing_MOD_mp_iallgatherv_rv_internal.constprop.0':
/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.fypp:2609: undefined reference to `mpi_iallgatherv_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o): in function `__message_passing_MOD_mp_iallgatherv_zv_internal.constprop.0':
/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.fypp:2609: undefined reference to `mpi_iallgatherv_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o):/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.fypp:2609: more undefined references to `mpi_iallgatherv_' follow
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o): in function `__message_passing_MOD_mp_type_make_c':
/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.fypp:3974: undefined reference to `mpi_get_address_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o): in function `__message_passing_MOD_mp_file_read_at_all_c':
/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.fypp:3942: undefined reference to `mpi_file_read_at_all_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o): in function `__message_passing_MOD_mp_file_read_at_all_cv':
/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.fypp:3917: undefined reference to `mpi_file_read_at_all_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o): in function `__message_passing_MOD_mp_file_write_at_all_c':
/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.fypp:3827: undefined reference to `mpi_file_write_at_all_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o): in function `__message_passing_MOD_mp_file_write_at_all_cv':
/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.fypp:3802: undefined reference to `mpi_file_write_at_all_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o): in function `__message_passing_MOD_mp_file_write_at_c':
/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.fypp:3770: undefined reference to `mpi_file_write_at_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o): in function `__message_passing_MOD_mp_file_write_at_cv':
/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.fypp:3745: undefined reference to `mpi_file_write_at_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o): in function `__message_passing_MOD_mp_deallocate_c':
/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.fypp:4041: undefined reference to `mpi_free_mem_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/libcp2k.a(message_passing.o): in function `__message_passing_MOD_mp_allocate_c':
/home/fyy/soft/cp2k-2023.1/src/mpiwrap/message_passing.fypp:4007: undefined reference to `mpi_type_size_'
..........
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/exts/dbcsr/libdbcsr.a(dbcsr_mpiwrap.o): in function `__dbcsr_mpiwrap_MOD_mp_abort':
/home/fyy/soft/cp2k-2023.1/exts/dbcsr/src/mpi/dbcsr_mpiwrap.F:730: undefined reference to `mpi_abort_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/exts/dbcsr/libdbcsr.a(dbcsr_mpiwrap.o): in function `__dbcsr_mpiwrap_MOD_mp_world_finalize':
/home/fyy/soft/cp2k-2023.1/exts/dbcsr/src/mpi/dbcsr_mpiwrap.F:531: undefined reference to `mpi_barrier_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/exts/dbcsr/src/mpi/dbcsr_mpiwrap.F:526: undefined reference to `mpi_finalize_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/exts/dbcsr/libdbcsr.a(dbcsr_mpiwrap.o): in function `__dbcsr_mpiwrap_MOD_mp_reordering':
/home/fyy/soft/cp2k-2023.1/exts/dbcsr/src/mpi/dbcsr_mpiwrap.F:480: undefined reference to `mpi_comm_group_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/exts/dbcsr/src/mpi/dbcsr_mpiwrap.F:504: undefined reference to `mpi_group_incl_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/exts/dbcsr/src/mpi/dbcsr_mpiwrap.F:480: undefined reference to `mpi_comm_create_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/exts/dbcsr/src/mpi/dbcsr_mpiwrap.F:480: undefined reference to `mpi_group_free_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/exts/dbcsr/src/mpi/dbcsr_mpiwrap.F:480: undefined reference to `mpi_group_free_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/lib/local/psmp/exts/dbcsr/libdbcsr.a(dbcsr_mpiwrap.o): in function `__dbcsr_mpiwrap_MOD_mp_world_init':
/home/fyy/soft/cp2k-2023.1/exts/dbcsr/src/mpi/dbcsr_mpiwrap.F:460: undefined reference to `mpi_comm_set_errhandler_'
/usr/bin/ld: /home/fyy/soft/cp2k-2023.1/exts/dbcsr/src/mpi/dbcsr_mpiwrap.F:453: undefined reference to `mpi_init_thread_'
collect2: error: ld returned 1 exit status
make[2]: *** [src/programs/CMakeFiles/gmx.dir/build.make:95: bin/gmx_d] Error 1
make[1]: *** [CMakeFiles/Makefile2:5782: src/programs/CMakeFiles/gmx.dir/all] Error 2
make: *** [Makefile:166: all] Error 2



作者
Author:
jyxsdj    时间: 2024-8-25 12:56
这是很么原因啊,解决了吗?
作者
Author:
wakakasa    时间: 2024-8-25 13:45
mpi问题吧,可能是版本不符




欢迎光临 计算化学公社 (http://bbs.keinsci.com/) Powered by Discuz! X3.3