CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Recommended Compiler Options for OpenFOAM on a HPC (

JLight December 12, 2012 05:31

Recommended Compiler Options for OpenFOAM on a HPC
I was wondering if anyone can suggest the compiler options to use with OpenFOAM-2.1.1 to squeeze out the maximum performance on a HPC. The HPC has Intel Xeon CPU E5-2670.

I initially compiled OF with:
  1. Intel Compiler:

    icc --version
    icc (ICC) 12.1.3 20120212

    Options: -O3 -xAVX -no-prec-div -fp-model precise -fp-model source
  2. GCC:

    gcc -v
    Using built-in specs.
    Target: x86_64-unknown-linux-gnu
    Configured with: /usr/local/src/GCC/gcc-4.7.2/configure --prefix=/usr/local/gcc/4.7.2 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++,fortran --with-mpfr=/usr/local/mpfr/3.1.1/ --with-gmp=/usr/local/gmp/5.0.5/ --with-mpc=/usr/local/mpc/1.0/
    Thread model: posix
    gcc version 4.7.2 (GCC)

    Options: -march=corei7-avx -O3 -frounding-math -fsignaling-nans

My initial tests showed the one compiled with gcc was slightly faster when using the MotorBike Tute with simpleFoam.

Anyone have anything to share with regards to compiler performance with -O2/-O3 with gcc and/or intel or any other options (eg AVX)?



wyldckat December 12, 2012 10:15

Hi NJ,

You can find some additional pointers on the comments and blog post here:
OpenFOAM with ICC - Intel's ICC is "allergic" to AMD CPUs

Best regards,

All times are GMT -4. The time now is 00:30.