Ubuntu 安装 intel fortran

为当前最终发行版之前的所有版本提供支持
回复
gz159
帖子: 3
注册时间: 2007-07-12 12:35
送出感谢: 0
接收感谢: 0

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
送出感谢: 0
接收感谢: 0

#2

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

对了我的ubuntu的版本为7.04
iamordinary
帖子: 17
注册时间: 2006-08-30 18:31
送出感谢: 0
接收感谢: 0

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
送出感谢: 0
接收感谢: 0

#4

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

忘了说了,我也是7.04
回复

回到 “老旧版本支持”