Installing Intel Compiler for Linux

Home / Installing Intel Compiler for Linux

Installing Intel Compiler for Linux

December 5, 2015 | Article | No Comments

Using Linux? Often compile application from source? Then you must be familiar with gcc. GCC is an official compiler used by GNU/Linux. But beside gcc there are many alternatives for compile C code in Linux. One of them is Intel’s Compiler.

Why use Intel Compiler? There are many reason, but for me there are two main reasons:

  1. I want to know about Intel’s compiler
  2. Intel made my processor, so why don’t I use compiler made by them?

How to obtain?

Officially Intel Compiler is not free. You must pay to install and use. But there is a choice you can afford. Intel offer Non-commercial version of Intel Compiler. But there is only one condition: you use it for only non-commercial purpose. In other means you are not allowed to use this compiler to produce application and then sell it. You are also not allowed to received any payment regarding your application compiled by this compiler. You can find out more at their site. If you agree to this then you can proceed.

Go to this page: http://software.intel.com/en-us/non-commercial-software-development

I recommend you to pick Intel Parallel Studio XE (at this time I write article is version 2013). Follow the instruction. You will have to fill form. Make sure you write correct email. Intel then will email you for next instruction. You will be given a license key for this non-commercial version and also a download link.

How to Install?

Now extract the downloaded package (assuming the package is parallel_studio_xe_2013_update1_intel64.tgz). Then you will have a folder with similar name. Install it by invoking the script provided at that directory. For a clear explanation, you can see this commands:

tar -xvf parallel_studio_xe_2013_update1_intel64.tgz
cd parallel_studio_xe_2013_update1_intel64
./install.sh

Make sure you have acquired root privileges. Follow the instruction, it is self explained :D. Some linux distro is not support officially, such as Slackware. If so, the installer will complain about unsupported OS. But don’t worry, we can still proceed.

Once you are prompted by activation question, you can enter the license key you obtain from intel. If you do offline installation, you will be prompted again about remote registration and you will be given url and unlock code. Go to that url and enter the given code (the code is different by first license key). You will then given a new code. Copy it and paste it to the installer.

Wait for installation to complete.

Setting the Environment

Before using the compiler, we have to do some setting. Assuming installation on /opt/intel/

Using Intel(R) VTune(TM) Amplifier XE 2013 Update 2:

source /opt/intel/vtune_amplifier_xe_2013/amplxe-vars.sh

There are two ways to use VTune Amplifier XE 2013: GUI and CLI. To use GUI do amplxe-gui, while using CLI do amplxe-cl. The documentation can be found at /opt/intel/vtune_amplifier_xe_2013/documentation/en/welcomepage/get_started.html.

Using Intel(R) Inspector XE 2013 Update 2:

source /opt/intel/inspector_xe_2013/amplxe-vars.sh

There are two ways to use Inspector XE 2013: GUI and CLI. To use GUI do inspxe-gui, while using CLI do inspxe-cl. The documentation can be found at /opt/intel/inspector_xe_2013/documentation/en/welcomepage/get_started.html.

Using Intel(R) Advisor XE 2013 Update 1:

source /opt/intel/advisor_xe_2013/advixe-vars.sh

There are two ways to use Advisor XE 2013: GUI and CLI. To use GUI do advixe-gui, while using CLI do advixe-cl. The documentation can be found at /opt/intel/Advisor_xe_2013/documentation/en/welcomepage/get_started.html.

Using Intel(R) Composer XE 2013 Update 1 for Linux*:

If you run 32 bit platform, replace “intel64” with ia32.

source /opt/intel/bin/compilervars.sh intel64

Now, to invoke compiler from command prompt, issue:
For C++: icpc
For C: icc
For Fortran: ifort

Happy hacking 😀

,

About Author

about author

xathrya

A man who is obsessed to low level technology.

Leave a Reply

Your email address will not be published. Required fields are marked *

Social media & sharing icons powered by UltimatelySocial