Ubuntu 安装 intel fortran

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
gz159
帖子: 3
注册时间: 2007-07-12 12:35

Ubuntu 安装 intel fortran

#1

帖子 gz159 » 2007-07-12 12:42

1. First things first, install the prerequisite software packages:
Code:

sudo apt-get install rpm build-essential

2. Register at Intel's site for a non-commercial version of the Intel Fortran compiler.

http://www.intel.com/cd/software/pro...lin/219857.htm

Intel's site will send you an email that starts with the following:
Code:

Thank you for registering the Intel(R) Fortran Compiler for Linux*.

SAVE THIS SERIAL NUMBER
Your serial number for this registration is...

2. Download the compiler archive:

http://www.intel.com/cd/software/pro...ers/219717.htm

3. Extract the compiler archive
Code:

tar xvzf l_fc_p_10.0.023_ia32.tar.gz

4. Run the installer
Code:

cd l_fc_p_10.0.023_ia32
sudo ./install.sh

5. Choose Option 1 to install Intel Fortran; choose Option 1 to proceed with a serial number.

6. Type in the serial number (case-sensitive) given in the email. (XXXX-XXXXXXXX). Choose 1 for a default install.

7. Press Enter to read the license agreement. The spacebar speeds through this quickly. Type 'accept' to accept the license agreement.

8. Press Enter to accept the default install directory for the compiler. The installation of the compiler takes some time. Press Enter to continue.

9. Press Enter to accept the default install directory for the debugger. The debugger takes some time to finish. Press Enter to continue.

10. At this point, the installer seemed to stop. It can be exited with CTRL-C, and it does not seem to affect the install.

11. To make the binaries and shared libraries easily found, add the following lines to your .bashrc:
Code:

PATH="/opt/intel/fc/10.0.023/bin:$PATH"
export PATH
LD_LIBRARY_PATH="/opt/intel/fc/10.0.023/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH

好到这一步了,如果你运行ifort还会出现什么找不到g++的问题,可以先参考这里:

The installer for version 10.0 of the Intel® C++ and Fortran Compilers can detect Ubuntu* 6.10 and Ubuntu 7.04 systems and patch the compiler scripts during installation to enable these to run correctly. We are looking at changing the compiler scripts to avoid the required patching in future releases.

If you are using an older version of Ubuntu, or an older version of Intel C++ and Fortran Compilers for Linux, the following steps will help guide you to installing and running on Ubuntu systems. We encourage customers to report problems on unsupported operating systems, as it is possible the problem will reproduce on a supported operating system or we could create a feature request for problems that only occur on unsupported systems.

1. Ensure that GNU C++ compiler g++, as well as standard C++ library libstdc++.so.5 (typically found in /usr/lib/libstdc++.so.5 ) are installed on the machine. Linkage to libstdc++.so.5 library is required by Intel Compilers on all Linux distributions.

Please refer to your Linux distributor's installation materials for installation procedure, and details on the specific compatibility standard C++ library package that provides the required libstdc++.so.5 library.

2. Follow the installation steps outlined in INSTALL.txt to install either the C++ compiler l_cc_p_10.0.xxx.tar.gz compiler package or the Fortran compiler, l_fc_p_10.0.xxx.tar.gz, you've obtained, where xxx is the release number of this compiler. This file is part of the compiler download package.

3. After executing the install script "install.sh" from the directory where the tar file was extracted, for the C++ compiler it's possible to get the following warning messages given below. (Note that <n> in test_cc.<nnnnn>.log file can be different than shown here).
--------------------------------------------------------
Testing C/C++ compilers ...
Problems with C compiler: Output not equal to <Hello, World! C>
See /tmp/test_cc.15904.log for details.

NOTE: If using a FLOATING or NODE-LOCKED license file, ignore this message.
Press ENTER to continue.

Problems with C++ compiler: Output not equal to <Hello, World! C++>
See /tmp/test_cc.15904.log for details.

NOTE: If using a FLOATING or NODE-LOCKED license file, ignore this message.
Press ENTER to continue.


The /tmp/test_cc.15904.log file will read:

export: 36: Illegal option -n
export: 36: Illegal option -n
./.././data/install_cc.sh: line 3007: /tmp/test_cc.15904: No such file or directory
Problems with C compiler: <>!=<Hello, World! C>
--------------------------------------------------------

4. This step patches the compiler scripts. The usage of "export -n" in the compiler scripts is only supported on bash and not on POSIX sh. To enable the compiler to work correctly, change the line "/bin/sh" to "/bin/bash" found in the following script files in the <INSTALL_DIR>/bin/ directory (<INSTALL_DIR> is the directory where the compiler is installed Ex: /opt/intel/cc/10.0.xxx for the 10.0 C++ compiler, or /opt/intel/fc/10.0.xxx for the 10.0 Fortran compiler).

Files to change for the C++ compiler:
icc
icpc
iccvars.sh
uninstall.sh
profrun

Files to change for the Fortran compiler:
ifort
ifortvars.sh
uninstall.sh
profrun

5. Also, if you've installed the debugger idb, then change the line "/bin/sh" to "/bin/bash" found in the following script files in the <INSTALL_DIR>/bin/ directory (<INSTALL_DIR> is the directory where the debugger is installed Ex: /opt/intel/idb/10.0.xxx).

idb
idbvars.sh
uninstall.sh
mpirun_dbg.idb

6. The installation is now complete, and the compiler should be ready for use.

如果还出现错误则时候我们需要在~/.profile 添加这里一行
export LC_ALL=zh_CN.UTF-8

然后你就可以放心的运行ifort了。
上次由 gz159 在 2007-07-12 12:48,总共编辑 1 次。
gz159
帖子: 3
注册时间: 2007-07-12 12:35

#2

帖子 gz159 » 2007-07-12 12:43

对了我的ubuntu的版本为7.04
iamordinary
帖子: 17
注册时间: 2006-08-30 18:31

Re: Ubuntu 安装 intel fortran

#3

帖子 iamordinary » 2007-09-01 8:12

1-5都没问题

6. Type in the serial number (case-sensitive) given in the email. (XXXX-XXXXXXXX). Choose 1 for a default install.
第6步之后出现这个:

WARNING:
Problem encountered executing CHKLIC_32_64 utility /home/aero/Intel/Intel Fortran Compiler for Linux/l_fc_p_10.0.023_ia32/data/chklic.32
This could be caused by a missing library.
The CHKLIC_32_64 program chklic.32 requires these libraries:
linux-gate.so.1 =>
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0
libm.so.6 => /lib/tls/i686/cmov/libm.so.6
libgcc_s.so.1 => /lib/libgcc_s.so.1
libc.so.6 => /lib/tls/i686/cmov/libc.so.6
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2
/lib/ld-linux.so.2
Please ensure that these libraries are installed on your system.

请问这是怎么回事?不好意思,新手,很多东西不懂,google过了,英文论坛上有类似问题,可是没有找到解决办法
iamordinary
帖子: 17
注册时间: 2006-08-30 18:31

#4

帖子 iamordinary » 2007-09-01 8:13

忘了说了,我也是7.04
回复