Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
13 Views

Compilation very slow for templates

Hi,

I am trying to compile an executable that uses template class.
The compilation is done using icpc default options (i.e. O2 level). If this is chosen, it takes around 45 mins and still does not finish compiling.
The compilation time is appreciable only when I use O0 level ( not even O1).
However, the same using g++, I am able to have same compilation time for O0, O1, O2 & O3 levels - there is no significant change in the time.
I am using 11.0 version for icpc.
Has anyone faced this issue? Any idea why the optimization is soo different for icpc & g++ ?

Thanks.
0 Kudos
1 Reply
Highlighted
Moderator
13 Views

only when -ipo is used it will slow down a lot, but not so much with only -O2.

it's more likely a bug in the compiler. is it slow in compiling or linking? If it's in compiling, could you send the code?

you can use "Private" post to upload code if you'd like or file a ticket to Intel Premier Support https://premier.intel.com/

Thanks,
Jennifer

0 Kudos