计算化学公社
标题: CP2K-7.1编译出错:vdwxc_init_mpi - not found [打印本页]
作者Author: haibeih 时间: 2020-8-30 11:52
标题: CP2K-7.1编译出错:vdwxc_init_mpi - not found
大家好,最近在编译cp2k-7.1遇到一些问题,希望得到大家帮助!
我是根据刘老师 https://www.bilibili.com/video/BV1Y54y1e7Yx 的视频一步一步来编译的,系统是Centos8 (Linux version 4.18.0-193.14.2.el8_2.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)))。gcc,g++, gfortran版本都是官网推荐的8.3.1。利用install_cp2k_toolchain.sh这个脚本来编译:
./install_cp2k_toolchain.sh \
--math-mode=mkl \
--with-openmpi=install \
--with-scalapack=no
但是到了安装SIRIUS的时候报错:
==================== Installing SIRIUS ====================
sirius_6.4.1.tar.gz is found
Installing from scratch into /opt/cp2k-7.1/tools/toolchain/install/sirius-6.4.1
ERROR: (./scripts/install_sirius.sh, line 130) Non-zero exit code detected.
...
*.log等重要输出文件已经上传,看起来好像是找不到vdwxc_init_mpi的问题,不知道怎么解决。
这是compile.log的最后一部分:
...
-- Checking for one of the modules 'elpa;elpa_openmp'
-- Found Elpa: /opt/cp2k-7.1/tools/toolchain/install/elpa-2019.05.001/lib/libelpa.a
-- Checking for one of the modules 'libvdwxc>=0.3.0'
-- Looking for vdwxc_init_mpi
-- Looking for vdwxc_init_mpi - not found
CMake Error at /opt/cp2k-7.1/tools/toolchain/install/cmake-3.15.1/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find LibVDWXC (missing: LIBVDWXC_LIBRARIES) (Required is at least
version "0.3.0")
Call Stack (most recent call first):
/opt/cp2k-7.1/tools/toolchain/install/cmake-3.15.1/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindLibVDWXC.cmake:35 (find_package_handle_standard_args)
CMakeLists.txt:198 (find_package)
...
这是CMakeError.log的最后输出:
...
Linking C executable cmTC_1450c
/opt/cp2k-7.1/tools/toolchain/install/cmake-3.15.1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1450c.dir/link.txt --verbose=1
/opt/cp2k-7.1/tools/toolchain/install/openmpi-4.0.1/bin/mpicc -O2 -ftree-vectorize -g -fno-omit-frame-pointer -march=native -m64 CMakeFiles/cmTC_1450c.dir/CheckSymbolExists.c.o -o cmTC_1450c
CMakeFiles/cmTC_1450c.dir/CheckSymbolExists.c.o: In function `main':
/opt/cp2k-7.1/tools/toolchain/build/SIRIUS-6.4.1/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: undefined reference to `vdwxc_init_mpi'
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_1450c.dir/build.make:87: cmTC_1450c] Error 1
gmake[1]: Leaving directory '/opt/cp2k-7.1/tools/toolchain/build/SIRIUS-6.4.1/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_1450c/fast] Error 2
File /opt/cp2k-7.1/tools/toolchain/build/SIRIUS-6.4.1/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include </opt/cp2k-7.1/tools/toolchain/install/libvdwxc-0.4.0/include/vdwxc_mpi.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef vdwxc_init_mpi
return ((int*)(&vdwxc_init_mpi))[argc];
#else
(void)argc;
return 0;
#endif
}
本人新手,如果还需要提供什么资料请告知~谢谢大家了!
作者Author: nicheal 时间: 2020-9-2 10:26
Checking for one of the modules 'libvdwxc>=0.3.0'
没找到libvdwxc这个包, --with-libvdwxc=yes
不过还是建议不装sirius --with-sirius=no
作者Author: haibeih 时间: 2020-9-2 15:16
谢谢你啊,按照你的方法 (--with-sirius=no \ --with-libvdwxc=install)试了下,虽然通过编译,但是测试cp2k却是失败的:
我在toolchain\里面输入:
cp /opt/cp2k-7.1/tools/toolchain/install/arch/* ../../arch/
source /opt/cp2k-7.1/tools/toolchain/install/setup
然后回到cp2k目录,依次输入:
make -j 112 ARCH=local VERSION="popt psmp"
make -j 112 ARCH=local VERSION="popt psmp" test
结果是完全失败的
:
--------------------------------- Summary --------------------------------
Number of FAILED tests 2789
Number of FAILED tests 2789
Number of WRONG tests 0
Number of WRONG tests 0
Number of CORRECT tests 0
Number of CORRECT tests 0
Number of NEW tests 0
Number of NEW tests 0
Total number of tests 2789
GREPME 2789 0 0 0 2789 X
Total number of tests 2789
GREPME 2789 0 0 0 2789 X
Summary: correct: 0 / 2789; failed: 2789; 0min
Status: FAILED
--------------------------------------------------------------------------
Regtest took 29.00 seconds.
--------------------------------------------------------------------------
Summary: correct: 0 / 2789; failed: 2789; 0min
Status: FAILED
--------------------------------------------------------------------------
我编译的完整命令是:
./install_cp2k_toolchain.sh \
--math-mode=mkl \
--with-openmpi=install \
--with-scalapack=no \
--with-ptscotch=install \
--with-parmetis=install \
--with-metis=install \
--with-superlu=install \
--with-pexsi=install \
--with-quip=install \
--with-plumed=install \
--with-sirius=no \
--with-libvdwxc=install
感觉这个sirius很重要的~
作者Author: nicheal 时间: 2020-9-5 19:56
如果所有的测试都失败,通常不是cp2k的问题,你看看是不是在root下面运行的啊,如果是,openmpi在root下运行会直接出错.
修改tools/regtesting/do_regtest的24行
mpiexec="mpiexec --allow-run-as-root --bind-to none"
作者Author: nicheal 时间: 2020-9-5 19:58
本帖最后由 nicheal 于 2020-9-5 20:00 编辑
https://www.bilibili.com/read/cv7375723
关于编译,可以看看这一些帖子
作者Author: haibeih 时间: 2020-9-6 09:04
非常感谢你的帮助,按照你的要求试了下,编译成功了,但是测试仍然有很多失败,主要是并行运算的原因:
Summary of the regression tester run from 2020-09-04_23-09-23 using local popt
Number of FAILED tests 594
Number of WRONG tests 104
Number of CORRECT tests 2570
Number of NEW tests 7
Total number of tests 3275
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.
NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
EXIT CODE: 1 MEANING: RUNTIME FAIL
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
我用是mpirun (Open MPI) 4.0.2版本,不知道是不是版本的原因呢?
作者Author: haibeih 时间: 2020-9-14 08:24
问题已解决,编译器版本的问题~大家一定要按照推荐版本编译,祝好!
作者Author: 美式加糖 时间: 2020-9-15 10:25
想问下,请问你换到了哪一个版本的GCC?
作者Author: haibeih 时间: 2020-9-15 11:02
官网推荐的9.3~另外也建议用Centos7吧,Centos8目前编译出来还是有些错误
作者Author: 美式加糖 时间: 2020-9-15 15:11
好的,谢谢。我这边是centos 7.4和gcc9.3.0,但是在编译的时候出现报错还没解决。请问一下,你用的mkl是什么版本的
作者Author: haibeih 时间: 2020-9-16 08:03
你是什么错误啊,关于什么的报错?
我是2020版本的mkl(https://software.intel.com/conte ... ython-yum-repo.html),输入命令:
yum install intel-mkl-2020.0-088
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64 ilp64
你的python也是gcc9.3.0编译的吗?若果不是也会有问题~
作者Author: 美式加糖 时间: 2020-9-17 16:15
你好。我这里的报错是在最后cp2k编译阶段,我设置了mkl2015版,但是最后不知为何会去调用atlas-math。atlas-math要使用libgfortran.s.o.3,但是gcc-9.3已经更新到.5版本了,导致产生冲突报错。详情我也有发帖,但应该不是普遍问题,我正在尝试解决
我使用的python是用anaconda配置的,但好像目前问题不是出在这里。
作者Author: haibeih 时间: 2020-9-17 17:09
刚刚看了你的贴子,有些不成熟的建议:
(1)你试过mkl-2020吗?
(2)你的gcc,g++,和gfortran版本一致吗(输入gcc -v; g++ -v; gfortran -v)
(3)觉得这种报错很可能是编译器的问题,建议你重新下载个python(https://www.python.org/downloads/release/python-385/),用gcc编译并且设置路径,然后再去编译cp2k。
我觉得重新来一遍比你纠结这个libgfortran.so.5的问题容易,因为即使你现在编译通过,我敢保证你接下来的tests肯定不理想。
作者Author: 美式加糖 时间: 2020-9-18 08:57
好的,非常感谢。
我昨天晚上也装好了mkl-2020,gcc我这边三个版本是可以确定的,都是9.3.0,python我也准备自己手动装一下
作者Author: gog 时间: 2020-11-11 16:34
本帖最后由 gog 于 2020-11-11 22:15 编辑
谢谢各位大神。编译成功,没有plumed组件。该是够用了。
介绍下编译环境:
redhat 7,mkl-2020.4,devtool-9,显示是gcc-9.3
cmake-3.18.4,用官网提供编译好的二进制程序,路径加载就可以了,不用重新编译cmake。OpenMPI4.0.5,编译的时候,设置很多参数,具体configure帮助查看和设置。
ubuntu 18.4,gcc-7.5编译,也是没有plumed组件
详细查看了local.popt代码:popt不带第一性原理计算模块,psmp带有,但make时候,无法编译出来。
后面空了安排时间,尝试gnu+gcc+scalapack编译看。
作者Author: haibeih 时间: 2020-11-12 17:02
谢谢你提供的数据,祝科研顺利!
作者Author: flwboka 时间: 2020-11-13 09:39
似乎conda里面已经有7.1版的cp2k了 https://anaconda.org/conda-forge/cp2k
作者Author: gog 时间: 2020-11-13 20:43
本帖最后由 gog 于 2020-11-15 09:11 编辑
是用gnu+openblas+scalapcak编译的。centos 7上默认安装6.1。据此推,centos 8上,该是7.1版本。
喜欢用mkl的,咋办?
作者Author: bblovelp 时间: 2020-11-15 19:26
您好 我参考https://www.bilibili.com/read/cv7375723 CP2K也编译好了 ,第一次运行也成功了,重启后再次测试就出现所有测试全部失败,请问下您遇到过这种情况吗?
作者Author: gog 时间: 2020-11-16 21:40
不建议在root用户下安装。自行编译好openmpi和cmake,普通用户权限下toolchain安装
作者Author: bblovelp 时间: 2020-11-18 21:31
好的,我明天试下,感谢您了
作者Author: Siling_S 时间: 2020-11-28 19:20
我编译的时候用的是9.3.1,这个版本可以吗?主要是不太清楚官网指的9.3是否包括9.3.1.。。
作者Author: haibeih 时间: 2020-11-29 09:20
你可以试试,但是如果报错的话,记得有可能是编译器的错误~
作者Author: Siling_S 时间: 2020-11-29 15:33
在编译的时候,cmake一直会有error.log文件,然后sirius编译应该是需要依赖cmake,也会有error.log文件,最终CP2K的编译会报错,原因可能是sirius编译有问题,我换一下gcc试试吧~多谢指点
作者Author: haibeih 时间: 2020-11-30 08:53
另外,也可能和系统版本有关系,我用centos7就一遍过,test run一个问题都没有~但是centos8就会有不少问题(比如我就是编译不过sirius,所以就没装它)。估计Ubuntu系统也会有类似问题。
所以系统和编译器版本等的兼容性是cp2k编译的最大问题,编译流程跟着教程学就好,没什么问题。
作者Author: gog 时间: 2020-12-11 17:29
centos 7默认版本python 2.7.* 安装好就可以。
作者Author: gog 时间: 2020-12-11 17:33
cmake自己编译,报错的可能性很高。直接下载官网3.18版本的二进制可执行版本,设置好路径就成了。3.18.4最好,测试全部通过,3.18.5,几千个测试算例,有四五个报错。
作者Author: Siling_S 时间: 2020-12-16 10:50
后来参考了b站的一个回复只编译了popt就成功了,再单独编译psmp还是不成,一样的报错,可能是某个前置文件的问题,linux了解的很浅找不到问题,只能先用popt练练了,感谢楼主交流~
作者Author: gog 时间: 2020-12-18 21:25
实在是没法的话,就用gcc和gnu用默认数学库编译,能满足早期学习需求,足够了。
作者Author: leeru 时间: 2020-12-19 19:55
我个人感觉,cp2k 编译sirius进行纯平面波计算没啥优势,直接用qe不香吗?如果不好好利用高斯平面波的特点,用cp2k就是多此一举。
作者Author: gog 时间: 2020-12-20 21:33
高斯方法,学习难度有点大。
作者Author: xuanzi 时间: 2021-4-21 19:16
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.
NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
想问下,怎么解决的,这个问题,谢谢
| 欢迎光临 计算化学公社 (http://bbs.keinsci.com/) |
Powered by Discuz! X3.3 |