Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
7680 Discussions

Vectorization on a regular Xeon processor with icc

Tim_S_4
Beginner
137 Views

Hello,

we have access to a Xeon Phi board and we run our experiments with -mmic -openmp to take advantage of the vectorization units.
So, our next step is to run the experiments on a regular Intel Xeon CPU E3-1240 V2. How can I activate the vectorization units there?
Is there a similar flag?

Cheers!

Tim

 

0 Kudos
6 Replies
jimdempseyatthecove
Black Belt
137 Views

Well you would not include -mmic

You might try -xHost (/xHost) and include some level of optimization O1, O2, ...

Jim Dempsey

Tim_S_4
Beginner
137 Views

Hello Jim,

thanks for your response. Deleting -mmic is right, however, I need some new flag to optimize/utilize the vector unit on the Intel Xeon CPU E3-1240 V2.
Unfortunately, in terms of optimization etc. I find only documentation for Xeon Phi Mic. I tried the flags -avx and -sse4_2, however, icc says "ignoring unknown option.

Have you ever worked with these flags?

Cheers!
Tim

Vladimir_P_Intel2
137 Views

Hello, Tim.

the great option is -xHost  if you build and run on the same hardware like Jim mentioned.

For your case you can also use -xAVX or -axAVX options. according to documentation -mavx is also supported.

--Vladimir

TimP
Black Belt
137 Views

If you're thinking of gcc style options there are -mavx etc.

In case you're allergic to full documentation there's icc -help.

Tim_S_4
Beginner
137 Views

Hello,

thank you very much for the pointers. Yes, -xavx works for me. I am a little surpprised
why Xeon Phi Mic has the prefix -m and the Xeon has the prefix -x :)

Also, I made an interesting observation. First, I compiled my programs with icc v.13 and
there was no speedup at all. Instead, the execution time slowed down. With icc v.16 there
was a speedup of 47 percent.

Cheers!

Tim

Vladimir_P_Intel2
137 Views

-mavx should also work. you have passed -avx without 'm' and it failed.

--Vladimir

Reply