• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

cp2k9.1编译

武飞扬头像
zl_1628563296@qq.com
帮助1

cp2k9.1编译

编译环境:mkl2020 gcc11.2 mpich

1.安装intel2020编译器

2.安装gcc11.2编译器

3.cp2k相关依赖包放入cp2k-9.1/tools/toolchain/build/中

  1.  
    [root@node04 toolchain]# ./install_cp2k_toolchain.sh --with-mkl=system --with-mpich --w ith-scalapack=no
  2.  
    MPI is detected and it appears to be Intel MPI
  3.  
    Compiling with 36 processes.
  4.  
    Step gcc took 0.00 seconds.
  5.  
    ==================== Getting proc arch info using OpenBLAS tools ====================
  6.  
    OpenBLAS detected LIBCORE = haswell
  7.  
    OpenBLAS detected ARCH = x86_64
  8.  
    ==================== Installing CMake ====================
  9.  
    cmake-3.22.1 is already installed, skipping it.
  10.  
    Step cmake took 0.00 seconds.
  11.  
    ==================== Installing MPICH ====================
  12.  
    mpich-3.3.2 is already installed, skipping it.
  13.  
    Step mpich took 0.00 seconds.
  14.  
    ==================== Finding MKL from system paths ====================
  15.  
    MKLROOT is found to be /opt/intel2020/compilers_and_libraries_2020.4.304/linux/mkl
  16.  
    libm is found in ld search path
  17.  
    libdl is found in ld search path
  18.  
    Step mkl took 0.00 seconds.
  19.  
    Step fftw took 0.00 seconds.
  20.  
    ==================== Installing LIBINT ====================
  21.  
    libint-2.6.0 is already installed, skipping it.
  22.  
    Step libint took 0.00 seconds.
  23.  
    ==================== Installing LIBXC ====================
  24.  
    libxc-5.1.7 is already installed, skipping it.
  25.  
    Step libxc took 0.00 seconds.
  26.  
    Step libsmm took 0.00 seconds.
  27.  
    ==================== Installing Libxsmm ====================
  28.  
    libxsmm-1.17 is already installed, skipping it.
  29.  
    Step libxsmm took 0.00 seconds.
  30.  
    Step scalapack took 0.00 seconds.
  31.  
    ==================== Installing COSMA ====================
  32.  
    COSMA-2.5.1 is already installed, skipping it.
  33.  
    Step cosma took 0.00 seconds.
  34.  
    ==================== Installing ELPA ====================
  35.  
    elpa-2021.11.001 is already installed, skipping it.
  36.  
    Step elpa took 0.00 seconds.
  37.  
    Step ptscotch took 0.00 seconds.
  38.  
    Step superlu took 0.00 seconds.
  39.  
    Step pexsi took 0.00 seconds.
  40.  
    Step quip took 0.00 seconds.
  41.  
    ==================== Installing gsl ====================
  42.  
    gsl-2.7 is already installed, skipping it.
  43.  
    Step gsl took 0.00 seconds.
  44.  
    Step plumed took 0.00 seconds.
  45.  
    ==================== Installing hdf5 ====================
  46.  
    hdf5-1.12.0 is already installed, skipping it.
  47.  
    Step hdf5 took 0.00 seconds.
  48.  
    Step libvdwxc took 0.00 seconds.
  49.  
    ==================== Installing spglib ====================
  50.  
    spglib-1.16.2 is already installed, skipping it.
  51.  
    Step spglib took 0.00 seconds.
  52.  
    ==================== Installing libvori ====================
  53.  
    libvori-210412 is already installed, skipping it.
  54.  
    Step libvori took 0.00 seconds.
  55.  
    ==================== Installing spfft ====================
  56.  
    SpFFT-1.0.5 is already installed, skipping it.
  57.  
    Step spfft took 0.00 seconds.
  58.  
    ==================== Installing spla ====================
  59.  
    SpLA-1.5.2.tar.gz is found
  60.  
    Installing from scratch into /opt/cp2k-9.1/tools/toolchain/install/SpLA-1.5.2
  61.  
    Step spla took 16.00 seconds.
  62.  
    ==================== Installing SIRIUS ====================
  63.  
    sirius_7.3.0.tar.gz is found
  64.  
    Installing from scratch into /opt/cp2k-9.1/tools/toolchain/install/sirius-7.3.0
  65.  
    patching file cmake/cudalibs_target.cmake
  66.  
    Step sirius took 134.00 seconds.
  67.  
    ==================== generating arch files ====================
  68.  
    arch files can be found in the /opt/cp2k-9.1/tools/toolchain/install/arch subdirectory
  69.  
    Wrote /opt/cp2k-9.1/tools/toolchain/install/arch/local.ssmp
  70.  
    Wrote /opt/cp2k-9.1/tools/toolchain/install/arch/local_static.ssmp
  71.  
    Wrote /opt/cp2k-9.1/tools/toolchain/install/arch/local.sdbg
  72.  
    Wrote /opt/cp2k-9.1/tools/toolchain/install/arch/local.psmp
  73.  
    Wrote /opt/cp2k-9.1/tools/toolchain/install/arch/local.pdbg
  74.  
    Wrote /opt/cp2k-9.1/tools/toolchain/install/arch/local_static.psmp
  75.  
    Wrote /opt/cp2k-9.1/tools/toolchain/install/arch/local_warn.psmp
  76.  
    Wrote /opt/cp2k-9.1/tools/toolchain/install/arch/local_coverage.pdbg
  77.  
    ========================== usage =========================
  78.  
    Done!
  79.  
    Now copy:
  80.  
    cp /opt/cp2k-9.1/tools/toolchain/install/arch/* to the cp2k/arch/ directory
  81.  
    To use the installed tools and libraries and cp2k version
  82.  
    compiled with it you will first need to execute at the prompt:
  83.  
    source /opt/cp2k-9.1/tools/toolchain/install/setup
  84.  
    To build CP2K you should change directory:
  85.  
    cd cp2k/
  86.  
    make -j 36 ARCH=local VERSION="ssmp sdbg psmp pdbg"
  87.  
    arch files for GPU enabled CUDA versions are named "local_cuda.*"
  88.  
    arch files for GPU enabled HIP versions are named "local_hip.*"
  89.  
    arch files for coverage versions are named "local_coverage.*"
  90.  
    Note that these pre-built arch files are for the GNU compiler, users have to adapt them for other compilers.
  91.  
    It is possible to use the provided CP2K arch files as guidance.
学新通

3执行安装脚本过程中可能遇到的错误:

3.1binutls 版本过旧,会导致 libxsmm 编译出现类似如下报错:

  1.  
    2528 /tmp/ccE3IUdy.s:131305: Error: no such instruction: `vcvtne2ps2bf16 %zmm9,%zmm11,%zmm5'
  2.  
    2529 /tmp/ccE3IUdy.s:131310: Error: no such instruction: `vcvtne2ps2bf16 %zmm15,%zmm0,%zmm13'
  3.  
    2530 /tmp/ccE3IUdy.s:131316: Error: no such instruction: `vcvtne2ps2bf16 %zmm4,%zmm3,%zmm6'
  4.  
    2531 /tmp/ccE3IUdy.s:131322: Error: no such instruction: `vcvtne2ps2bf16 %zmm8,%zmm7,%zmm2'
  5.  
    2532 /tmp/ccE3IUdy.s:131328: Error: no such instruction: `vcvtne2ps2bf16 %zmm1,%zmm12,%zmm10'
  6.  
    2533 /tmp/ccE3IUdy.s:131334: Error: no such instruction: `vcvtne2ps2bf16 %zmm11,%zmm14,%zmm9'
  7.  
    2534 /tmp/ccE3IUdy.s:131340: Error: no such instruction: `vcvtne2ps2bf16 %zmm0,%zmm5,%zmm15'
  8.  
    2535 /tmp/ccE3IUdy.s:131351: Error: no such instruction: `vcvtne2ps2bf16 %zmm3,%zmm13,%zmm4'
  9.  
    2536 /tmp/ccE3IUdy.s:131355: Error: no such instruction: `vcvtne2ps2bf16 %zmm7,%zmm6,%zmm8'
  10.  
    2537 /tmp/ccE3IUdy.s:131360: Error: no such instruction: `vcvtne2ps2bf16 %zmm12,%zmm2,%zmm1'
  11.  
    2538 /tmp/ccE3IUdy.s:131365: Error: no such instruction: `vcvtne2ps2bf16 %zmm14,%zmm10,%zmm11'
  12.  
    2539 /tmp/ccE3IUdy.s:131370: Error: no such instruction: `vcvtne2ps2bf16 %zmm5,%zmm9,%zmm0'
  13.  
    2540 /tmp/ccE3IUdy.s:131376: Error: no such instruction: `vcvtne2ps2bf16 %zmm13,%zmm15,%zmm3'
  14.  
    2541 /tmp/ccE3IUdy.s:131380: Error: no such instruction: `vcvtne2ps2bf16 %zmm6,%zmm4,%zmm7'
  15.  
    2542 /tmp/ccE3IUdy.s:131384: Error: no such instruction: `vcvtne2ps2bf16 %zmm2,%zmm8,%zmm12'
  16.  
    2543 make: [obj/intel64/libxsmm_dnn_rnncell_forward.o] Error 1 (ignored)
  17.  
    2544 make: *** [obj/intel64/libxsmm_dnn_rnncell_forward.o] Error 1
学新通

在之前的 libxsmm-1.17.1 时,给出了两种解决办法:

  1. 升级 binutils,可以选择用 scl-devtoolset 同时解决 GCC 和 binutils 的版本问题
  2. 给 make 加参数 INTRINSICS=1
  3. 操作如下:在 scripts/stage4/install_libxsmm.sh 第 70 行以及第 76 添加 INTRINSICS=1 ,可行!
make INTRINSICS=1 -j $(get_nprocs) \

3.2.epla安装失败 

编译时务必加上“--with-mpich或--with-openmpi或with-intelmpi=system”

3.3SpLA报错,加压的安装包与安装脚本不符,需要修改为“SpLA-1.5.2”

3.4  v1.166.2.tar.gz修改为spglib-1.16.2.tar.gz

4.编译安装

紧接着把~/cp2k-9.1/tools/toolchain/install/arch/下所有文件拷到~/cp2k-9.1/arch目录下。

  1.  
    source /home/hipeson/cp2k-9.1/tools/toolchain/install/setup
  2.  
    cd /home/hipeson/cp2k-9.1
  3.  
    make -j 36 ARCH=local VERSION="ssmp sdbg psmp pdbg"

 编译过程中报错,/usr/bin/ld: cannot find -lz

解决:yum install -y zlib-devel

编译结束,显示如下:

  1.  
    nozomiTojo@lovelive:~/cp2k-9.1/tools/toolchain$ make -j 96 ARCH=local VERSION="ssmp sdbg psmp pdbg"
  2.  
    >>>>>>>>>>>>>>>>>>>>>>等待约5min>>>>>>>>>>>>>>>>>>>>>>>
  3.  
    /opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld:warning: libgfortran.so.3, needed by /usr/lib64/mpich/lib/libmpich.so.10, mayconflict with libgfortran.so.5
  4.  
    cd /home/nozomiTojo/softwares/cp2k-9.1/exe/local;ln -sf cp2k.psmp cp2k_shell.psmp
  5.  
    cd /home/nozomiTojo/softwares/cp2k-9.1/exe/local;ln -sf cp2k.psmp cp2k.popt

5.测试

执行测试一般时间较长,可以跳过此部分

hipeson@localhost:~/cp2k-9.1/tools/toolchain$  make -j 96 ARCH=local VERSION="ssmp sdbg psmp pdbg" test

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgkhafj
系列文章
更多 icon
同类精品
更多 icon
继续加载