Linux/Tip2012. 10. 1. 06:58

Using Intel Compilers for Linux with Ubuntu

 

 

rev history: 

2009 November 3:  added notes for Ubuntu 9.10

 

Introduction :

 

 

Using Intel(R) Compilers version 11.1 under Ubuntu (9.10, 9.04, 8.04 and 8.10) Desktop and Debian Desktop

 

For older Ubuntu and Debian versions, see THIS ARTICLE.  Make sure to use the latest Intel Compilers version 11.1.  Older compilers will not be compatible with the latest Ubuntu distributions.  For compatibility and supported versions always read the ReleaseNotes document for your compiler.

 

These notes apply to Ubuntu Desktop.  Ubuntu Server was not tested but should be similar.

 

2 November 2009:  Ubuntu 9.10

 

For users of Ubuntu 9.10, follow the instructions here.  If you have 9.04 or older, skip ahead to the section titled "Ubuntu 9.04 and Older"

 

BEFORE YOU INSTALL Intel(R) Fortran for Linux or Intel(R) C++ for Linux on your fresh Ubuntu Desktop installation, you will first need to install several packages to prepare the system to serve as a development platform.  First, open a Terminal window and become root:

sudo bash
(type your user password)

At this point, you should have a root shell.  Test this with command 'whoami' which should return "root"

Check that gcc is installed. By default. Check this with:

gcc --version

It should return "gcc (Ubuntu 4.4.1-4ubuntu8) 4.4.1 (or some newer version - as long as it returns a version  you have gcc installed)

If, for some reason, you do not have gcc installed, use Synaptic Package Manager (under 'System' -> 'Administration' menus) OR use apt-get to install gcc:


apt-get install gcc


Next, install the 'build-essential' package and package g++. This is not installed by default. Again, use Synaptic Package Manager or apt-get :

apt-get install build-essential

this should also install g++, but in test this with:
g++ --version

if g++ is not found, install it:

apt-get install g++

A few other packages are required:
apt-get install rpm
apt-get install ia32-libs    (this is only required on 64bit Ubuntu/Debian systems)

To use the Intel IDB graphical debugger, you will also need the Java JRE 5 or 6 installed.  We recommend the Sun JRE:

get the latest JRE from:

http://java.com/en/download/manual.jsp

OR you can use the OpenJDK from the distribution:

apt-get install openjdk-6-jre-headless

Next, Ubuntu 9.10 Desktop does not provide libstdc++5, which is required for the Intel Compilers.  You will have to get the package for libstdc++5 from an older Debian or Ubuntu distribution ( 9.04 for example ).  A repository is here:

http://packages.debian.org/stable/base/libstdc++5

On this page, you will see the title "The GNU Standard C++ Library V3".  Scrolling down, find the table for "Download libstdc++5".

9.10:  For 32bit Ubuntu i386 libstdc++5 Installation:
For 32bit  Ubuntu systems you will need to install the 32bit version of libstdc++5, that is, the "i386" package.
Select the download for the libstdc++5 package for "i386".  Pick a mirror site to begin the download.  If you are using Firefox, you will be prompted if you want to "Open with GDebi Package Installer" - select OK to continue.  Otherwise, save the deb package and use your favorite package manager to install.  Install the i386 libstdc++ deb package.  SKIP the Intel 64 Libstdc++5 (AMD64) directions below and find the section on installing the compiler after prerequisites are installed.

9.10: For Intel 64 / AMD64 (64bit Linux installation) Libstdc++5:
follow these instructions IF AND ONLY IF you have a 64bit Ubuntu installation. 

Intel 64 installation:  Select the download for the libstdc++5 package for "amd64".  If you are using Firefox, you will be prompted if you want to "Open with GDebi Package Installer" - select OK to continue.  Otherwise, save the deb package and use your favorite package manager to install.  Install the amd64 libstdc++ deb package.

by default, the 64bit libstdc++.so.5 library will install in /usr/lib which is linked to /usr/lib64. 

Now, you also will need the 32bit libstdc++.so.5 installed in /usr/lib32.  Unfortunately, the "i386" version of the libstdc++5 package wants to install in /usr/lib which is your 64bit library directory and where you just installed the "amd64" libraries - so you DON'T want to download and install the "i386" package into the default location. 
We'll need to download the "i386" package to a temporary directory, use dpkg to extract the contents to the temp directory, then manually copy the library to /usr/lib32 and create the symbolic link:

First, download libstc++5 package for "i386" - save to disk and do NOT launch a package manger to install it.  Save it in your 'Downloads' folder or /tmp (or any other scratch directory).
Using your root terminal window, cd to the directory where you have downloaded the .deb package, it should have a name similar to 'libstdc++5_3.3.6-18_i386.deb'.  The exact version is not important, but make sure it is a "i386" deb package.
Extract to the local directory:

dpkg --extract libstdc++5_3.3.6-18_i386.deb  ./

Notice that a 'usr/' folder was created and the package contents extracted here.  Now we'll copy the library to /usr/lib32

cd usr/lib
cp libstdc++.so.5.0.7 /usr/lib32
cd /usr/lib32
ln -s libstdc++.so.5.0.7 libstdc++.so.5


9.10: Installing the Compiler Now That Prerequisities are Installed (32 and 64bit):

Once you've completed the above, extract your compiler .tgz kit, cd to the compiler installation directory, and run ./install.sh

During the installation, you WILL get a warning message "Detected operating system Debian* (generic) is not supported", followed by
----------------------------------------------------------------- ---------------
Missing optional pre-requisite
-- operating system type is not supported.
-- system glibc or kernel version not supported or not detectable
-- binutils version not supported or not detectable
----------------------------------------------------------------- ---------------
"Would you like to perform an unsupported install of this product [yes/no] (no)?"

enter "yes"

This will complete the installation.  Keep in mind, you will get this warning from the compiler installer until such time as this particular OS and version are supported. Once installed, you can read the ReadMe notes in ...installdir.../Documentation directory which has a list of the supported Linux distributions and versions.




Ubuntu 9.04 and Older:

In order to use Intel(R) Compilers ( Fortran or C++ ) under Ubuntu 9.04, 8.04 or 8.10 you will need the latest 11.0 or 10.1 version of the Intel compiler(s). Older 10.0 and 9.1 versions of the compilers may not work properly under Ubuntu 9.04, 8.04 or 8.10.  Keep in mind that new versions of Ubuntu/Debian may not be OFFICIALLY supported by the Intel Compilers.  Please see your ReleaseNotes document with your compiler version for a list of officially supported distributions and versions.

If you have active support for your compiler, you can download the latest Intel compiler version from
https://registrationcenter.intel.com

BEFORE YOU INSTALL Intel(R) Fortran for Linux or Intel(R) C++ for Linux on your fresh Ubuntu Desktop installation, you will first need to install several packages to prepare the system to serve as a development platform:

Check that gcc is installed. By default. Check this with:

gcc --version

By default, Ubuntu 8.04 Desktop installs gcc 4.2.3-2ubuntu7.  8.10 should have gcc 4.3.2, 9.04 gcc 4.3.3

If, for some reason, you do not have gcc installed, use Synaptic Package Manager (under 'System' -> 'Administration' menus) OR use apt-get to install gcc:


apt-get install gcc


Next, install g++. This is not installed by default. Again, use Synaptic Package Manager or apt-get to install package "g++"

apt-get install build-essential
apt-get install g++


Next, you need to install the 32bit compatibility library libstdc++.so.5. To do this, use apt-get or Synaptic Package Manager to retrieve and install package "libstdc++5"

apt-get install libstdc++5

This package may require installing another package as a prerequisite,
"gcc-3.3-base"

If so, go ahead and install this older gcc package.

For x86-64 architecture, you will also need a number of other packages, including package 'ia32-libs' to install the 32bit versions of libstdc++.so.5 in /usr/lib32 as well as 32bit header files in libc6-dev-i386.   These notes apply to Ubuntu 9.04 but should also apply to 8.10 and 8.04

apt-get install ia32-libs
apt-get install lib32stdc++6
apt-get install libc6-dev-i386
apt-get install gcc-multilib
apt-get install g++-multilib


Finally, there is an optional package to consider: The 11.0 version of the Intel Compiler for Linux has a graphical
debugger, a new graphical interface for the IDB debugger. If you want to use this debugger, please make sure to install the Java JRE version 1.5 or greater. This can be done at anytime after the installation of the compiler. However, you will get a warning message about 'missing prerequisite' for the JRE - simply ignore that message and proceed with the installation.  OR to avoid that message and enable the graphical IDE, get the latest JRE from:

http://java.com/en/download/manual.jsp

Once installation of prerequisites is complete, you are ready to start the Intel compiler(s) installation. During the installation, you may get a message "Detected operating system Debian* (generic) is not supported", followed by
----------------------------------------------------------------- ---------------
Missing optional pre-requisite
-- operating system type is not supported.
-- system glibc or kernel version not supported or not detectable
-- binutils version not supported or not detectable
----------------------------------------------------------------- ---------------
"Would you like to perform an unsupported install of this product [yes/no] (no)?"

enter "yes"

This will complete the installation.  Keep in mind, you will get this warning from the compiler installer until such time as this particular OS and version are supported. Once installed, you can read the ReadMe notes in ...installdir.../Documentation directory which has a list of the supported Linux distributions and versions.

 

 

http://software.intel.com/en-us/articles/using-intel-compilers-for-linux-with-ubuntu/

 

 

Install Intel Compiler(icc) in Ubuntu 8.10

To install icc in Ubuntu:


  1. Download icc from Intel website

  2. tar -zxvf the file.

  3. Run 'install.sh'.

  4. Follow the installer instructions.

  5. When it is done add this line to your ~/.bashrc (or initialization script):
    source /opt/intel/Compiler/11.0/069/bin/iccvars.sh ia32
    Replace ia32 with your platform: (ia32, intel64, ia64)

  6. Log off and log in and that is it. You can test it with icc -v

  7. To use icc with a configure script use ./configure CC=icc


NOTE: If you get a libimf.so error like "file does not exists" while using sudo, you will need to write a bash script adding "source /opt/intel/Compiler/11.0/069/bin/iccvars.sh" and the program you are trying to run.

 

 

http://crazyprogrammerblog.blogspot.com/2008/11/install-intel-compilericc-in-ubuntu-810.html

'Linux > Tip' 카테고리의 다른 글

ubuntu : ko_KR.UTF-8을 ko_KR.EUC-KR로 바꾸는 방법  (0) 2012.10.01
Ubuntu MySQL utf-8 설정  (0) 2012.10.01
아파치 설치  (0) 2012.10.01
우분투 - 호스트네임 설정  (0) 2012.10.01
우분투 : 아파지 서버의 설정 방법  (0) 2012.10.01
Posted by 쿨한넘