计算化学公社

标题: cp2k2024.3的intel编译器版安装错误 [打印本页]

作者
Author:
lrh4    时间: 2024-10-30 13:46
标题: cp2k2024.3的intel编译器版安装错误
前言:想在学校集群上安装cp2k和vasp(无root权限、centOS7.9,gcc-4.8.5),但是按照sob、goldNAN、冰释之川等大佬的帖子去安装cp2k2024.3版本,安装过程出现各种错误(gcc编译),各种查资料也没办法解决。

于是开始尝试intel编译器去安装,去oneapi下载最新版的base和HPC组件,配置好环境后开始 cd ~/cp2k-2024.3/tools/toolchain/目录下

运行./install_cp2k_toolchain.sh --mpi-mode=intelmpi --math-mode=mkl --with-intelmpi=system --with-plumed=install --with-openblas=no --with-sirius=no --with-gcc=no --with-mkl=system --with-ninja --with-dftd4命令,然后到libint这里出现如下错误:


MPI is detected and it appears to be Intel MPI
Compiling with 40 processes for target native.
Step gcc took 0.00 seconds.
==================== Finding Intel compiler from system paths ====================
path to icx is /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/icx
path to icpx is /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/icpx
path to ifx is /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/ifx
CC  is /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/icx
CXX is /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/icpx
FC  is /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/ifx
Step intel took 0.00 seconds.
==================== Getting proc arch info using OpenBLAS tools ====================
OpenBLAS detected LIBCORE = haswell
OpenBLAS detected ARCH    = x86_64
==================== Installing CMake ====================
cmake-3.30.0 is already installed, skipping it.
Step cmake took 0.00 seconds.
==================== Installing Ninja  ====================
ninja-v1.12.1 is already installed, skipping it.
Step ninja took 0.00 seconds.
==================== Finding Intel MPI from system paths ====================
path to mpiexec is /lustre/home/Liang4CP2K/intel/oneapi/mpi/2021.14/bin/mpiexec
path to mpiicc is /lustre/home/Liang4CP2K/intel/oneapi/mpi/2021.14/bin/mpiicc
path to mpiicpc is /lustre/home/Liang4CP2K/intel/oneapi/mpi/2021.14/bin/mpiicpc
path to mpiifort is /lustre/home/Liang4CP2K/intel/oneapi/mpi/2021.14/bin/mpiifort
Found lib directory /lustre/home/Liang4CP2K/intel/oneapi/mpi/2021.14/lib
libmpi is found in ld search path
libmpicxx is found in ld search path
I_MPI_CXX is icpx
I_MPI_CC  is icx
I_MPI_FC  is ifort
MPICXX    is /lustre/home/Liang4CP2K/intel/oneapi/mpi/2021.14/bin/mpiicpc
MPICC     is /lustre/home/Liang4CP2K/intel/oneapi/mpi/2021.14/bin/mpiicc
MPIFC     is /lustre/home/Liang4CP2K/intel/oneapi/mpi/2021.14/bin/mpiifort
Step intelmpi took 0.00 seconds.
==================== Finding MKL from system paths ====================
MKLROOT is found to be /lustre/home/Liang4CP2K/intel/oneapi/mkl/2025.0
libm is found in ld search path
libdl is found in ld search path
Step mkl took 1.00 seconds.
Step fftw took 0.00 seconds.
==================== Installing LIBINT ====================
libint-v2.6.0-cp2k-lmax-5.tgz is found
Installing from scratch into /lustre/home/Liang4CP2K/cp2k-2024.3/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
Using standard ordering of solid harmonic Gaussians
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /bin/install -c
checking for ranlib... ranlib
checking whether the C++ compiler works... no
configure: error: in `/lustre/home/Liang4CP2K/cp2k-2024.3/tools/toolchain/build/libint-v2.6.0-cp2k-lmax-5':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
sed: can't read fortran/Makefile: No such file or directory
ERROR: (./scripts/stage3/install_libint.sh, line 87) Non-zero exit code detected.

到libint目录下查看config.log文件得到如下信息:

     1  This file contains any messages produced by compilers while
     2  running configure, to aid debugging if configure makes a mistake.
     3
     4  It was created by Libint2 configure 2.6.0, which was
     5  generated by GNU Autoconf 2.69.  Invocation command line was
     6
     7    $ ./configure --prefix=/lustre/home/Liang4CP2K/cp2k-2024.3/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5 --with-cxx=/lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/icpx -O2 -fPIC -fp-model=precise -funroll-loops -g -qopenmp -qopenmp-simd -traceback -xHost -g1 --with-cxx-optflags=-O2 -fPIC -fp-model=precise -funroll-loops -g -qopenmp -qopenmp-simd -traceback -xHost -g1 --enable-fortran --with-pic --libdir=/lustre/home/Liang4CP2K/cp2k-2024.3/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/lib
     8
     9  ## --------- ##
    10  ## Platform. ##
    11  ## --------- ##
    12
    13  hostname = ln01
    14  uname -m = x86_64
    15  uname -r = 3.10.0-1127.el7.x86_64
    16  uname -s = Linux
    17  uname -v = #1 SMP Tue Mar 31 23:36:51 UTC 2020
    18
    19  /usr/bin/uname -p = x86_64
    20  /bin/uname -X     = unknown
    21
    22  /bin/arch              = x86_64
    23  /usr/bin/arch -k       = unknown
    24  /usr/convex/getsysinfo = unknown
    25  /usr/bin/hostinfo      = unknown
    26  /bin/machine           = unknown
    27  /usr/bin/oslevel       = unknown
    28  /bin/universe          = unknown
    29
    30  PATH: /lustre/home/Liang4CP2K/cp2k-2024.3/tools/toolchain/install/ninja-v1.12.1/bin
    31  PATH: /lustre/home/Liang4CP2K/cp2k-2024.3/tools/toolchain/install/cmake-3.30.0/bin
    32  PATH: /lustre/home/Liang4CP2K/intel/oneapi/mpi/2021.14/bin
    33  PATH: /lustre/home/Liang4CP2K/intel/oneapi/mkl/2025.0/bin
    34  PATH: /lustre/home/Liang4CP2K/intel/oneapi/dpcpp-ct/2025.0/bin
    35  PATH: /lustre/home/Liang4CP2K/intel/oneapi/dev-utilities/2025.0/bin
    36  PATH: /lustre/home/Liang4CP2K/intel/oneapi/debugger/2025.0/opt/debugger/bin
    37  PATH: /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin
    38  PATH: /lustre/home/Liang4CP2K/anaconda3/bin
    39  PATH: /lustre/home/Liang4CP2K/intel/oneapi/mpi/2021.14/bin
    40  PATH: /lustre/home/Liang4CP2K/intel/oneapi/mkl/2025.0/bin
    41  PATH: /lustre/home/Liang4CP2K/intel/oneapi/dpcpp-ct/2025.0/bin
    42  PATH: /lustre/home/Liang4CP2K/intel/oneapi/dev-utilities/2025.0/bin
    43  PATH: /lustre/home/Liang4CP2K/intel/oneapi/debugger/2025.0/opt/debugger/bin
    44  PATH: /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin
    45  PATH: /usr/java/jre1.8.0_151/bin
    46  PATH: /usr/java/jre1.8.0_151/bin
    47  PATH: /opt/software/tsce4/maui/sbin
    48  PATH: /opt/software/tsce4/maui/bin
    49  PATH: /opt/software/tsce4/torque6/bin
    50  PATH: /opt/software/tsce4/torque6/sbin
    51  PATH: /usr/local/bin
    52  PATH: /usr/lib64/qt-3.3/bin
    53  PATH: /usr/local/bin
    54  PATH: /bin
    55  PATH: /usr/bin
    56  PATH: /usr/local/sbin
    57  PATH: /usr/sbin
    58  PATH: /opt/ibutils/bin
    59  PATH: .
    60  PATH: /lustre/home/Liang4CP2K/.local/bin
    61  PATH: /lustre/home/Liang4CP2K/bin
    62
    63
    64  ## ----------- ##
    65  ## Core tests. ##
    66  ## ----------- ##
    67
    68  configure:2658: checking build system type
    69  configure:2672: result: x86_64-pc-linux-gnu
    70  configure:2692: checking host system type
    71  configure:2705: result: x86_64-pc-linux-gnu
    72  configure:2725: checking target system type
    73  configure:2738: result: x86_64-pc-linux-gnu
    74  configure:2979: result: Using standard ordering of solid harmonic Gaussians
    75  configure:3007: checking whether make sets $(MAKE)
    76  configure:3029: result: yes
    77  configure:3052: checking for a BSD-compatible install
    78  configure:3120: result: /bin/install -c
    79  configure:3174: checking for ranlib
    80  configure:3190: found /bin/ranlib
    81  configure:3201: result: ranlib
    82  configure:3386: checking for C++ compiler version
    83  configure:3395: /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/icpx -O2 -fPIC -fp-model=precise -funroll-loops -g -qopenmp -qopenmp-simd -traceback -xHost -g1 --version >&5
    84  /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++)
    85  /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++)
    86  configure:3406: $? = 1
    87  configure:3395: /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/icpx -O2 -fPIC -fp-model=precise -funroll-loops -g -qopenmp -qopenmp-simd -traceback -xHost -g1 -v >&5
    88  /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++)
    89  /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++)
    90  configure:3406: $? = 1
    91  configure:3395: /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/icpx -O2 -fPIC -fp-model=precise -funroll-loops -g -qopenmp -qopenmp-simd -traceback -xHost -g1 -V >&5
    92  Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2025.0.0 Build 20241008
    93  Copyright (C) 1985-2024 Intel Corporation. All rights reserved.
    94
    95  configure:3406: $? = 0
    96  configure:3395: /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/icpx -O2 -fPIC -fp-model=precise -funroll-loops -g -qopenmp -qopenmp-simd -traceback -xHost -g1 -qversion >&5
    97  /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++)
    98  /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++)
    99  configure:3406: $? = 1
   100  configure:3426: checking whether the C++ compiler works
   101  configure:3448: /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/icpx -O2 -fPIC -fp-model=precise -funroll-loops -g -qopenmp -qopenmp-simd -traceback -xHost -g1 -O2 -fPIC -fp-model=precise -funroll-loops -g -qopenmp -qopenmp-simd -traceback -xHost   conftest.cpp  >&5
   102  /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++)
   103  /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++)
   104  configure:3452: $? = 1
   105  configure:3490: result: no
   106  configure: failed program was:
   107  | /* confdefs.h */
   108  | #define PACKAGE_NAME "Libint2"
   109  | #define PACKAGE_TARNAME "libint2"
   110  | #define PACKAGE_VERSION "2.6.0"
   111  | #define PACKAGE_STRING "Libint2 2.6.0"
   112  | #define PACKAGE_BUGREPORT "libint@valeyev.net"
   113  | #define PACKAGE_URL ""
   114  | #define LIBINT2_BUILDID ""
   115  | #define LIBINT2_VERSION "2.6.0"
   116  | #define LIBINT_SHGSHELL_ORDERING 1
   117  | /* end confdefs.h.  */
   118  |
   119  | int
   120  | main ()
   121  | {
   122  |
   123  |   ;
   124  |   return 0;
   125  | }
   126  configure:3495: error: in `/lustre/home/Liang4CP2K/cp2k-2024.3/tools/toolchain/build/libint-v2.6.0-cp2k-lmax-5':
   127  configure:3497: error: C++ compiler cannot create executables
   128  See `config.log' for more details
   129


请各位大佬帮忙分析是什么原因?? 无root权限的我该如何解决?? 十分感谢!!!
作者
Author:
Uus/pMeC6H4-/キ    时间: 2024-10-30 14:15
本帖最后由 Uus/pMeC6H4-/キ 于 2024-10-30 14:23 编辑

Intel编译器具体是什么版本?在学校集群上用module list和module avail查查看,有没有现成的Intel OneAPI模块可供调用?按理说这样的编译环境应该是集群管理员统一配置的,自己没root权限的话下载安装可能会有问题。用icc --version ; icpc --version ; ifort --version可以查看编译器版本。

看Finding Intel compiler from system paths那一段输出,找到的Intel编译指令是比较新的icx、icpx、ifx,但是CP2K官方的编译器支持列表认为应该用Intel的经典编译器。我之前也因为Intel编译器的问题折腾了几天,后来解决的方法是在运行install_cp2k_toolchain.sh时,用--with=intel=system并同时指定--with-intel-classic=yes,或许可以参考一下。

(这个列表也明确提到,GCC 4.8.5在x86_64系统上不能支持CP2K编译)
作者
Author:
abin    时间: 2024-10-30 15:16
问题在于:
/lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by

需要高版本的GLIBC

你可以问问AI, Linux发行版,如何升级GLIBC版本?

CentOS7.9 提供的套件太古老, 无法编译cp2k.2024.3版本的.
需要其他的技能.

同时, 你采用的编译方式, 用到-xHost选项,
如果主控节点master node, 和 计算节点/slave node处理器支持的指令集不同,
可能遭遇某些计算运行失败.
并不是说, 不能编译, 而是编译成功后, 会部分环节运算失败.


作者
Author:
lrh4    时间: 2024-10-30 15:43
Uus/pMeC6H4-/キ 发表于 2024-10-30 14:15
Intel编译器具体是什么版本?在学校集群上用module list和module avail查查看,有没有现成的Intel OneAPI模 ...

我看了您的帖子,我再试试看,十分感谢!!!
作者
Author:
lrh4    时间: 2024-10-30 15:44
abin 发表于 2024-10-30 15:16
问题在于:
/lustre/home/Liang4CP2K/intel/oneapi/compiler/2025.0/bin/compiler/clang++: /lib64/libc.so ...

明白了,那还是清空所有,再老老实实装2024.1版本。十分感谢您!!
作者
Author:
zzyzz    时间: 2024-11-6 16:54
lrh4 发表于 2024-10-30 15:44
明白了,那还是清空所有,再老老实实装2024.1版本。十分感谢您!!

您好想请问一下您安装成功了吗?




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