Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7943 Discussions

Vectorization on a regular Xeon processor with icc

Tim_S_4
Beginner
278 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
Honored Contributor III
278 Views

Well you would not include -mmic

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

Jim Dempsey

0 Kudos
Tim_S_4
Beginner
278 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

0 Kudos
Vladimir_P_1234567890
278 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

0 Kudos
TimP
Honored Contributor III
278 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.

0 Kudos
Tim_S_4
Beginner
278 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

0 Kudos
Vladimir_P_1234567890
278 Views

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

--Vladimir

0 Kudos
Reply