Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ctech_Ctech
Beginner
92 Views

simple steps to get started using icc

Hi All,

I have recently installed Intel C++ compiler for Linux in Ubuntu, and got it working.

Since I am new to icc, can you please suggest me some simple steps in terms of compiler options, pragmas, etc to apply which will let me see the performance difference compared to gcc ?

A beginner level document would be also a good starting point.

I already read release notes and product briefs, which do not contain enough information.

Thanks.
0 Kudos
4 Replies
Yang_W_Intel
Employee
92 Views

You may read the Getting Started document to get started.
Regarding the compiler options for performance, please refer to the doc: Intel C++ Compiler User and Reference, there is a section for performance: Optimizing Applications.
Om_S_Intel
Employee
92 Views

Try compiler options /QxSSE4.2, /Qipo and profile guided options /Qprof_use. You leasrn more on these options from Compiler user guide.

Quoc-An_L_Intel
Employee
92 Views

In the user guide look at topics oninterprocedural optimization, vectorization, and auto parallel. Optimization option such as O2, O3.
TimP
Black Belt
92 Views

For a comparison between gcc and icc on Core I7, in order to include vector optimizations such as sum reduction, I would use comparable options
icc -O3 -xSSE4.2 -openmp -ansi-alias -std=c99 -prec-div -prec-sqrt bench.c
gcc -O3 -msse4.2 -mtune=barcelona -openmp -std=c99 -ffast-math -fno-cx-limited-range -mno-recip -funroll-loops --param max-unroll-times=4 bench.c
and I would test the gcc version with both libgomp and libiomp5.
Important options for getting remarks about optimization from the compiler include additional options
gcc -ftree-vectorizer-verbose=2
icc -opt-report
TBB might be more useful than OpenMP, if using C++, depending on the nature of the application.
Intel performance libraries work with both compilers; they come at no extra charge with icc.
Both compilers support link-time optimization (lto/ipo) and profile feedback.
Evidently, there are enough options that you would have to make a decision on what is relevant for your choice of application and platform, after consulting the docs for both compilers. You can see how most people would see a contradiction between a desire for simplicity and a desire to compare optimization of multiple compilers.
Reply