Replies: 5 comments 26 replies
-
I am not at all CMake expert, so don't know what is the best solution, but can say that setting |
Beta Was this translation helpful? Give feedback.
-
Technically it is not a problem to pass compiler flags to cmake fro the command line. See also here https://cmake.org/cmake/help/latest/envvar/FFLAGS.html?highlight=fflags |
Beta Was this translation helpful? Give feedback.
-
If this is so critical, we should also add these flags to the other parts, e.g. the solver, right? |
Beta Was this translation helpful? Give feedback.
-
Should I add my commits to the levante_update branch? |
Beta Was this translation helpful? Give feedback.
-
Should we use this approach for the other branches as well? @mandresm, could you provide me with a list of fesom branches you have to deal with? |
Beta Was this translation helpful? Give feedback.
-
Hi all,
Trying to get some of the AWI coupled models ported into Levante I found that, for some of the components, it is not possible to define the compilation flags without editing the CMake files. One of those components is FESOM. These poses 2 problems:
if
condition in the CMake files on all of these branches, to handle Levante's special requirements will be painful. That's what I did in this commit in a branch for AWICM3: e4d7946That's a strategy copied from Kai Himstedt: If the environment variable
CPU_MODEL=AMD_EPYC_ZEN3
is set, then the-march
and-mtune
flags needed for Levante are added to the list of compilation flags. Otherwise, compilation flags remain a default.Alternatively, we could do the same but instead of defining a
CPU_MODEL
defining directlyFESOM_FFLAGS
, and if this variable existS in the environment, then CMake should use that instead of the default compilation flags in FESOM.In my view, no matter what we do, we are gonna have to change the
CMakeLists.txt
in a number of branches (same goes for ECHAM), but since we will have to do it anyway, I think it is now a good time to discuss what is the best strategy to follow.@dsidoren @koldunovn @hegish @JanStreffing @pgierz
Beta Was this translation helpful? Give feedback.
All reactions