CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   GCC compiler optimization flags (Advanced) (

kmooney June 1, 2012 11:07

GCC compiler optimization flags (Advanced)
Howdy Foamers,

I was wondering if anyone has had any experience in other GCC compiler optimization flags other than the typical -O3. I'm considering a recompile with some architecture specific flags. One option I'm planning on using is '-march=native'. This is supposed to look at your CPU and identify any special vector processors onboard such as SSE or AVX units. I don't believe that you would be able to share binaries with people/machines using different chips however since it becomes more specific than the usual x86 instruction set.

Really just wondering if anyone is familiar with this stuff or has perhaps tried it out. I did a quick timing on an icoFoam run with -O3. I'll let you guys know if I see any speed up from the advanced optimization.


wyldckat June 1, 2012 13:33

Greetings Kyle,

Start reading here: post #8 :)

By the way, Intel has similar optimization flag lists for each processor of their own.

Best regards,

kmooney June 4, 2012 12:06

Thanks for the link!

All times are GMT -4. The time now is 05:57.