Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default compiler flags for Cray #47

Merged
merged 3 commits into from
Dec 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmake/ecwam_compile_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
set(checkbounds_flags "-Rb")
set(fpe_flags "-Ktrap=fp")
set(initsnan_flags "-ei")
set(general_flags "-ram -emf -hflex_mp=conservative -Othread1 -hfp1 -hadd_paren" )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the time I was suggesting a quick fix, but I think we can split up these flags into more descriptive categories. So possibly something like this:

set(threading_flags "-hflex_mp=conservative -Othread1")
set(fpmodel_flags "-hfp1 -hadd_paren")
set(baseline_flags "-ram -emf")


elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(autopromote_flags "-fdefault-real-8 -fdefault-double-8")
Expand Down Expand Up @@ -68,6 +69,9 @@ endif()
if( DEFINED heap_arrays_flags )
ecbuild_add_fortran_flags( "${heap_arrays_flags}" NAME heap_arrays )
endif()
if( DEFINED general_flags)
ecbuild_add_fortran_flags( "${general_flags}" NAME general_flags )
endif()

if( CMAKE_BUILD_TYPE MATCHES "Debug" )
foreach( debug_flag fpe initsnan checkbounds )
Expand Down
Loading