I am checking the CPU information on a Linux server, and tuning options of the Intel C compiler icc
for my C code running on the server's specific architecture. I am thinking about choosing the value for the option -march
in icc
. The following is part of the content of /proc/cpuinfo/
for one core (same for the other cores), and which value should I give to -march
for icc
? Or should I use a different option than -march
?
-march=<cpu> (i32, i64em only)
Generate code exclusively for a given cpu. For this release,
the <cpu> values of pentiumii and pentiumiii have been depre-
cated. For a given cpu, <cpu> is one of the following:
core2 -- Intel(R) Core(TM)2 processor family
pentium4 -- Intel Pentium 4 processors
pentium3 -- Intel Pentium III processors
The following is the output of cat /proc/cpuinfo
on a Linux server
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel(R) Xeon(R) CPU E5504 @ 2.00GHz
stepping : 5
cpu MHz : 1994.956
cache size : 4096 KB
physical id : 1
siblings : 4
core id : 0
cpu cores : 4
apicid : 16
initial apicid : 16
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm dts tpr_shadow vnmi flexpriority ept vpid
bogomips : 3989.91
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
cpuid
shows that all the prior families are covered by it as well, it shows this in the family line of the output. You generally only target the older families if you're planning on running the code there, and you don't want the compiler to use an optimization from the newer families. – slm Feb 14 '14 at 10:45