Sie sind auf Seite 1von 3

Using Intel Compilers for Linux with Ubuntu - Intel...

http://software.intel.com/en-us/articles/using-intel-...

Share

Home Articles Using Intel Compilers for Linux with Ubuntu

Submit New Article

Navigation: Linux and Mac OS X Compilers Installation Help Center: http://software.intel.com/en-us/articles/intel-compilerslinux-installation-help/


First, determine your needs and get the right installation tarball. Most linux users are on 64bit systems with x86_64 versions of linux installed. Do you need to create older 32bit applications? If not, download the Intel 64 ONLY tarball, the *_intel64.tgz file. Not only does this save download time, this will eliminate your need to install 32bit libraries on the development system. rev history: Ubuntu 11.04 25 May 2011: These notes are still applicable to Ubuntu 11.04. Composer XE 2011 (aka version 12.0) prerequisites for Ubuntu Desktop, assuming that gcc and g++ are installed already: apt-get install build-essential apt-get install gcc-multilib apt-get install rpm apt-get install ia32-libs (only needed if you install the 32bit compiler) apt-get install openjdk-6-jre-headless during the install, you can ignore any warnings about the missing Java prerequisite - it may not recognize openjdk-6-jre-headless. And like below, IF you are installing OLDER compilers versions 11.1 or older, you will need to install libstdc++.so.5 libs (see below).

08 February 2011: Ubuntu 10.10 and Compiler 12.x aka "Composer XE" notes: The Intel compiler 12.0 aka Intel Fortran Composer XE 2011 no longer requires libstdc++-5. It now uses libstdc++-6 which is present in newer Ubuntu distributions. Please ignore the notes below for the step to install libstdc++5 UNLESS you have an earlier 11.1 or older compiler. Read all the instructions below to install gcc, g++, build-essential, rpm etc. IF you have to install Intel Fortran 11.1 or older, on Ubu 10.10 sudo apt-get install libstdc++5 ELSE skip libstdc++5, your 12.x compiler uses libstdc++6 END IF

rev history: 29 April 2010: This guide also applies to Ubuntu 10.04. rev history: 2009 November 3: added notes for Ubuntu 9.10 Note: Newer versions of this linux distribution may NOT be officially supported by Intel Compiler Professional Editions 11.1. Please see your ReleaseNotes document with your compiler to find the support Linux distributions and versions. These instructions are merely to help install the compiler, keep in mind that versions of this distribution NOT in the ReleaseNotes document are NOT tested nor supported. You are on your own here. Introduction :

Using Intel(R) Compilers version 12.0 and 11.1 under Ubuntu (10.10, 10.04, 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. 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 10.10, 10.04, and 9.10 For users of Ubuntu 10 and 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 apt-get install gcc-multilib

1 de 3

15/02/12 17:38

Using Intel Compilers for Linux with Ubuntu - Intel...


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)

http://software.intel.com/en-us/articles/using-intel-...

To use the Intel IDB graphical debugger, you will also need the Java JRE 5 or 6 installed. One way to get this is through Synaptic package manager. Open Synaptic and for sources enable Ubuntu's partner repository. Once that is done, use Synaptic to fetch the package sun-java6-jre. We also recommend fetching the Sun JRE directly from Sun: 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.

Debugger Notes: Known Intel IDB Debugger issues under Ubuntu: 1) Ubuntu 9.x versions, IA32 and Intel64 platforms: When loading an executable, a startup dialog may appear that should not. If this dialog, "Unable to locate source file /start.S Do you like to search for it manually? appears, click No and continue normal debugging. Avoid using debug commands such as next, step on the Console Window of the Debugger GUI since this may lead to unexpected behavior of the debugger; use the corresponding options Continue, Step Into etc. from the Run menu instead. 2) Ubuntu 9.10, IA32 and Intel64 platforms: You need to set the environment variable GDK_NATIVE_WINDOWS=1 to avoid a known bug in Eclipse delivered with Ubuntu

2 de 3

15/02/12 17:38

Using Intel Compilers for Linux with Ubuntu - Intel...


9.10. Add export GDK_NATIVE_WINDOWS=1 to your ~/.bashrc file or execute this command on command line: *Trademarks export GDK_NATIVE_WINDOWS=1

http://software.intel.com/en-us/articles/using-intel-...

Intel Corporation

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 apt-get apt-get apt-get apt-get install install install install install ia32-libs lib32stdc++6 libc6-dev-i386 gcc-multilib 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.

Using the Compiler: The next step after installing the compiler is to set up the user environment to use the compiler and libraries. First, locate your documentation: it is installed in <installdir>/Documentation/en_US (currently, US English is the language supported in the documentation). Under this directory, read the <installdir>/Documentation/en_US/getting_started_f.pdf or getting_started_c.pdf document. Read how to use iccvars.sh or ifortvars.sh (or the .csh equivalents) to set your environment to use the compiler(s). You may wish to put the 'source ifortvars.....' command into your home startup scripts. Next, use a browser to open <installdir>/Documentation/en_US/documentation_f.htm or documentation_c.htm which is an index to the rest of the online documents. Browse the documents to familiarize yourself with their locations and contents. Finishing up: Usage Once the compilers are installed, it is necessary to source the ifortvars.sh or ifortvars.csh file to properly set the user environment to use the Intel compilers. This (these) commands can be placed in a user's ~/.bashrc or other system login file (fortran 11.1.046 example shown below, bash user): 64bit compiler selection: source /opt/intel/Compiler/11.1/046/bin/ifortvars.sh intel64

3 de 3

15/02/12 17:38

Das könnte Ihnen auch gefallen