CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 Installation (https://www.cfd-online.com/Forums/su2-installation/)
-   -   Compiler choice and optimizations? (https://www.cfd-online.com/Forums/su2-installation/237669-compiler-choice-optimizations.html)

loftyhauser July 29, 2021 08:21

Compiler choice and optimizations?
 
I'm a new SU2 user, but not new to CFD. I'm curious about the behavior I've noticed with SU2's performance, and I wonder if I'm not doing something right.

My experience is mainly with Fortran CFD codes. I'm used to seeing a significant increase in performance when compiling with the Intel compiler compared to GCC (or gfortran).

As an example, FUN3D on a Cray EX system (with AMD EPYC processors) runs about 14% faster when compiled using the Intel compiler vs gfortran for a simple test case. I've seen similar results on an Intel Core i7 laptop and with other Fortran CFD codes.

I've also seen an increase in performance with Fortran CFD codes when choosing compiler options. Again, using FUN3D on the Cray EX system, I see an increase of about 9.5% when using Intel compiler options recommended for AMD EPYC here, vs the typical ones used by FUN3D for the Intel compiler.

I'm not seeing the same patterns with SU2. I don't have a lot of experience with C++, so I wonder if I'm not doing something right.

With SU2, I've compiled using a large number of compilers on the Cray EX system: Intel 2021, GCC 10, Cray Clang 11, and AMD Clang 10 (AOCC). I don't see any appreciable difference in performance when running a simple test case (the compressible inviscid ONERA tutorial case), both serially and parallel on a single node. I've seen the same behavior on my laptop (Core i7) using GCC 9 and Intel 2021.

Is this expected behavior with a C++ code? Does the build system automagically choose the right compiler options to get the best performance? (I find that hard to believe -- although I did have to update meson before it would recognize the Intel 2021 compilers, so there's something there.) Perhaps all of the compilers are using the same standard C++ library, which is the main driver for performance?

I have a hard time believing that compiler choice doesn't make a significant difference in performance. I'm curious to hear other's experiences with SU2. Thanks!


All times are GMT -4. The time now is 14:06.