计算化学公社

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

[CP2K] CP2K-9.1 编译的问题

[复制链接 Copy URL]

1104

帖子

0

威望

3950

eV
积分
5054

Level 6 (一方通行)

今天尝试用 toolchain 编译  CP2K-9.1版,发现一些疑问,向大家请教。

系统和编译条件如下:
Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz

系统是 CentOS 7.4
gcc 升级到 11.2.1
用的是 Intel OneAPI 的 MKL
MPI 用的是 OpenMPI 4.1.1


以下是编译的情况

  1. (base) [huan@master toolchain]$ sudo ./install_cp2k_toolchain.sh --math-mode=mkl --with-cmake=install --with-openmpi=system --with-libxc=install --with-libint=install --with-fftw=install --with-libxsmm=install  --with-elpa=install --with-quip=install --with-plumed=install --with-sirius=no --with-gsl=install --with-libvdwxc=install --with-spglib=install --with-hdf5=install --with-spfft=install --with-spla=install --with-cosma=install --with-libvori=install
  2. MPI is detected and it appears to be OpenMPI
  3. Compiling with 16 processes.
  4. ==================== Finding GCC from system paths ====================
  5. path to gcc is  /opt/rh/devtoolset-11/root/usr/bin/gcc
  6. path to g++ is  /opt/rh/devtoolset-11/root/usr/bin/g++
  7. path to gfortran is  /opt/rh/devtoolset-11/root/usr/bin/gfortran
  8. Found include directory /usr/include
  9. Found lib directory /usr/lib64
  10. Step gcc took 0.00 seconds.
  11. ==================== Getting proc arch info using OpenBLAS tools ====================
  12. OpenBLAS detected LIBCORE = haswell
  13. OpenBLAS detected ARCH    = x86_64
  14. ==================== Installing CMake ====================
  15. cmake-3.22.1 is already installed, skipping it.
  16. Step cmake took 0.00 seconds.
  17. ==================== Finding OpenMPI from system paths ====================
  18. path to mpirun is  /public1/apps/openmpi_411/bin/mpirun
  19. path to mpicc is  /public1/apps/openmpi_411/bin/mpicc
  20. path to mpif90 is  /public1/apps/openmpi_411/bin/mpif90
  21. path to mpic++ is  /public1/apps/openmpi_411/bin/mpic++
  22. Step openmpi took 0.00 seconds.
  23. WARNING: (/public2/huan/BACKUP/cp2k-9.1/tools/toolchain/scripts/stage2/install_mkl.sh, line 26) MKL FFTW3 interface is present, but FFTW library is needed (FFTW-MPI)
  24. ==================== Finding MKL from system paths ====================
  25. MKLROOT is found to be /public1/apps/intel/oneapi/mkl/latest
  26. libm is found in ld search path
  27. libdl is found in ld search path
  28. Step mkl took 0.00 seconds.
  29. ==================== Installing FFTW ====================
  30. fftw-3.3.10 is already installed, skipping it.
  31. Step fftw took 0.00 seconds.
  32. ==================== Installing LIBINT ====================
  33. libint-2.6.0 is already installed, skipping it.
  34. Step libint took 0.00 seconds.
  35. ==================== Installing LIBXC ====================
  36. libxc-5.1.7 is already installed, skipping it.
  37. Step libxc took 0.00 seconds.
  38. Step libsmm took 0.00 seconds.
  39. ==================== Installing Libxsmm ====================
  40. libxsmm-1.17 is already installed, skipping it.
  41. Step libxsmm took 0.00 seconds.
  42. Step scalapack took 1.00 seconds.
  43. ==================== Installing COSMA ====================
  44. COSMA-2.5.1 is already installed, skipping it.
  45. Step cosma took 0.00 seconds.
  46. ==================== Installing ELPA ====================
  47. elpa-2021.11.001 is already installed, skipping it.
  48. Step elpa took 0.00 seconds.
  49. Step ptscotch took 0.00 seconds.
  50. Step superlu took 0.00 seconds.
  51. Step pexsi took 0.00 seconds.
  52. ==================== Installing QUIP ====================
  53. quip_dist-b4336484fb65b0e73211a8f920ae4361c7c353fd is already installed, skipping it.
  54. Step quip took 0.00 seconds.
  55. ==================== Installing gsl ====================
  56. gsl-2.7 is already installed, skipping it.
  57. Step gsl took 0.00 seconds.
  58. ==================== Installing PLUMED ====================
  59. plumed-2.7.3 is already installed, skipping it.
  60. Step plumed took 0.00 seconds.
  61. ==================== Installing hdf5 ====================
  62. hdf5-1.12.0 is already installed, skipping it.
  63. Step hdf5 took 0.00 seconds.
  64. ==================== Installing libvdwxc ====================
  65. libvdwxc-0.4.0 is already installed, skipping it.
  66. Step libvdwxc took 0.00 seconds.
  67. ==================== Installing spglib ====================
  68. spglib-1.16.2 is already installed, skipping it.
  69. Step spglib took 0.00 seconds.
  70. ==================== Installing libvori ====================
  71. libvori-210412 is already installed, skipping it.
  72. Step libvori took 0.00 seconds.
  73. ==================== Installing spfft ====================
  74. SpFFT-1.0.5 is already installed, skipping it.
  75. Step spfft took 1.00 seconds.
  76. ==================== Installing spla ====================
  77. SpLA-1.5.2 is already installed, skipping it.
  78. Step spla took 0.00 seconds.
  79. Step sirius took 0.00 seconds.
  80. ==================== generating arch files ====================
  81. arch files can be found in the /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch subdirectory
  82. Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local.ssmp
  83. Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local_static.ssmp
  84. Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local.sdbg
  85. Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local.psmp
  86. Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local.pdbg
  87. Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local_static.psmp
  88. Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local_warn.psmp
  89. Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local_coverage.pdbg
  90. ========================== usage =========================
  91. Done!
  92. Now copy:
  93.   cp /public2/huan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/* to the cp2k/arch/ directory
  94. To use the installed tools and libraries and cp2k version
  95. compiled with it you will first need to execute at the prompt:
  96.   source /public2/huan/BACKUP/cp2k-9.1/tools/toolchain/install/setup
  97. To build CP2K you should change directory:
  98.   cd cp2k/
  99.   make -j 16 ARCH=local VERSION="ssmp sdbg psmp pdbg"

  100. arch files for GPU enabled CUDA versions are named "local_cuda.*"
  101. arch files for GPU enabled HIP versions are named "local_hip.*"
  102. arch files for coverage versions are named "local_coverage.*"

  103. Note that these pre-built arch files are for the GNU compiler, users have to adapt them for other compilers.
  104. It is possible to use the provided CP2K arch files as guidance.
  105. (base) [huan@master toolchain]$
复制代码


SIRIUS 库出现报错,于是用 --with-sirius=no 跳过。这之后就比较正常。但是从上面的最后几行可以看出,只有 ssmp, psmp 两个版本


按照提示
cp /public2/huan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/*  /public2/huan/BACKUP/cp2k-9.1/arch/
source /public2/huan/BACKUP/cp2k-9.1/tools/toolchain/install/setup

然后到
/public2/huan/BACKUP/cp2k-9.1/
目录下,运行
make -j 16 ARCH=local VERSION="ssmp psmp"


编译结果最后看到有 Error 2,如下:

  1. lquip_core -latoms -lFoX_sax -lFoX_common -lFoX_utils -lFoX_fsys   -lxsmmf -lxsmm -ldl -lpthread -lxcf03 -lxc -lint2  -lfftw3 -lfftw3_omp    -L/public1/apps/intel/oneapi/mkl/latest/lib/intel64 -Wl,-rpath=/public1/apps/intel/oneapi/mkl/latest/lib/intel64  -Wl,--start-group -lmkl_gf_lp64 -lmkl_sequential -lmkl_core  -Wl,--end-group -lpthread -lm -ldl -lvori -lstdc++ -lstdc++
  2. cd /public2/wanghuan/BACKUP/cp2k-9.1/exe/local; ln -sf cp2k.ssmp cp2k_shell.ssmp
  3. cd /public2/wanghuan/BACKUP/cp2k-9.1/exe/local; ln -sf cp2k.ssmp cp2k.sopt
  4. make: *** [all] Error 2
复制代码


然后,根据 CP2K 的 github 官方提供的测试
  1. make -j 16 ARCH=local VERSION="ssmp psmp" test
复制代码

测试的总结里没有错误,如下:
  1. ------------------------------- Errors ---------------------------------


  2. ------------------------------- Timings --------------------------------
  3. Plot: name="timings", title="Timing Distribution", ylabel="time [s]"
  4. PlotPoint: name="100th_percentile", plot="timings", label="100th %ile", y=95.61, yerr=0.0
  5. PlotPoint: name="99th_percentile", plot="timings", label="99th %ile", y=36.39, yerr=0.0
  6. PlotPoint: name="98th_percentile", plot="timings", label="98th %ile", y=28.30, yerr=0.0
  7. PlotPoint: name="95th_percentile", plot="timings", label="95th %ile", y=17.35, yerr=0.0
  8. PlotPoint: name="90th_percentile", plot="timings", label="90th %ile", y=12.24, yerr=0.0
  9. PlotPoint: name="80th_percentile", plot="timings", label="80th %ile", y=7.15, yerr=0.0

  10. ------------------------------- Summary --------------------------------
  11. Number of FAILED  tests 0
  12. Number of WRONG   tests 0
  13. Number of CORRECT tests 3621
  14. Total number of   tests 3621

  15. Summary: correct: 3621 / 3621; 36min
  16. Status: OK

  17. *************************** Testing ended ******************************
  18. make: *** [test] Error 2
复制代码

只是结尾处有一个 make: *** [test] Error 2,
问题 1:编译最后出现的 make: *** [all] Error 2,以及测试最后出现的 make: *** [test] Error 2  不知道是什么意思?算报错吗?



  1. (base) [huan@master local]$ ll
  2. total 758628
  3. lrwxrwxrwx 1 huan huan         9 Feb  3 21:42 cp2k_shell.ssmp -> cp2k.ssmp
  4. lrwxrwxrwx 1 huan huan         9 Feb  3 21:42 cp2k.sopt -> cp2k.ssmp
  5. -rwxrwxr-x 1 huan huan 381460680 Feb  3 21:42 cp2k.ssmp
  6. -rwxrwxr-x 1 huan huan    994344 Feb  3 21:42 dumpdcd.ssmp
  7. -rwxrwxr-x 1 huan huan   2119048 Feb  3 21:37 graph.ssmp
  8. -rwxrwxr-x 1 huan huan   3193144 Feb  3 21:37 grid_miniapp.ssmp
  9. -rwxrwxr-x 1 huan huan   3193680 Feb  3 21:37 grid_unittest.ssmp
  10. -rwxrwxr-x 1 huan huan 381524840 Feb  3 21:42 libcp2k_unittest.ssmp
  11. -rwxrwxr-x 1 huan huan    134856 Feb  3 21:37 memory_utilities_unittest.ssmp
  12. -rwxrwxr-x 1 huan huan   3252360 Feb  3 21:37 parallel_rng_types_unittest.ssmp
  13. -rwxrwxr-x 1 huan huan    936912 Feb  3 21:42 xyz2dcd.ssmp
复制代码


问题2:编译的版本在本质上只有 ssmp 版(如上所示,前两个是软链接),并没有 psmp  版,不知道是什么原因。


请大家赐教,谢谢!



255

帖子

1

威望

2666

eV
积分
2941

Level 5 (御坂)

2#
发表于 Post on 2022-2-4 11:10:01 | 只看该作者 Only view this author
如果不是非要用centos7的情况下,建议如sob老师cp2k安装教程所说使用Centos8,因为我自己使用centos7尝试多次CP2K编译过程中均有各种各样的问题,而Centos8均可一次性完成编译。如果非要用centos7建议使用docker,非常方便同时便于迁移 《docker-singularity方法安装可随意移植的cp2k》http://bbs.keinsci.com/thread-25773-1-1.html
我唯一知道的就是我一无所知,但我是化学小迷弟

2407

帖子

1

威望

5950

eV
积分
8377

Level 6 (一方通行)

3#
发表于 Post on 2022-2-4 11:20:45 | 只看该作者 Only view this author
【CP2K v8.2.0 MPI并行版安装 无需root授权-哔哩哔哩】 https://b23.tv/LKz5ney

适用于多种版本。
具体查看官方说明。

High-Performance Computing for You
为您专属定制的高性能计算解决方案

更多讯息,请访问:
https://labitc.top
http://tophpc.top:8080
电邮: ask@hpc4you.top

1104

帖子

0

威望

3950

eV
积分
5054

Level 6 (一方通行)

4#
 楼主 Author| 发表于 Post on 2022-2-4 14:22:43 | 只看该作者 Only view this author
本帖最后由 乐平 于 2022-2-4 16:32 编辑
abin 发表于 2022-2-4 05:20
【CP2K v8.2.0 MPI并行版安装 无需root授权-哔哩哔哩】 https://b23.tv/LKz5ney

适用于多种版本。

谢谢,但是您视频中的 conda 方法只适用于 CP2K 8.2,并不适用于其他版本。见 anaconda 官方链接 https://anaconda.org/conda-forge/cp2k

356

帖子

0

威望

2249

eV
积分
2605

Level 5 (御坂)

5#
发表于 Post on 2022-2-4 20:38:46 | 只看该作者 Only view this author
今天在centos 7.9上倒腾2天,组件安装没问题。就make的时候出差错。后期想法升级到8再试试。

103

帖子

0

威望

3829

eV
积分
3932

Level 5 (御坂)

6#
发表于 Post on 2022-2-4 23:59:23 | 只看该作者 Only view this author
个人编译的时候感觉“make: *** [all] Error 2”就是指编译psmp版本失败。
「狩りってのは先に焦せった方の負けだ、ハンターも獲物もな」

54

帖子

0

威望

591

eV
积分
645

Level 4 (黑子)

7#
发表于 Post on 2022-3-9 13:39:32 | 只看该作者 Only view this author
这个问题,我也遇到过一次,但是我后面也编译成功过,我感觉这里还是GCC的问题

236

帖子

1

威望

3801

eV
积分
4057

Level 6 (一方通行)

8#
发表于 Post on 2022-3-9 19:42:39 | 只看该作者 Only view this author
https://www.cp2k.org/dev:compiler_support  上官网查看一下cp2k支持的gcc和intel编译器版本。

1104

帖子

0

威望

3950

eV
积分
5054

Level 6 (一方通行)

9#
 楼主 Author| 发表于 Post on 2022-3-10 19:18:22 | 只看该作者 Only view this author
wolfli369 发表于 2022-3-9 13:42
https://www.cp2k.org/dev:compiler_support  上官网查看一下cp2k支持的gcc和intel编译器版本。

请看我最新的帖子  http://bbs.keinsci.com/thread-28171-1-1.html#pid191152

本版积分规则 Credits rule

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

GMT+8, 2025-8-13 23:41 , Processed in 0.145747 second(s), 20 queries , Gzip On.

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