GCC native compile mode

gcc knows the -mtunenative option to auto-detect what flags to use on the local machine. to find out the flags, run this
gcc -march=native -E -v - </dev/null 2>&1 | sed -n 's/.* -v - //p'


titan2 (Opteron 2376)
-march=amdfam10 -mcx16 -msahf -mpopcnt --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=amdfam10
atlas1 (Xeon E5345)
-march=core2 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=core2

-- CarstenAulbert - 05 Sep 2012

DocumentationForm edit

Title GCC native compile and flags
Description Which flags does GCC use when using native compile mode
Tags gcc native optimization
Category Developer
Topic revision: r1 - 05 Sep 2012, CarstenAulbert
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback