Intel C Compiler for Linux

Intel-logo.png
Linux-logo.png

Contents

ICC vs GCC

The gcc compiler on Linux is practically ubiquitous. Is is available in every distro's repository and most people use it compiling software when binaries are not available.

However, there are other options for compilers for Linux available, and to my surprise I recently learned the Intel C and Fortran Professional Compilers for Linux are free (almost as in beer) for non-commercial use and are fully functional.

While interesting, why would you bother using another compiler? GCC works and is open source all the way baby so why not just use it as you always have?

Speed. Lots of it. The Intel C Compiler (ICC) optimizations can at times yield a 30% performance gain when applications are compiled with them.

Further, my new Acer Aspire One has its own Intel CFLAG of -xL which while supported in icc is not at this time recognized by gcc.

Where to get it

Pop on over to the Intel site to grab your free C compiler for IA32, IA64 and Itanium platforms. Look around and find some other goodies too like Vtune and Threadchecker.

Installation on Linux system is very straight forward. Previously I believe the icc was an RPM, requiring use of alien for Debian user, etc. but now they are .tar.gz files with a single install.sh script to run - easy as pie.

Using ICC

Pay attention to the documentation included for icc, available at the Intel ICC home site, and also available directly here especially the section on setting up the compiler environment

In addition to running the set up script (usualy with source <install-dir>/bin/iccvars.sh) you may have to modify any make file to ensure the CC CFLAGS and other options are set correctly as the Intel compiler and the gcc use different options and CFLAGS.

Dipping Your Toe

For myself, I keyed off Macles* blog and decided to set loose the dogs of compiler war using a perfect test application, a chess engine to learn about the different compiler flags and benchmark results. Check out his blog and you may find my article Crafty Chess Compiler Benchmarks for some additional pointers.

Add an IDE?

Why stop there? Go ahead and add a side order of an Integrated Development Environment, perhaps Eclipse C/C++ Development Toolkit which integrates with the Intel C compiler.

Installing Eclipse C/C++ is as easy as downloading it and running the install script. Be patient, it takes a few minuets.

While really more suited to larger C projects, it is worth playing around with if you have not used it before. My limited programming skills make VI just fine, but I look forward to learning more about Eclipse and how to use it.

Looking for something?

Use the form below to search the wiki:

 

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!