Zgoubi GCC notes

GCC has many optimisation options. Some of these are more beneficial than others. Here are some comparisons. For each compile the pyzgoubi test suite was run, which give a basic level of confidence that the accuracy was not effected. Each setting was run 30 times, plus a prerun to avoid caching issues.

Only a few elements are involved in the test, so it is possible that other areas of code behave differently.

Machine 1

Zgoubi version: svn-r246 (latest trunk 20100211)

GCC versions: 4.3, 4.4, 4.5svn156501(latest trunk 20100211)

CPU: Quad core Opteron

sam@pc47 ~/$ cat /proc/cpuinfo 
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 2
model name      : Quad-Core AMD Opteron(tm) Processor 1352
stepping        : 3
cpu MHz         : 2100.001
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 4
apicid          : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc nonstop_tsc pni cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw
bogomips        : 4199.99
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate [8]
...

OS: Scientific Linux 5.3 - x86-64

Results

Results for opteron

Machine 2

Zgoubi version: svn-r246 (latest trunk 20100211)

GCC versions: 4.3, 4.4, 4.5svn156501(latest trunk 20100211)

CPU: Quad core Xeon

sam@oberon:~$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Xeon(R) CPU           L5335  @ 2.00GHz
stepping        : 11
cpu MHz         : 1994.850
cache size      : 4096 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 4
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni dtes64 monitor ds_cpl vmx tm2 ssse3 cx16 xtpr pdcm dca lahf_lm tpr_shadow vnmi flexpriority
bogomips        : 3989.70
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:

OS: Ubuntu 10.04 - x86-64

Results

Results for xeon

Scripts used

zgoubi.dat : 10k particles, one lap of quads, drifts and bends

I used the following to run tests and plot results. scripts.tar.gz