Repository navigation
Update compiler flags for consistency with FMS - #91
dougiesquire wants to merge 5 commits into
Conversation
|
Note, I removed |
|
This is ready for review together with ACCESS-NRI/FMS#27 @harshula, @manodeep No answer changes with oneapi in ACCESS-OM2 or ACCESS-ESM1.6 (tested here and here) |
manodeep
left a comment
There was a problem hiding this comment.
The standardisation of compiler flags looks good!
I made a note about MOM5_DETERMINISTIC and build-types
| set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-alias -safe-cray-ptr -fpe0 -ftz -assume byterecl -i4 -r8 -nowarn -check noarg_temp_created -assume nobuffered_io -convert big_endian -grecord-gcc-switches -fp-model precise -fp-model source -align all") | ||
| if(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel") | ||
| set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-alias -safe-cray-ptr -fpe0 -ftz -assume byterecl -integer-size 32 -real-size 64 -nowarn -assume nobuffered_io -convert big_endian -fp-model precise -fp-model source -align all") | ||
| if (MOM5_DETERMINISTIC) |
There was a problem hiding this comment.
Almost certainly a separate issue, but if MOM5_DETERMINISTIC is set, then is the build-type also set to Release? Without a specified build-type, it will default to RelWithDebInfo and those flags do not have a corresponding MOM5_DETERMINISTIC branch
There was a problem hiding this comment.
@dougiesquire What do you think about this one ☝🏾?
There was a problem hiding this comment.
The RelWithDebInfo flags are appended to the Release flags so in theory this is okay. But without testing that I don't want to do, I'm not confident that the additional flags added by RelWithDebInfo don't break the determinism (e.g. add a timestamp to the exe). So to be safe, I'll prevent setting MOM5_DETERMINISTIC with anything other than Release.
There was a problem hiding this comment.
I've also updated the spack package accordingly
This PR updates the compiler flags in the CMakeLists for consistency with what is used in FMS - see discussion here.
This is a temporary measure until we have a organisational recommendations for compiler flags. This change should not change any answers (will test)