From c69cd03a823f464b9c6f015e901891cbe3db4419 Mon Sep 17 00:00:00 2001 From: Ioan Hadade Date: Tue, 10 Dec 2024 23:09:09 +0200 Subject: [PATCH 1/3] Add default compiler flags for Cray --- cmake/ecwam_compile_flags.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/ecwam_compile_flags.cmake b/cmake/ecwam_compile_flags.cmake index 5e2292da2..2bc5211fa 100644 --- a/cmake/ecwam_compile_flags.cmake +++ b/cmake/ecwam_compile_flags.cmake @@ -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" ) elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") set(autopromote_flags "-fdefault-real-8 -fdefault-double-8") @@ -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 ) From 8004fc12432b037b18fcac607ad9d07079d85e0b Mon Sep 17 00:00:00 2001 From: Ioan Hadade Date: Tue, 17 Dec 2024 22:52:40 +0200 Subject: [PATCH 2/3] Prettify flags for Cray compiler --- cmake/ecwam_compile_flags.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmake/ecwam_compile_flags.cmake b/cmake/ecwam_compile_flags.cmake index 2bc5211fa..2ce60417c 100644 --- a/cmake/ecwam_compile_flags.cmake +++ b/cmake/ecwam_compile_flags.cmake @@ -16,7 +16,9 @@ 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" ) + set(threading_flags "-Othread1") + set(fpmodel_flags "-hfp1 -hflex_mp=conservative -hadd_paren") + set(baseline_flags "-ram -emf") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") set(autopromote_flags "-fdefault-real-8 -fdefault-double-8") @@ -72,6 +74,12 @@ endif() if( DEFINED general_flags) ecbuild_add_fortran_flags( "${general_flags}" NAME general_flags ) endif() +if( DEFINED baseline_flags) + ecbuild_add_fortran_flags( "${baseline_flags}" NAME baseline_flags ) +endif() +if( DEFINED threading_flags) + ecbuild_add_fortran_flags( "${threading_flags}" NAME threading_flags ) +endif() if( CMAKE_BUILD_TYPE MATCHES "Debug" ) foreach( debug_flag fpe initsnan checkbounds ) From 23407196a96fe20a361962d05ca76d2d3e722680 Mon Sep 17 00:00:00 2001 From: Ioan Hadade Date: Wed, 18 Dec 2024 10:11:28 +0200 Subject: [PATCH 3/3] Remove redundant general_flags for Cray compiler stack --- cmake/ecwam_compile_flags.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/cmake/ecwam_compile_flags.cmake b/cmake/ecwam_compile_flags.cmake index 2ce60417c..9e02d6f3e 100644 --- a/cmake/ecwam_compile_flags.cmake +++ b/cmake/ecwam_compile_flags.cmake @@ -71,9 +71,6 @@ 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( DEFINED baseline_flags) ecbuild_add_fortran_flags( "${baseline_flags}" NAME baseline_flags ) endif()