计算化学公社

标题: 求助 在centos8内下载cp2k出错 [打印本页]

作者
Author:
han-    时间: 2022-11-26 18:40
标题: 求助 在centos8内下载cp2k出错
各位老师,我在centos8上安装cp2k 2022.2版本,在输入“./install_cp2k_toolchain.sh --with-sirius=no --with-openmpi=install --with-plumed=install”时显示:
WARNING: (./install_cp2k_toolchain.sh, line 332) No MPI installation detected (ignore this message in Cray Linux Environment or when MPI installation was requested).
Compiling with 4 processes.
==================== Finding GCC from system paths ====================
path to gcc is /usr/bin/gcc
ERROR: (./scripts/stage0/install_gcc.sh) Cannot find g++, please check if the package gcc is installed or in system search path
[root@localhost build]#


(可是这个新版本的不是自带适用的gcc吗?)

然后我下载了gcc后 在激活时又显示:
[root@localhost gcc_install]# source ~/softwares/gcc9/env.sh
bash: /root/softwares/gcc9/env.sh: 没有那个文件或目录


(我看了路径是正确的,为什么一直显示没有文件呢?
此时我按下面路径看了一下是有gcc的
ERROR: (./scripts/stage0/install_gcc.sh) Cannot find g++, please check if the package gcc is installed or in system search path
[root@localhost build]#


各位老师,我现在应该如何处理这个问题呢?



作者
Author:
乐平    时间: 2022-11-26 19:58
然后我下载了gcc后 在激活时又显示:
[root@localhost gcc_install]# source ~/softwares/gcc9/env.sh
bash: /root/softwares/gcc9/env.sh: 没有那个文件或目录


仅仅是下载没用,你要先安装 gcc ,然后才能激活啊。
作者
Author:
highlight    时间: 2022-11-26 20:00
首先 ~/softwares/gcc9/env.sh 肯定是写教程的人自行安装后写的,你加载不到很正常
其次,提示的是你缺少 g++,那就通过 dnf 或 yum 安装就好
最后,就像我在原来帖子里的回复,不用纠结这些,直接添加 --with-gcc=install 脚本就会自己给你装好
作者
Author:
sobereva    时间: 2022-11-27 02:24
直接yum install gcc装gcc就完了
之后安装步骤严格照着下文,什么问题都不会有
CP2K第一性原理程序在CentOS中的简易安装方法
http://sobereva.com/586http://bbs.keinsci.com/thread-21608-1-1.html
作者
Author:
han-    时间: 2022-11-28 09:14
sobereva 发表于 2022-11-27 02:24
直接yum install gcc装gcc就完了
之后安装步骤严格照着下文,什么问题都不会有
CP2K第一性原理程序在Cent ...

老师,显示这个:
[root@localhost toolchain]# yum install gcc
上次元数据过期检查:1 day, 16:45:24 前,执行于 2022年11月26日 星期六 16时28分20秒。
软件包 gcc-8.5.0-17.el8.x86_64 已安装。
依赖关系解决。
无需任何处理。
完毕!
[root@localhost toolchain]# ./install_cp2k_toolchain.sh --with-sirius=no --with-openmpi=install --with-plumed=install
WARNING: (./install_cp2k_toolchain.sh, line 332) No MPI installation detected (ignore this message in Cray Linux Environment or when MPI installation was requested).
Compiling with 4 processes.
==================== Finding GCC from system paths ====================
path to gcc is /usr/bin/gcc
ERROR: (./scripts/stage0/install_gcc.sh) Cannot find g++, please check if the package gcc is installed or in system search path
[root@localhost toolchain]#

作者
Author:
han-    时间: 2022-11-28 09:21
highlight 发表于 2022-11-26 20:00
首先 ~/softwares/gcc9/env.sh 肯定是写教程的人自行安装后写的,你加载不到很正常
其次,提示的是你缺少  ...

老师,这个路径我是跟着一个帖子安装的 这个路径下我也是有的;
我安装g++显示如下:
[root@localhost cp2k-2022.2]# yum install g++
上次元数据过期检查:1 day, 16:48:58 前,执行于 2022年11月26日 星期六 16时28分20秒。
未找到匹配的参数: g++
错误:没有任何匹配: g++
[root@localhost cp2k-2022.2]#
而后按您说的直接添加:
[root@localhost toolchain]# ./install_cp2k_toolchain.sh --with-sirius=no --with-openmpi=install --with-plumed=install --with-gcc=install
WARNING: (./install_cp2k_toolchain.sh, line 332) No MPI installation detected (ignore this message in Cray Linux Environment or when MPI installation was requested).
You have chosen to install the GCC compiler, therefore MPI libraries have to be installed too
and the use of the Intel compiler and Intel MPI will be disabled.
Compiling with 4 processes.
==================== Installing GCC ====================
gcc-12.1.0.tar.gz is found
Installing GCC from scratch into /root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/install/gcc-12.1.0
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
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for libatomic support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... yes
checking for libphobos support... yes
checking for gcc... gcc
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 we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gcc option to accept ISO C99... none needed
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking whether g++ accepts -static-libstdc++ -static-libgcc... no
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking for gdc... no
checking whether the D compiler works... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=gnu++11... no
checking whether g++ supports C++11 features with -std=gnu++0x... no
checking whether g++ supports C++11 features with -std=c++11... no
checking whether g++ supports C++11 features with +std=c++11... no
checking whether g++ supports C++11 features with -h std=c++11... no
checking whether g++ supports C++11 features with -std=c++0x... no
checking whether g++ supports C++11 features with +std=c++0x... no
checking whether g++ supports C++11 features with -h std=c++0x... no
configure: error: *** A compiler with support for C++11 language features is required.
./scripts/stage0/install_gcc.sh:行73: make: 未找到命令
./scripts/stage0/install_gcc.sh:行78: make: 未找到命令
/root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/scripts/tool_kit.sh:行708: /root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/install/gcc-12.1.0/install_successful: 没有那个文件或目录
[root@localhost toolchain]#


作者
Author:
han-    时间: 2022-11-28 09:26
乐平 发表于 2022-11-26 19:58
仅仅是下载没用,你要先安装 gcc ,然后才能激活啊。

老师 已经下载完了呀 就是激活的时候显示没有文件
作者
Author:
sobereva    时间: 2022-11-28 09:33
han- 发表于 2022-11-28 09:14
老师,显示这个:
[root@localhost toolchain]# yum install gcc
上次元数据过期检查:1 day, 16:45:24 ...

yum install gcc-c++
另外,gfortran没装的话也用yum install gcc-gfortran装上

作者
Author:
han-    时间: 2022-11-28 09:43
sobereva 发表于 2022-11-28 09:33
yum install gcc-c++
另外,gfortran没装的话也用yum install gcc-gfortran装上

老师 都安装了,然后:
[root@localhost toolchain]# ./install_cp2k_toolchain.sh --with-sirius=no --with-openmpi=install --with-plumed=install
WARNING: (./install_cp2k_toolchain.sh, line 332) No MPI installation detected (ignore this message in Cray Linux Environment or when MPI installation was requested).
Compiling with 4 processes.
==================== Finding GCC from system paths ====================
path to gcc is /usr/bin/gcc
path to g++ is /usr/bin/g++
path to gfortran is /usr/bin/gfortran
Found include directory /usr/include
Found lib directory /usr/lib64
Step gcc took 0.00 seconds.
Step intel took 0.00 seconds.
==================== Getting proc arch info using OpenBLAS tools ====================
/root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/scripts/get_openblas_arch.sh:行51: make: 未找到命令
ERROR: (/root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/scripts/get_openblas_arch.sh, line 51) Non-zero exit code detected.
ERROR: (./scripts/stage0/setup_buildtools.sh, line 44) Non-zero exit code detected.
这个如何处理呀 老师
作者
Author:
sobereva    时间: 2022-11-28 09:45
han- 发表于 2022-11-28 09:43
老师 都安装了,然后:
[root@localhost toolchain]# ./install_cp2k_toolchain.sh --with-sirius=no -- ...

路径别有中文,自找麻烦
系统也别装成中文的。否则遇到报错提示都不好用google搜

yum install make


当初要是按我博文说的装系统,根本就不需要后来再自己装这些
(PS:常有人问我装CentOS 8的时候应该选什么,建议Base Environment选Workstation,组件选GNOME Applications、Legacy UNIX Compatibility、Development Tools、Scientific Support)





作者
Author:
han-    时间: 2022-11-28 09:58
sobereva 发表于 2022-11-28 09:45
路径别有中文,自找麻烦
系统也别装成中文的。否则遇到报错提示都不好用google搜

老师 这个中文目前还能改成英文吗?还是需要重新安装?
老师 我输入了yum install make,目前显示如下 是正确的吗?:
[root@localhost toolchain]# ./install_cp2k_toolchain.sh --with-sirius=no --with-openmpi=install
WARNING: (./install_cp2k_toolchain.sh, line 332) No MPI installation detected (ignore this message in Cray Linux Environment or when MPI installation was requested).
Compiling with 4 processes.
==================== Finding GCC from system paths ====================
path to gcc is /usr/bin/gcc
path to g++ is /usr/bin/g++
path to gfortran is /usr/bin/gfortran
Found include directory /usr/include
Found lib directory /usr/lib64
Step gcc took 0.00 seconds.
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.22.1-linux-x86_64.sh: 成功
Checksum of cmake-3.22.1-linux-x86_64.sh Ok
Installing from scratch into /root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/install/cmake-3.22.1
Step cmake took 14.00 seconds.
==================== Installing OpenMPI ====================
openmpi-4.1.1.tar.gz: 成功
Checksum of openmpi-4.1.1.tar.gz Ok
Installing from scratch into /root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/install/openmpi-4.1.1
Found directory /root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/install/openmpi-4.1.1/bin
Found directory /root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/install/openmpi-4.1.1/lib
Found directory /root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/install/openmpi-4.1.1/include
mpirun is installed as /root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/install/openmpi-4.1.1/bin/mpirun
mpicc is installed as /root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/install/openmpi-4.1.1/bin/mpicc
mpicxx is installed as /root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/install/openmpi-4.1.1/bin/mpicxx
mpif90 is installed as /root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/install/openmpi-4.1.1/bin/mpif90
Step openmpi took 506.00 seconds.
==================== Installing OpenBLAS ====================
OpenBLAS-0.3.20.tar.gz is found
Installing from scratch into /root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/install/openblas-0.3.20

作者
Author:
sobereva    时间: 2022-11-28 10:14
han- 发表于 2022-11-28 09:58
老师 这个中文目前还能改成英文吗?还是需要重新安装?
老师 我输入了yum install make,目前显示如下  ...

目前没问题
作者
Author:
han-    时间: 2022-11-28 11:33
sobereva 发表于 2022-11-28 10:14
目前没问题

==================== Installing ScaLAPACK ====================
scalapack-2.1.0.tgz: 成功
Checksum of scalapack-2.1.0.tgz Ok
Installing from scratch into /root/下载/cp2k-2022.2/cp2k-2022.2/tools/toolchain/install/scalapack-2.1.0
ERROR: (./scripts/stage4/install_scalapack.sh, line 51) Non-zero exit code detected.
老师,现在显示这个要怎么处理呀?
作者
Author:
3969832    时间: 2022-11-28 12:11
感觉你啥都不懂 建议你重装系统 按照一个完整的教程从头到尾做 你每次遇到错误自己不想直接到这儿问 一次两次还行 每个错误都直接复制过来 没人会理你的
作者
Author:
牧生    时间: 2022-11-28 12:12
本帖最后由 牧生 于 2022-11-28 12:18 编辑

估计不少人都被这个问题搞得高血压了,这个问题循环了几天了
好好照着喂饭式的教程操作不好吗??http://bbs.keinsci.com/thread-21608-1-1.html

(, 下载次数 Times of downloads: 16)


如果你在安装centos时,选择了带GUI以后,不知道右边的部分选什么,那就无脑全部选上。


如果实在太菜了,看这个帖子,把网盘中的文件下回来,按照教程进行。已经足够足够傻瓜了,一键操作,根本不需要动脑。
http://bbs.keinsci.com/thread-33603-1-1.html

作者
Author:
han-    时间: 2022-11-28 16:17
3969832 发表于 2022-11-28 12:11
感觉你啥都不懂 建议你重装系统 按照一个完整的教程从头到尾做 你每次遇到错误自己不想直接到这儿问 一次两 ...

好的老师 我重装系统
作者
Author:
han-    时间: 2022-11-28 16:18
牧生 发表于 2022-11-28 12:12
估计不少人都被这个问题搞得高血压了,这个问题循环了几天了
好好照着喂饭式的教程操作不好吗??http://b ...

好的 谢谢老师
作者
Author:
han-    时间: 2022-11-28 17:10
牧生 发表于 2022-11-28 12:12
估计不少人都被这个问题搞得高血压了,这个问题循环了几天了
好好照着喂饭式的教程操作不好吗??http://b ...

好的,谢谢您
作者
Author:
han-    时间: 2022-11-28 17:11
3969832 发表于 2022-11-28 12:11
感觉你啥都不懂 建议你重装系统 按照一个完整的教程从头到尾做 你每次遇到错误自己不想直接到这儿问 一次两 ...

好的 谢谢您 我重新装一下
作者
Author:
jim    时间: 2023-8-1 09:16
highlight 发表于 2022-11-26 20:00
首先 ~/softwares/gcc9/env.sh 肯定是写教程的人自行安装后写的,你加载不到很正常
其次,提示的是你缺少  ...

按照您的提示,确实能启动安装gcc,没出现楼主提示的情况,但会出现一大堆类似这样的error:
getarch_2nd.c:22:35: error: ‘SGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function); did you mean ‘SBGEMM_DEFAULT_UNROLL_M’?
   22 |     printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);





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