||
准备工作
此外,在Ubuntu下安装ifort之前,需要先安装一些软件包,如安装好g++、gfortran、libstdc++5
sudo apt-get install build-essential
sudo apt-get install g++
sudo apt-get install gcc-multilib
sudo apt-get install rpm
sudo apt-get install openjdk-6-jre-headless
sudo apt-get install libstdc++5
用ifort编译makefile程序时,经常出现libstdc++5.so.5找不到,解决办法是下载libstdc++5.so.5,将其中的libstdc++.so.5复制到/usr/lib/下(64位机子),或者/usr/lib32/内。
第一步
装ifort编译器和mkl数学库
1、命令tar -zxvf l_cprof_p_11.1.046
2、命令cd l_cprof_p_11.1.046
3、命令./install.sh
4、选择1 ***** view the license agreement
5、一直敲空格读完
6、输入:accept 回车
7、选3 ******alternative activation*****necessary
8、选2 ****use a licensefile
9、输入ifc.lic文件所在的全路径,到文件
10、选择Typical install
11、选1,选1,回车===>OK
12、设置环境变量,输入命令vi ~/.bashrc,加入如下两行后保存
环境变量(64位机)
source /opt/intel/Compiler/11.1/046/bin/intel64/ifortvars_intel64.sh
source /opt/intel/Compiler/11.1/046/mkl/tools/environment/mklvarsem64t.sh
环境变量(32位机)
source /opt/intel/Compiler/11.1/046/bin/ia32/ifortvars_ia32.sh
source /opt/intel/Compiler/11.1/046/mkl/tools/environment/mklvars32.sh
13、source ~/.bashrc
升级到ubuntu 16.04 LTS后,运行GMT出现
libhdf5_hl.so.6: cannot open shared object file: No such file or directory
解决办法:
http://packages.ubuntu.com/precise/amd64/libhdf5-serial-1.8.4/filelist
Download Page for libhdf5-serial-1.8.4_1.8.4-patch1-3ubuntu2_amd64.deb on AMD64 machines
from:
http://packages.ubuntu.com/precise/amd64/libhdf5-serial-1.8.4/download
*.deb文件可以直接在ubuntu上安装即可。
sudo find / -name libhdf5_hl.so.6
/usr/lib/libhdf5_hl.so.6 说明成功了。
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-6-27 16:53
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社