This issue is related to the merged PR #338
For AMD EPIC ZEN processors, using intel compilers one needs to use the compiler flags -march=core-avx2 -mtune=core-avx2 to get a good performance during runtime. This was solved in #338 for Levante, however, this was not a very general solution as you can see below, and now Albedo needs a similar implementation.
|
if(${CMAKE_C_COMPILER_ID} STREQUAL "Intel") |
|
target_compile_options(${PROJECT_NAME} PRIVATE -no-prec-div -no-prec-sqrt -fast-transcendentals -fp-model precise) |
|
if(${FESOM_PLATFORM_STRATEGY} STREQUAL levante.dkrz.de ) |
|
target_compile_options(${PROJECT_NAME} PRIVATE -march=core-avx2 -mtune=core-avx2) |
|
endif() |
I would suggest, that instead of checking for FESOM_PLATFORM_STRATEGY, we look at CPU_MODEL:
|
export CPU_MODEL=AMD_EPYC_ZEN3 |
and if it has AMD_EPYC_ZEN we add the -march and -mtune flags. That should be more general.
This issue is related to the merged PR #338
For AMD EPIC ZEN processors, using intel compilers one needs to use the compiler flags
-march=core-avx2 -mtune=core-avx2to get a good performance during runtime. This was solved in #338 for Levante, however, this was not a very general solution as you can see below, and now Albedo needs a similar implementation.fesom2/lib/parms/CMakeLists.txt
Lines 23 to 27 in cd0932a
I would suggest, that instead of checking for
FESOM_PLATFORM_STRATEGY, we look atCPU_MODEL:fesom2/env/levante.dkrz.de/shell
Line 3 in cd0932a
and if it has
AMD_EPYC_ZENwe add the-marchand-mtuneflags. That should be more general.