计算化学公社

 找回密码 Forget password
 注册 Register
Views: 786|回复 Reply: 7
打印 Print 上一主题 Last thread 下一主题 Next thread

[CP2K] cp2k2024.3运行异常中断

[复制链接 Copy URL]

6

帖子

0

威望

23

eV
积分
29

Level 2 能力者

跳转到指定楼层 Go to specific reply
楼主
本帖最后由 NeedleCandy 于 2024-12-16 10:53 编辑

背景:版本cp2k-2024.3,用openmp编译的时候注释掉了bashrc的intel mpi,编译完成后取消了注释。

slurm提交作业加了source /data/app_install/cp2k-2024.3/tools/toolchain/install/setup来加载openmp,用官网的exercise测试,奇怪的是迭代了两次就中断了,out文件直接中断无报错,err文件显示:prterun noticed that process rank 15 with PID 3037136 on node dell-PowerEdge-R750 exited on signal 11 (Segmentation fault).

尝试直接在命令栏mpirun -np 64 cp2k.popt in.inp |tee cp2k.out以及注释掉slurm文件里的source /data/app_install/cp2k-2024.3/tools/toolchain/install/setup都可以顺利运行,但是err文件也有内容,且out文件每个部分都会被反复打印,很怪,导致文件很大无法作为附件上传。

ps:又试了一些别的test,发现有的测试两种方法都能运行,openmp运行会快很多很多;有的测试只有一种mpirun可以运行,用intel mpi运行的输出文件都很大很颠,openmp莫名奇妙中断。

感谢各位的解答,相关文件见附件。






in.inp

1.63 KB, 下载次数 Times of downloads: 10

输入文件

cp2k.slurm

343 Bytes, 下载次数 Times of downloads: 2

slurm脚本

cp2k_test_openmp.err

51.27 KB, 下载次数 Times of downloads: 2

openmp运行的报错

cp2k_test_openmp.out

59.39 KB, 下载次数 Times of downloads: 2

openmp运行的out文件

cp2k_test_intel.err

16.76 KB, 下载次数 Times of downloads: 0

intelmpi运行的报错

H2O.xyz

90 Bytes, 下载次数 Times of downloads: 3

坐标文件

123

帖子

0

威望

1554

eV
积分
1677

Level 5 (御坂)

2#
发表于 Post on 2024-12-16 10:26:48 | 只看该作者 Only view this author
无法帮你测试,因为你没给H2O.xyz,不过你可是试试换更少一些核心来计算看看

6

帖子

0

威望

23

eV
积分
29

Level 2 能力者

3#
 楼主 Author| 发表于 Post on 2024-12-16 10:52:44 | 只看该作者 Only view this author
1138711019 发表于 2024-12-16 10:26
无法帮你测试,因为你没给H2O.xyz,不过你可是试试换更少一些核心来计算看看

感谢回复,用6核出现相同中断,坐标文件加在附件了

123

帖子

0

威望

1554

eV
积分
1677

Level 5 (御坂)

4#
发表于 Post on 2024-12-16 11:42:26 | 只看该作者 Only view this author
NeedleCandy 发表于 2024-12-16 10:52
感谢回复,用6核出现相同中断,坐标文件加在附件了

测试完全没问题,5步就跑完了。

894

帖子

3

威望

1685

eV
积分
2639

Level 5 (御坂)

傻傻的木瓜

5#
发表于 Post on 2024-12-16 14:32:15 | 只看该作者 Only view this author
我也折腾过slurm集群上编译CP2K的事情。“用openmp编译的时候注释掉了bashrc的intel mpi”听起来是修改的登陆节点上用户的.bashrc,并不足以保证编译环境合理,而且提交任务到计算节点的时候那边的.bashrc很可能与用户的.bashrc不一致。“out文件每个部分都会被反复打印”就是任务并行失败的症状。

编译之前应当先用module avail查询集群上已配置好的编译器和MPI模块、用module list检查当前已加载的模块,适当用module load和module unload加载/卸载模块,然后用which指令确认编译器(Intel的icc、icpc、ifort指令或者GCC的gcc、g++、gfortran指令)和MPI(mpirun指令)的路径、用各指令的--version选项确认版本,再安装工具链、编译CP2K。工具链安装完毕后产生的local.psmp在开头会写明依赖的编译器和MPI,参考http://bbs.keinsci.com/thread-49409-1-1.html从4楼开始的讨论。这样编译好CP2K后,提交任务的脚本也必须带着同样的module load和module unload指令,再source那个setup、export那个PATH,最后用srun(而不是自己的mpirun)运行cp2k.psmp。
√546=23.36664289109

32

帖子

0

威望

124

eV
积分
156

Level 3 能力者

6#
发表于 Post on 2024-12-16 15:42:30 | 只看该作者 Only view this author
Uus/pMeC6H4-/キ 发表于 2024-12-16 14:32
我也折腾过slurm集群上编译CP2K的事情。“用openmp编译的时候注释掉了bashrc的intel mpi”听起来是修改的登 ...

我用了社长的编译方法,前面没什么问题,但是到了elpa还是会出错==================== Installing ELPA ====================
wget  --quiet https://www.cp2k.org/static/downloads/elpa-2024.03.001.tar.gz
elpa-2024.03.001.tar.gz: OK
Checksum of elpa-2024.03.001.tar.gz Ok
Installing from scratch into /data0/software/cp2k/cp2k-2024.3/tools/toolchain/install/elpa-2024.03.001/cpu
/usr/bin/env: python3: No such file or directory
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for build time... 1734334357
checking for GNU make... make
checking whether in C interface the error argument should be optional... no
checking for GNU make... make
checking whether --enable-openmp is specified... yes
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C++... yes
checking whether /data0/software/cp2k/cp2k-2024.3/tools/toolchain/install/openmpi-5.0.5/bin/mpicxx accepts -g... yes
checking for /data0/software/cp2k/cp2k-2024.3/tools/toolchain/install/openmpi-5.0.5/bin/mpicxx option to enable C++11 features... none needed
checking whether make supports the include directive... yes (GNU style)
checking dependency style of /data0/software/cp2k/cp2k-2024.3/tools/toolchain/install/openmpi-5.0.5/bin/mpicxx... gcc3
checking whether /data0/software/cp2k/cp2k-2024.3/tools/toolchain/install/openmpi-5.0.5/bin/mpicxx supports C++17 features by default... no
checking whether /data0/software/cp2k/cp2k-2024.3/tools/toolchain/install/openmpi-5.0.5/bin/mpicxx supports C++17 features with -std=gnu++17... yes
checking whether to compile using MPI... yes
checking for gcc... /data0/software/cp2k/cp2k-2024.3/tools/toolchain/install/openmpi-5.0.5/bin/mpicc
checking whether the compiler supports GNU C... yes
checking whether /data0/software/cp2k/cp2k-2024.3/tools/toolchain/install/openmpi-5.0.5/bin/mpicc accepts -g... yes
checking for /data0/software/cp2k/cp2k-2024.3/tools/toolchain/install/openmpi-5.0.5/bin/mpicc option to enable C11 features... none needed
checking whether /data0/software/cp2k/cp2k-2024.3/tools/toolchain/install/openmpi-5.0.5/bin/mpicc understands -c and -o together... yes
checking dependency style of /data0/software/cp2k/cp2k-2024.3/tools/toolchain/install/openmpi-5.0.5/bin/mpicc... gcc3
checking for function MPI_Init... no
checking for function MPI_Init in -lmpi... no
checking for function MPI_Init in -lmpich... no
configure: error: Could not compile an MPI C program
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.
/data0/software/cp2k/cp2k-2024.3/tools/toolchain/scripts/tool_kit.sh: line 663: /data0/software/cp2k/cp2k-2024.3/tools/toolchain/install/elpa-2024.03.001/install_successful: No such file or directory

6

帖子

0

威望

23

eV
积分
29

Level 2 能力者

7#
 楼主 Author| 发表于 Post on 2024-12-16 16:15:44 | 只看该作者 Only view this author
Uus/pMeC6H4-/キ 发表于 2024-12-16 14:32
我也折腾过slurm集群上编译CP2K的事情。“用openmp编译的时候注释掉了bashrc的intel mpi”听起来是修改的登 ...

感谢回复,实验室新买的服务器,我自己用,装cp2k的时候用主用户装的,用which检查了编译器,也保持了两个bashrc一致,但没用module,我重新装试试

6

帖子

0

威望

23

eV
积分
29

Level 2 能力者

8#
 楼主 Author| 发表于 Post on 2024-12-16 19:29:50 | 只看该作者 Only view this author
直接用最新版intel mpi编译了,彻底解决了问题。
之前因为ifx的问题现在的版本只能用openmp编译,但搜索发现了cp2k支持ifx的修订版https://github.com/cp2k/cp2k/tree/master,直接下载,toolchain的设置为./install_cp2k_toolchain.sh     --with-ifx     --with-intelmpi     --with-intel=system     --with-cmake=system     --with-openblas=no     --with-mkl=system --with-elpa=no    --with-sirius=no  --with-libint=install     --with-fftw=install     --with-libxc=install     --with-plumed=install     -j 64,顺利安装各种库。
编译cp2k时下载dbcsr源码包,解压到cp2k下的exts目录,重命名dbscr。

本版积分规则 Credits rule

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2025-8-16 09:04 , Processed in 0.762241 second(s), 23 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list