|
今天尝试用 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
以下是编译的情况
- (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
- MPI is detected and it appears to be OpenMPI
- Compiling with 16 processes.
- ==================== Finding GCC from system paths ====================
- path to gcc is /opt/rh/devtoolset-11/root/usr/bin/gcc
- path to g++ is /opt/rh/devtoolset-11/root/usr/bin/g++
- path to gfortran is /opt/rh/devtoolset-11/root/usr/bin/gfortran
- Found include directory /usr/include
- Found lib directory /usr/lib64
- Step gcc took 0.00 seconds.
- ==================== Getting proc arch info using OpenBLAS tools ====================
- OpenBLAS detected LIBCORE = haswell
- OpenBLAS detected ARCH = x86_64
- ==================== Installing CMake ====================
- cmake-3.22.1 is already installed, skipping it.
- Step cmake took 0.00 seconds.
- ==================== Finding OpenMPI from system paths ====================
- path to mpirun is /public1/apps/openmpi_411/bin/mpirun
- path to mpicc is /public1/apps/openmpi_411/bin/mpicc
- path to mpif90 is /public1/apps/openmpi_411/bin/mpif90
- path to mpic++ is /public1/apps/openmpi_411/bin/mpic++
- Step openmpi took 0.00 seconds.
- 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)
- ==================== Finding MKL from system paths ====================
- MKLROOT is found to be /public1/apps/intel/oneapi/mkl/latest
- libm is found in ld search path
- libdl is found in ld search path
- Step mkl took 0.00 seconds.
- ==================== Installing FFTW ====================
- fftw-3.3.10 is already installed, skipping it.
- Step fftw took 0.00 seconds.
- ==================== Installing LIBINT ====================
- libint-2.6.0 is already installed, skipping it.
- Step libint took 0.00 seconds.
- ==================== Installing LIBXC ====================
- libxc-5.1.7 is already installed, skipping it.
- Step libxc took 0.00 seconds.
- Step libsmm took 0.00 seconds.
- ==================== Installing Libxsmm ====================
- libxsmm-1.17 is already installed, skipping it.
- Step libxsmm took 0.00 seconds.
- Step scalapack took 1.00 seconds.
- ==================== Installing COSMA ====================
- COSMA-2.5.1 is already installed, skipping it.
- Step cosma took 0.00 seconds.
- ==================== Installing ELPA ====================
- elpa-2021.11.001 is already installed, skipping it.
- Step elpa took 0.00 seconds.
- Step ptscotch took 0.00 seconds.
- Step superlu took 0.00 seconds.
- Step pexsi took 0.00 seconds.
- ==================== Installing QUIP ====================
- quip_dist-b4336484fb65b0e73211a8f920ae4361c7c353fd is already installed, skipping it.
- Step quip took 0.00 seconds.
- ==================== Installing gsl ====================
- gsl-2.7 is already installed, skipping it.
- Step gsl took 0.00 seconds.
- ==================== Installing PLUMED ====================
- plumed-2.7.3 is already installed, skipping it.
- Step plumed took 0.00 seconds.
- ==================== Installing hdf5 ====================
- hdf5-1.12.0 is already installed, skipping it.
- Step hdf5 took 0.00 seconds.
- ==================== Installing libvdwxc ====================
- libvdwxc-0.4.0 is already installed, skipping it.
- Step libvdwxc took 0.00 seconds.
- ==================== Installing spglib ====================
- spglib-1.16.2 is already installed, skipping it.
- Step spglib took 0.00 seconds.
- ==================== Installing libvori ====================
- libvori-210412 is already installed, skipping it.
- Step libvori took 0.00 seconds.
- ==================== Installing spfft ====================
- SpFFT-1.0.5 is already installed, skipping it.
- Step spfft took 1.00 seconds.
- ==================== Installing spla ====================
- SpLA-1.5.2 is already installed, skipping it.
- Step spla took 0.00 seconds.
- Step sirius took 0.00 seconds.
- ==================== generating arch files ====================
- arch files can be found in the /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch subdirectory
- Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local.ssmp
- Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local_static.ssmp
- Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local.sdbg
- Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local.psmp
- Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local.pdbg
- Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local_static.psmp
- Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local_warn.psmp
- Wrote /public2/wanghuan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/local_coverage.pdbg
- ========================== usage =========================
- Done!
- Now copy:
- cp /public2/huan/BACKUP/cp2k-9.1/tools/toolchain/install/arch/* to the cp2k/arch/ directory
- To use the installed tools and libraries and cp2k version
- compiled with it you will first need to execute at the prompt:
- source /public2/huan/BACKUP/cp2k-9.1/tools/toolchain/install/setup
- To build CP2K you should change directory:
- cd cp2k/
- make -j 16 ARCH=local VERSION="ssmp sdbg psmp pdbg"
- arch files for GPU enabled CUDA versions are named "local_cuda.*"
- arch files for GPU enabled HIP versions are named "local_hip.*"
- arch files for coverage versions are named "local_coverage.*"
- Note that these pre-built arch files are for the GNU compiler, users have to adapt them for other compilers.
- It is possible to use the provided CP2K arch files as guidance.
- (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,如下:
- 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++
- cd /public2/wanghuan/BACKUP/cp2k-9.1/exe/local; ln -sf cp2k.ssmp cp2k_shell.ssmp
- cd /public2/wanghuan/BACKUP/cp2k-9.1/exe/local; ln -sf cp2k.ssmp cp2k.sopt
- make: *** [all] Error 2
复制代码
然后,根据 CP2K 的 github 官方提供的测试
- make -j 16 ARCH=local VERSION="ssmp psmp" test
复制代码
测试的总结里没有错误,如下:
- ------------------------------- Errors ---------------------------------
- ------------------------------- Timings --------------------------------
- Plot: name="timings", title="Timing Distribution", ylabel="time [s]"
- PlotPoint: name="100th_percentile", plot="timings", label="100th %ile", y=95.61, yerr=0.0
- PlotPoint: name="99th_percentile", plot="timings", label="99th %ile", y=36.39, yerr=0.0
- PlotPoint: name="98th_percentile", plot="timings", label="98th %ile", y=28.30, yerr=0.0
- PlotPoint: name="95th_percentile", plot="timings", label="95th %ile", y=17.35, yerr=0.0
- PlotPoint: name="90th_percentile", plot="timings", label="90th %ile", y=12.24, yerr=0.0
- PlotPoint: name="80th_percentile", plot="timings", label="80th %ile", y=7.15, yerr=0.0
- ------------------------------- Summary --------------------------------
- Number of FAILED tests 0
- Number of WRONG tests 0
- Number of CORRECT tests 3621
- Total number of tests 3621
- Summary: correct: 3621 / 3621; 36min
- Status: OK
- *************************** Testing ended ******************************
- make: *** [test] Error 2
复制代码
只是结尾处有一个 make: *** [test] Error 2,
问题 1:编译最后出现的 make: *** [all] Error 2,以及测试最后出现的 make: *** [test] Error 2 不知道是什么意思?算报错吗?
- (base) [huan@master local]$ ll
- total 758628
- lrwxrwxrwx 1 huan huan 9 Feb 3 21:42 cp2k_shell.ssmp -> cp2k.ssmp
- lrwxrwxrwx 1 huan huan 9 Feb 3 21:42 cp2k.sopt -> cp2k.ssmp
- -rwxrwxr-x 1 huan huan 381460680 Feb 3 21:42 cp2k.ssmp
- -rwxrwxr-x 1 huan huan 994344 Feb 3 21:42 dumpdcd.ssmp
- -rwxrwxr-x 1 huan huan 2119048 Feb 3 21:37 graph.ssmp
- -rwxrwxr-x 1 huan huan 3193144 Feb 3 21:37 grid_miniapp.ssmp
- -rwxrwxr-x 1 huan huan 3193680 Feb 3 21:37 grid_unittest.ssmp
- -rwxrwxr-x 1 huan huan 381524840 Feb 3 21:42 libcp2k_unittest.ssmp
- -rwxrwxr-x 1 huan huan 134856 Feb 3 21:37 memory_utilities_unittest.ssmp
- -rwxrwxr-x 1 huan huan 3252360 Feb 3 21:37 parallel_rng_types_unittest.ssmp
- -rwxrwxr-x 1 huan huan 936912 Feb 3 21:42 xyz2dcd.ssmp
复制代码
问题2:编译的版本在本质上只有 ssmp 版(如上所示,前两个是软链接),并没有 psmp 版,不知道是什么原因。
请大家赐教,谢谢!
|
|