计算化学公社

标题: cp2k2024.3运行异常中断 [打印本页]

作者
Author:
NeedleCandy    时间: 2024-12-16 00:25
标题: cp2k2024.3运行异常中断
本帖最后由 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莫名奇妙中断。

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







作者
Author:
1138711019    时间: 2024-12-16 10:26
无法帮你测试,因为你没给H2O.xyz,不过你可是试试换更少一些核心来计算看看
作者
Author:
NeedleCandy    时间: 2024-12-16 10:52
1138711019 发表于 2024-12-16 10:26
无法帮你测试,因为你没给H2O.xyz,不过你可是试试换更少一些核心来计算看看

感谢回复,用6核出现相同中断,坐标文件加在附件了
作者
Author:
1138711019    时间: 2024-12-16 11:42
NeedleCandy 发表于 2024-12-16 10:52
感谢回复,用6核出现相同中断,坐标文件加在附件了

测试完全没问题,5步就跑完了。
作者
Author:
Uus/pMeC6H4-/キ    时间: 2024-12-16 14:32
我也折腾过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。
作者
Author:
生煎小馒头    时间: 2024-12-16 15:42
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

作者
Author:
NeedleCandy    时间: 2024-12-16 16:15
Uus/pMeC6H4-/キ 发表于 2024-12-16 14:32
我也折腾过slurm集群上编译CP2K的事情。“用openmp编译的时候注释掉了bashrc的intel mpi”听起来是修改的登 ...

感谢回复,实验室新买的服务器,我自己用,装cp2k的时候用主用户装的,用which检查了编译器,也保持了两个bashrc一致,但没用module,我重新装试试
作者
Author:
NeedleCandy    时间: 2024-12-16 19:29
直接用最新版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。




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