- Infos im HLRS Wiki sind nicht rechtsverbindlich und ohne Gewähr -
- Information contained in the HLRS Wiki is not legally binding and HLRS is not responsible for any damages that might result from its use -
Compiler(Hawk): Difference between revisions
No edit summary |
(→AOCC) |
||
Line 12: | Line 12: | ||
== AOCC == | == AOCC == | ||
AOCC is the AMD Optimizing C/C++ Compiler based on LLVM. It contains a Fortran compiler (flang) as well. | |||
Load aocc module | |||
<pre>module load compiler/aocc/2.0.0</pre> | |||
Compile with | |||
<pre>clang/clang++/flang -march=znver2</pre> | |||
AOCC comes with a couple of exclusive compiler flags that are not part of LLVM and allow more aggressive optimizations, they are listed in the [https://developer.amd.com/wp-content/resources/AOCC-2.0-Clang-the%20C%20C++%20Compiler.pdf#page=4 C/C++] and [https://developer.amd.com/wp-content/resources/AOCC-2.0-Flang-the%20Fortran%20Compiler.pdf#page=6 Fortran] compiler manual. | |||
<br> | <br> |
Revision as of 13:19, 28 October 2019
We highly recommend to try as much different compilers as possible and compare the performance of the generated code! If you code according to language standards, this is almost for free but can give you a significant speedup! There is no such thing as an "ideal" compiler! One suites better to application A, one suites better to application B (cf. Best Practice Guide AMD EPYC (Naples)).
Please note that compilers do not use optimization flags by default at the moment. Hence, please refer to Compiler Options Quick Reference Guide and set the respective flags on your own (with znver1 for Naples and znver2 for Rome nodes). Compiler Usage Guidelines for AMD64 Platforms might also be a source of inspiration w.r.t. optimization flags.
GNU
AOCC
AOCC is the AMD Optimizing C/C++ Compiler based on LLVM. It contains a Fortran compiler (flang) as well.
Load aocc module
module load compiler/aocc/2.0.0
Compile with
clang/clang++/flang -march=znver2
AOCC comes with a couple of exclusive compiler flags that are not part of LLVM and allow more aggressive optimizations, they are listed in the C/C++ and Fortran compiler manual.
Intel
Please use
<compiler> -march=core-avx2
and do not use
<compiler> -xCORE-AVX2
since the latter might give very bad performance!
PGI
With respect to PGI, we recommend to use
<compiler> -tp=zen -O3