此记录为Ubuntu10.04安装Intel fortran 11.1.069

1、环境Ubuntu10.04系统,(如果是其他系统可以跳过第2步)
2、安装库支持和alien等
sudo apt-get install build-essential
sudo apt-get install libstdc++5
sudo apt-get install alien
sudo apt-get install g++-multilib
若某步出现安装不了软件包的现象,注意了,可能是中科大的源没有相应的更新包,这个时候需要
更换更好的源,具体方法为:打开  系统——软件源,把复选框都选上,然后点击主服务器,然后点击
选择最佳服务器,会出现一个测试,然后会帮你选择到测试到的最好的服务器。选择好后,再终端再输入
上述命令继续进行安装。

注意:执行sudo apt-get install libstdc++5时,可能出现“无法找到软件包libstdc++5”,自己在网上搜索下载这个文件,

得到一个compat-libstdc++-33_3.2.3-48.3_i386.deb安装包,然后cd 到deb包所在的位置,

执行sudo dpkg -i compat-libstdc++-33_3.2.3-48.3_i386.deb即可

3、到
http://www.intel.com/cd/software/products/apac/zho/343156.htm,选择英特尔® Fortran 编译器 Linux* 专业版 ,然后注册
,Intel会给用户发一封电子邮件,其中包含一个协议附件。剩下的工作是收取邮件,然后根据邮件中提供的地址下载软件l_cprof_p_11.1.069_ia32.tgz 。

4.1、创建 /opt/intel/licenses 目录
sudo mkdir -p /opt/intel/licenses


4.2 把邮件附件中的.lic文件拷贝到
/opt/intel/licenses目录下

5、 cd 到l_cprof_p_11.1.069_ia32.tgz 文件所在的目录,然后用命令tar -zxvf l_cprof_p_11.1.069_ia32.tgz  解压。

6、进入解压后的文件夹,./install.sh
7、选择1,typical安装
8、一路enter下去,有yes or no就输入yes,有accept or rejecet就输入accept
9、选择默认的安装路径即可,一路enter下去
10、若安装正常,应会提示安装成功;

11、
source /opt/intel/Compiler/11.1/069/bin/ifortvars.sh ia32
加入到 ~/.bashrc(其他Linux是~/.bash_profile文件) 文件末尾,保存退出。

12、注销,或者执行. .bash_profle,使配置文件生效

13、测试,which ifort,会显示安装路径。。。。。。
14、用vi编辑hello.f90

program hello

  print *,"hello fortran!"

end program hello

保存退出

15、用ifort -o hello  hello.f90编译文件 

16、运行./hello   结果出来了!


原文地址:https://www.cnblogs.com/liyanwei/p/1704853.html