New Contributor I
08-07-2010 10:48 AM
It's really not clear to me how the following options interact...
icpc -march=pentium4 -mtune=pentium4 -Xhost -msse -msse2 -msse3 -mssse3 -msse4.1
I'm building a local binary on an i7 CPU. Which, if any, of the above should I use? Will
get my everything I need?
08-07-2010 05:42 PM
If you "need" the maximum number of code paths for different architectures, -xhost won't do that; it will make only the -xsse4.2 path. Remember that ssse3 path is likely to be slower than the others when running on i7, and the compilers which support these notations don't support sse without sse2. -march=pentium4 should be a synonym for -msse2. If -mtune=pentium4 were observed, it would be detrimental on i7. I agree it's hard to predict the effect of specifying an excessive number of architecture options.
08-17-2010 02:23 PM
To clarify, If you're really building a binary to run only on the machine that you're building on (or other machines of the same type), just use "-xHost" and that should be your best bet in general. As Tim points out, there's no point in specifying a bunch of other architectures as that could confuse things while not adding anything.