计算化学公社

 找回密码 Forget password
 注册 Register
楼主 Author: wmg166
打印 Print 上一主题 Last thread 下一主题 Next thread

[VASP] 求教大神,想查看intel编译器目录,怎样找到路径?

[复制链接 Copy URL]

1155

帖子

0

威望

4427

eV
积分
5582

Level 6 (一方通行)

16#
发表于 Post on 2023-8-4 12:56:56 | 只看该作者 Only view this author
wmg166 发表于 2023-8-4 11:04
[root@localhost ~]# echo $SHELL
/bin/bash
[root@localhost ~]# source compilervars.sh

你自己在标题上也写了也问了 “如何找到路径?”

说白了,程序就是快递小哥,你想寄快递,是不是要告诉快递小哥具体的地址?
比如 XX省 YY市 ZZ街 A楼 B号房间 收件人姓名 联系方式
这样快递小哥才能给你寄到啊

你之前还能 cd 到具体路径(相当于来到了 XX省 YY市 ZZ街 A楼 B号房间,所以之前你可以直接喊人名了),怎么这次你就不知道 cd 到具体路径了呢……
即使不事先 cd 到具体路径,也可以 source 的时候写路径,如下
  1. source /home/intel/parallel_studio_xe_2018_cluster_edition/bin/compilervars.sh
复制代码


另外,你的 Linux 系统是哪个发行版本? CentOS? Ubuntu? Rocky Linux?
是新安装的吗? 如果是,你是否安装了 gcc 编译器?从前面的报错看,可能没有安装 gcc,你需要根据发行版本来确定安装命令
CentOS 输入

  1. sudo yum install -y centos-release-scl
  2. sudo yum install -y devtoolset-9
  3. scl enable devtoolset-9 bash
复制代码



Rocky Linux 输入

  1. sudo dnf install epel-release
  2. sudo dnf install gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-gcc-gfortran
复制代码


Ubuntu 输入
  1. sudo apt install make build-essential g++ gfortran
复制代码



查看  gcc 的版本
  1. gcc -v
复制代码

257

帖子

0

威望

1167

eV
积分
1424

Level 4 (黑子)

17#
 楼主 Author| 发表于 Post on 2023-8-5 17:55:14 | 只看该作者 Only view this author
乐平 发表于 2023-8-2 11:15
你截图里至少有 parallel_studio_xe_2018_cluster_edition, l_BaseKit_p_2023.1,l_HPCKit_p_2023.1(即常 ...

我安装的是 paralellel_studio  ,这是我的输入,没找到,该咋办  求指点

[root@localhost ~]# find -name compilervars.sh
[root@localhost ~]# cd /
[root@localhost /]# find -name compilervars.sh
./home/intel/parallel_studio_xe_2018_cluster_edition/compilers_and_libraries_2018.0.128/linux/bin/compilervars.sh
./home/intel/parallel_studio_xe_2018_cluster_edition/bin/compilervars.sh
./home/intel/parallel_studio_xe_2018_cluster_edition/compilers_and_libraries_2018/linux/bin/compilervars.sh
[root@localhost /]# cd ./home/intel/parallel_studio_xe_2018_cluster_edition/bin/
[root@localhost bin]# source compilervars.sh intel64
WARNING: 'gcc' was not found
WARNING: 'gcc' was not found
[root@localhost bin]# cd
[root@localhost ~]# cd ./home/intel/parallel_studio_xe_2018_cluster_edition/compilers_and_libraries_2018.0.128/linux/bin/
-bash: cd: ./home/intel/parallel_studio_xe_2018_cluster_edition/compilers_and_libraries_2018.0.128/linux/bin/: No such file or directory
[root@localhost ~]# source compilervars.sh intel64
-bash: compilervars.sh: No such file or directory
[root@localhost ~]# cd ./home/intel/parallel_studio_xe_2018_cluster_edition/compilers_and_libraries_2018/linux/bin/
-bash: cd: ./home/intel/parallel_studio_xe_2018_cluster_edition/compilers_and_libraries_2018/linux/bin/: No such file or directory
[root@localhost ~]# cd /home/intel/parallel_studio_xe_2018_cluster_edition/bin/
[root@localhost bin]# source compilervars.sh intel64
WARNING: 'gcc' was not found
WARNING: 'gcc' was not found
[root@localhost bin]# cd ./home/intel/parallel_studio_xe_2018_cluster_edition/compilers_and_libraries_2018/linux/bin/
-bash: cd: ./home/intel/parallel_studio_xe_2018_cluster_edition/compilers_and_libraries_2018/linux/bin/: No such file or directory
[root@localhost bin]# cd
[root@localhost ~]# /home/intel/parallel_studio_xe_2018_cluster_edition/compilers_and_libraries_2018.0.128/linux/bin/
-bash: /home/intel/parallel_studio_xe_2018_cluster_edition/compilers_and_libraries_2018.0.128/linux/bin/: Is a directory
[root@localhost ~]# cd ./home/intel/parallel_studio_xe_2018_cluster_edition/compilers_and_libraries_2018.0.128/linux/bin/
-bash: cd: ./home/intel/parallel_studio_xe_2018_cluster_edition/compilers_and_libraries_2018.0.128/linux/bin/: No such file or directory
[root@localhost ~]# echo $SHELL
/bin/bash
[root@localhost ~]# source compilervars.sh
-bash: compilervars.sh: No such file or directory
[root@localhost ~]# source /opt/intel/parallel_studio_xe_2018/psxevars.sh intel64         (注意路径要对应你自己的安装路径)
-bash: syntax error near unexpected token `('
[root@localhost ~]# source ./home/intel/parallel_studio_xe_2018_cluster_edition/bin/compilervars.sh intel64
-bash: ./home/intel/parallel_studio_xe_2018_cluster_edition/bin/compilervars.sh: No such file or directory
[root@localhost ~]#

1155

帖子

0

威望

4427

eV
积分
5582

Level 6 (一方通行)

18#
发表于 Post on 2023-8-5 22:06:01 | 只看该作者 Only view this author
wmg166 发表于 2023-8-5 17:55
我安装的是 paralellel_studio  ,这是我的输入,没找到,该咋办  求指点

[root@localhost ~]# find -n ...

哎…… 你仔细看了我写的内容没有……

我后面写了如何查看 gcc 版本,以及如何安装 gcc

257

帖子

0

威望

1167

eV
积分
1424

Level 4 (黑子)

19#
 楼主 Author| 发表于 Post on 2023-8-6 10:49:35 | 只看该作者 Only view this author
乐平 发表于 2023-8-5 22:06
哎…… 你仔细看了我写的内容没有……

我后面写了如何查看 gcc 版本,以及如何安装 gcc

大神   安装您的指点,安装上gcc了 :
[root@localhost ~]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-9/root/usr --mandir=/opt/rh/devtoolset-9/root/usr/share/man --infodir=/opt/rh/devtoolset-9/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-9.3.1-20200408/obj-x86_64-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC)

257

帖子

0

威望

1167

eV
积分
1424

Level 4 (黑子)

20#
 楼主 Author| 发表于 Post on 2023-8-6 10:54:15 | 只看该作者 Only view this author
wmg166 发表于 2023-8-6 10:49
大神   安装您的指点,安装上gcc了 :
[root@localhost ~]# gcc -v
Using built-in specs.

接下来,是不是已经加载intel编译器了 ?  接下来为了避免每次都这么加载,输入这些吗:   source /home/intel/parallel_studio_xe_2018_cluster_edition/bin/compilervars.sh

1155

帖子

0

威望

4427

eV
积分
5582

Level 6 (一方通行)

21#
发表于 Post on 2023-8-6 14:10:26 | 只看该作者 Only view this author
本帖最后由 乐平 于 2023-8-6 15:21 编辑
wmg166 发表于 2023-8-6 10:54
接下来,是不是已经加载intel编译器了 ?  接下来为了避免每次都这么加载,输入这些吗:   source /home/ ...
是不是已经加载intel编译器了 ?

你目前只加载了 gcc,还没加载 Intel 编译器。
如果你需要用到 Intel 编译器,需要输入
  1. source /home/intel/parallel_studio_xe_2018_cluster_edition/bin/compilervars.sh
复制代码


然后检测是否成功加载了 Intel C 编译器
  1. icc -v
复制代码

检测是否成功加载了 Intel Fortran 编译器
  1. ifort -v
复制代码

检测是否成功加载了 Intel C++ 编译器
  1. icpc -v
复制代码

检测是否成功加载了 Intel MKL 数学库
  1. echo $MKLROOT
复制代码

检测是否成功加载了 Intel mpi
  1. which mpirun
复制代码
接下来为了避免每次都这么加载

什么叫为了避免每次都这么加载……  
需要用到编译器的时候,gcc 和 Intel 编译器都需要加载。
建议直接写入提交任务的脚本里,不建议直接写入 ~/.bashrc 环境变量文件里。

257

帖子

0

威望

1167

eV
积分
1424

Level 4 (黑子)

22#
 楼主 Author| 发表于 Post on 2023-8-6 15:14:59 | 只看该作者 Only view this author
乐平 发表于 2023-8-6 14:10
你目前只加载了 gcc,还没加载 Intel 编译器。
如果你需要用到 Intel 编译器,需要输入

[root@localhost ~]# source /home/intel/parallel_studio_xe_2018_cluster_edition/bin/compilervars.sh
compilervars.sh [-arch] <arch> [-platform <platform>]

  <arch> must be one of the following:
      ia32           : Set up for IA-32 target.
      intel64        : Set up for Intel(R)64 target.
  <platform> must be of the following:
      android        : Set to Android* target.
      linux          : Set to Linux* target.(default)

If the arguments to the sourced script are ignored (consult docs
for your shell) the alternative way to specify target is environment
variables COMPILERVARS_ARCHITECTURE to pass <arch> to the script
and COMPILERVARS_PLATFORM to pass <platform>

257

帖子

0

威望

1167

eV
积分
1424

Level 4 (黑子)

23#
 楼主 Author| 发表于 Post on 2023-8-6 15:16:06 | 只看该作者 Only view this author
[root@localhost ~]# icc -v
icc version 18.0.0 (gcc version 9.0.0 compatibility)

257

帖子

0

威望

1167

eV
积分
1424

Level 4 (黑子)

24#
 楼主 Author| 发表于 Post on 2023-8-6 15:16:48 | 只看该作者 Only view this author
[root@localhost ~]# ifort -v
ifort version 18.0.0

257

帖子

0

威望

1167

eV
积分
1424

Level 4 (黑子)

25#
 楼主 Author| 发表于 Post on 2023-8-6 15:19:03 | 只看该作者 Only view this author
本帖最后由 wmg166 于 2023-8-6 15:20 编辑
wmg166 发表于 2023-8-6 15:16
[root@localhost ~]# ifort -v
ifort version 18.0.0

大神,威武,基本都加载了,好像没有这个,怎么办:
ipcp -v
bash: ipcp: command not found

1155

帖子

0

威望

4427

eV
积分
5582

Level 6 (一方通行)

26#
发表于 Post on 2023-8-6 15:22:00 | 只看该作者 Only view this author
本帖最后由 乐平 于 2023-8-6 15:23 编辑
wmg166 发表于 2023-8-6 15:19
大神,威武,基本都加载了,好像没有这个,怎么办:
ipcp -v
bash: ipcp: command not found

icpc -v

前面笔误写错了,已经更正

另外,
  1. source /home/intel/parallel_studio_xe_2018_cluster_edition/bin/compilervars.sh intel64
复制代码


257

帖子

0

威望

1167

eV
积分
1424

Level 4 (黑子)

27#
 楼主 Author| 发表于 Post on 2023-8-6 15:27:45 | 只看该作者 Only view this author
乐平 发表于 2023-8-6 15:22
icpc -v

前面笔误写错了,已经更正

icpc -v
icpc version 18.0.0 (gcc version 9.0.0 compatibility)
   

大神厉害

257

帖子

0

威望

1167

eV
积分
1424

Level 4 (黑子)

28#
 楼主 Author| 发表于 Post on 2023-8-6 16:28:26 | 只看该作者 Only view this author
乐平 发表于 2023-8-6 15:22
icpc -v

前面笔误写错了,已经更正

大神,加载了 gcc和 Intel 编译器,之后,是不是要编译,产生库文件,是这样编译吗?
我输入: cd /home/intel/parallel_studio_xe_2018_cluster_edition/compilers_and_libraries_2018.0.128/linux/mkl/interfaces/fftw3xf   

make libintel64

最后一行出现:ar: creating libfftw3xf_intel.a
rm -rf ./obj_intel
make[1]: Leaving directory '/home/intel/parallel_studio_xe_2018_cluster_edition/compilers_and_libraries_2018.0.128/linux/mkl/interfaces/fftw3xf'
[root@localhost fftw3xf]#

1155

帖子

0

威望

4427

eV
积分
5582

Level 6 (一方通行)

29#
发表于 Post on 2023-8-6 20:50:21 | 只看该作者 Only view this author
wmg166 发表于 2023-8-6 16:28
大神,加载了 gcc和 Intel 编译器,之后,是不是要编译,产生库文件,是这样编译吗?
我输入: cd /home ...

这是编译 Intel MKL 对应的快速傅里叶变换库 fftw3 Fortran 版本。
你成功了。

257

帖子

0

威望

1167

eV
积分
1424

Level 4 (黑子)

30#
 楼主 Author| 发表于 Post on 2023-8-11 17:14:11 | 只看该作者 Only view this author
乐平 发表于 2023-8-6 20:50
这是编译 Intel MKL 对应的快速傅里叶变换库 fftw3 Fortran 版本。
你成功了。

太好了  ,谢谢大神指导,我接下来打算安装 vasp软件。  

本版积分规则 Credits rule

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

GMT+8, 2026-2-20 17:45 , Processed in 0.167591 second(s), 20 queries , Gzip On.

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