分页: 1 / 1

[教学]如何安装Intel的fortran90编译器

发表于 : 2006-03-14 13:26
pihou
fortran90是一种用途广泛的语言,在科学工程计算,数值模拟等领域很有优势。这里安装fortran90编译器一般是用apt-get install gfortran或者apt-get install gfortran-4.0,其实Intel公司的fortran90编译器也很不错,速度更快,是免费的,只是需要注册一下。下面总结一下我昨天成功安装Intel® Fortran Compiler for Linux的经过,希望对大家有点帮助。

1. 下载并注册Intel® Fortran Compiler for Linux
https://registrationcenter.intel.com/Ev ... ductID=409
填写注册信息,填写完毕后按submit按钮提交。然后就会切换到下载页面,下载Intel® Fortran Compiler for Linux。注册提交后Intel会mail到你注册的email,里面有一个注册码。信件原文
SAVE THIS SERIAL NUMBER
Your serial number for this product evaluation is *****
或者为保险起见,直接到www.Intel.com,在搜索栏里输入fortran90,在搜索结果里找到Intel® Fortran Compiler for Linux并点击之,在接下来的页面里点击右边的 Free Evaluation Software进入注册页面。

2. 下载的是一个名为l_fc_c_9.0.031.tar.gz的压缩包,解压之,运行
$tar -zxvf l_fc_c_9.0.031.tar.gz
进入解压出的文件夹l_fc_c_9.0.031/,运行
$sudo ./install.sh
然后就进入安装界面,输入1,回车。
这时询问你注册号(serial number),输入Intel mail到你信箱里的那个号码。
接下来是选择典型安装还是自定义安装,新手推荐选1.typical installation。安装过程中询问安装路径,自己选择,推荐默认安装,直接回车。
然后就是列出使用条款,输入accept,回车。
最后请你注册,如果按照我写的步骤,前面已经注册过了,可以跳过,输入x后回车。

3. 进行一些设置
首先最好运行
$sudo gedit .bashrc
在文本末端添加如下内容
PATH="/opt/intel/fc/9.0/bin:$PATH"
export PATH
LD_LIBRARY_PATH="/opt/intel/fc/9.0/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH


保存文本,关闭。
接下来为为编译环境设置源运行
[$source <install-dir>/bin/ifortvars.sh
$source <install-dir>/bin/idbvars.sh
其中<install-dir>表示安装路径,第一行默认是/opt/intel/fc/9.0,第二行默认是/opt/intel/idb/9.0/,即如果默认安装,就运行
$source /opt/intel/fc/9.0/bin/ifortvars.sh
$source /opt/intel/idb/0.0/bin/idbvars.sh


4. 如果你之前没有添加运行库,则需要安装,否则不能编译
安装运行库可运行
$sudo apt-get install lsb

5. 至此安装结束,可尝试运行一下Intel提供的一个样本程序。运行
$ ifort /opt/intel/fc/9.0/doc/samples/int_sin.f90
看是否能成功编译,如果通过,再运行
$ ./a.out
查看程序执行情况。

发表于 : 2006-04-15 10:53
dbzhang800
我安装不成功

**********************************************************************
"Welcome to Installation"

Please make your selection by entering an option:

1. "Intel(R) Fortran Compiler 9.0 for Linux*" - install

1a. Readme
1b. Release Notes
1c. Installation Guide
1d. Product Web Site URL
1e. Intel(R) Support Web Site URL

x. Exit.

Please type a selection : 1

======================================================================

Please select an option to continue:
1. Proceed with Serial Number to install and register. [Recommended]
2. Provide name of an existing license file.
x. Exit.

Please type your selection : 2

======================================================================

Please provide the license file name with full path (*.lic)
x.Exit

License file path : /home/dbzhang/l_fc_c_9.0.031/noncommercial_for_l_NJ24-3TPWFC5S.lic

!!! Installation cannot proceed. !!!
The installation program was not able to find necessary
software packages/tools (rpm/rpm2cpio/alien) which are
required to install the product successfully.

发表于 : 2006-04-19 19:22
xhh928
我的安装了以后在运行ifort *.f90的时候会显示:cannot find directory in which g++ resides但是我明明已经安装了g++,不知道问题出在哪里