From 3f98e657dc8cdf95da20be5a40d81ac4a6e99b33 Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Thu, 14 Sep 2023 21:58:28 +0200 Subject: [PATCH 1/3] add `-Ofast` optimization flags for intel compiler (release profile) --- src/fpm_compiler.F90 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/fpm_compiler.F90 b/src/fpm_compiler.F90 index 02b99af135..b06b2f7e3e 100644 --- a/src/fpm_compiler.F90 +++ b/src/fpm_compiler.F90 @@ -173,6 +173,7 @@ module fpm_compiler flag_intel_warn = " -warn all", & flag_intel_check = " -check all", & flag_intel_debug = " -O0 -g", & + flag_intel_opt = " -Ofast", & flag_intel_fp = " -fp-model precise -pc64", & flag_intel_align = " -align all", & flag_intel_limit = " -error-limit 1", & @@ -189,6 +190,7 @@ module fpm_compiler flag_intel_warn_win = " /warn:all", & flag_intel_check_win = " /check:all", & flag_intel_debug_win = " /Od /Z7", & + flag_intel_opt_win = " /Ofast", & flag_intel_fp_win = " /fp:precise", & flag_intel_align_win = " /align:all", & flag_intel_limit_win = " /error-limit:1", & @@ -280,6 +282,7 @@ subroutine get_release_compile_flags(id, flags) case(id_intel_classic_nix) flags = & + flag_intel_opt//& flag_intel_fp//& flag_intel_align//& flag_intel_limit//& @@ -290,6 +293,7 @@ subroutine get_release_compile_flags(id, flags) case(id_intel_classic_mac) flags = & + flag_intel_opt//& flag_intel_fp//& flag_intel_align//& flag_intel_limit//& @@ -300,7 +304,8 @@ subroutine get_release_compile_flags(id, flags) case(id_intel_classic_windows) flags = & - & flag_intel_fp_win//& + flag_intel_opt_win//& + flag_intel_fp_win//& flag_intel_align_win//& flag_intel_limit_win//& flag_intel_pthread_win//& From 6ebc226524a301977a411bdec918f8db1128128c Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Thu, 14 Sep 2023 22:02:31 +0200 Subject: [PATCH 2/3] add flags also to `ifx` --- src/fpm_compiler.F90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fpm_compiler.F90 b/src/fpm_compiler.F90 index b06b2f7e3e..87e45bcd1e 100644 --- a/src/fpm_compiler.F90 +++ b/src/fpm_compiler.F90 @@ -315,6 +315,7 @@ subroutine get_release_compile_flags(id, flags) case(id_intel_llvm_nix) flags = & + flag_intel_opt//& flag_intel_fp//& flag_intel_align//& flag_intel_limit//& @@ -325,6 +326,7 @@ subroutine get_release_compile_flags(id, flags) case(id_intel_llvm_windows) flags = & + flag_intel_opt_win//& flag_intel_fp_win//& flag_intel_align_win//& flag_intel_limit_win//& From 1a5ffb6e166042364a26851f83c649769313e87d Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Fri, 15 Sep 2023 10:01:57 +0200 Subject: [PATCH 3/3] replace `Ofast` with `O3` --- src/fpm_compiler.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fpm_compiler.F90 b/src/fpm_compiler.F90 index 87e45bcd1e..b93c092f4a 100644 --- a/src/fpm_compiler.F90 +++ b/src/fpm_compiler.F90 @@ -173,7 +173,7 @@ module fpm_compiler flag_intel_warn = " -warn all", & flag_intel_check = " -check all", & flag_intel_debug = " -O0 -g", & - flag_intel_opt = " -Ofast", & + flag_intel_opt = " -O3", & flag_intel_fp = " -fp-model precise -pc64", & flag_intel_align = " -align all", & flag_intel_limit = " -error-limit 1", & @@ -190,7 +190,7 @@ module fpm_compiler flag_intel_warn_win = " /warn:all", & flag_intel_check_win = " /check:all", & flag_intel_debug_win = " /Od /Z7", & - flag_intel_opt_win = " /Ofast", & + flag_intel_opt_win = " /O3", & flag_intel_fp_win = " /fp:precise", & flag_intel_align_win = " /align:all", & flag_intel_limit_win = " /error-limit:1", &