ubuntu 10.04安装 fortran 90
来源:互联网 发布:手机打鱼辅助软件 编辑:程序博客网 时间:2024/05/08 14:24
安装fortran 90
1 安装前需要的支持
1.1 环境Ubuntu10.04系统,(如果是其他系统可以跳过第2步)
1.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即可
1.3 到http://www.intel.com/cd/software/products/apac/zho/343156.htm,
选择英特尔® Fortran 编译器 Linux* 专业版 ,然后注册,Intel会给用户发一封电子
邮件,其中包含一个协议附件。剩下的工作是收取邮件,然后根据邮件中提供的地址下载软件
l_cprof_p_11.1.069_ia32.tgz 。
1.4 创建 /opt/intel/licenses 目录
sudo mkdir -p /opt/intel/licenses
1.5 把邮件附件中的.lic文件拷贝到
/opt/intel/licenses目录下
///////////////////////如果能上网的话.lic文件可以不处理///////////////////////
2 开始安装 fortran 90
2.1 cd 到l_cprof_p_11.1.069_ia32.tgz 文件所在的目录,
然后用命令tar -zxvf l_cprof_p_11.1.069_ia32.tgz 解压。
2.2 cd 进入解压后的文件夹,./install.sh
2.3 选择 1,typical安装
2.4 一路enter下去,有yes or no就输入yes,有accept or rejecet就输入accept
2.5 选择默认的安装路径即可,一路enter下去
2.6 若安装正常,应会提示安装成功;
2.7 用vi编辑hello.f90
program hello
print *,"hello fortran!"
end program hello
保存退出
2.8 用ifort -o hello hello.f90编译文件
///////////////////////注意修改////////////////////////////
3 问题解决
但是在编译的时候 ifort -o hello hello.f90 会提示:
ifort: command not found 按下面的步骤do
将
source /opt/intel/Compiler/11.1/069/bin/ifortvars.sh ia32
069是你自己文件名,因各自的机器不同而定
加入到 ~/.bashrc(其他Linux是~/.bash_profile文件) 文件末尾,保存退出。
2.9 注销,或者执行. .bash_profle,使配置文件生效
测试,which ifort,会显示安装路径。。。。。。
3 编译执行
ifort -o hello hello.f90
出现一个hello的文件
运行./hello 结果出来了!
- ubuntu 10.04安装 fortran 90
- ubuntu gutsy 下安装 Intel C++/Fortran 编译器
- Ubuntu 9.10 64bits 安装 intel fortran 11 编译器(转)
- ubuntu 14.04 (64位)下 安装 intel fortran (ifort) 免费版
- Fortran 90学习之旅(一)Compaq Visual Fortran 6.5 的安装与第一个例子
- Fortran 90学习之旅(一)Visual Fortran 6.5 的安装与第一个例子
- 安装intel fortran
- Ubuntu Linux系统安装intel ifort Fortran和 C++编译器注意事项
- fortran 编译器安装(转载)
- fortran安装2(转载)
- 在Linux安装Fortran编译器
- 在Linux安装Fortran编译器
- Fortran 90 Tutorial
- Fortran
- fortran
- fortran
- [转载]Fortran 77, C, C++ 和 Fortran 90 的比较
- 安装gcc/c++/fortran, centos6.3 rpm
- TinyXml快速入门
- 163editor 网页编辑器 获值
- DataTable.Merge 方法 (DataTable)
- ubuntu9.10 下安装ibus-sunpinyin
- Access error:Selected Collating Sequence Not Supported
- ubuntu 10.04安装 fortran 90
- 通过进程找窗口
- 在php图片中输入中文文字解决乱码
- ubuntu10.04 安装mpich2-1.0.8
- C++ 中 struct 和 class 的联系和区别
- AjaxPro的使用步骤
- Open Source Licenses
- android services——学习
- 修改 RCP 编辑器和视图标题菜单