From 5ff78675f50aaac370987ae77a584f0461c5d509 Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Mon, 11 Nov 2024 22:25:15 -0500 Subject: [PATCH] strict fpmodel --- .github/workflows/ci.yml | 3 ++- meson.build | 29 +++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bb0c707200..302574f5ccc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -378,7 +378,8 @@ jobs: include: # intel mac, ifort - os: macos-13 - compiler: gcc + compiler: intel-classic + version: "2021.7" # ubuntu, ifx - os: ubuntu-22.04 compiler: intel diff --git a/meson.build b/meson.build index e94d07e70f8..3a44a54bee3 100644 --- a/meson.build +++ b/meson.build @@ -29,7 +29,7 @@ message('The fc_id is:', fc_id) compile_args = [] link_args = [] -# Command line options for gfortran +# options for gfortran if fc_id == 'gcc' # General options compile_args += [ @@ -53,11 +53,9 @@ if fc_id == 'gcc' elif system == 'windows' compile_args += '-D_WIN32' endif -endif -# Command line options for ifort -if fc_id == 'intel-cl' - # windows +# options for ifort on windows +elif fc_id == 'intel-cl' compile_args += ['/fpe:0', # Activate all floating point exceptions '/heap-arrays:0', '/traceback', @@ -70,9 +68,11 @@ if fc_id == 'intel-cl' link_args += ['/ignore:4217', # access through ddlimport might be inefficient '/ignore:4286' # same as 4217, but more general ] + +# options for ifort on linux and macos elif fc_id == 'intel' - # linux and macOS compile_args += ['-fpe0', # Activate all floating point exceptions + '-fp-model=fast=2', '-no-heap-arrays', '-traceback', '-diag-disable:7416', # f2008 warning @@ -81,10 +81,10 @@ elif fc_id == 'intel' ] link_args += '-static-intel' -# Command line options for ifx +# options for ifx on windows elif fc_id == 'intel-llvm-cl' - # windows compile_args += ['/fpe:0', # Activate all floating point exceptions + '/fp:fast=2', '/heap-arrays:0', '/traceback', '/fpp', # Activate preprocessing @@ -96,6 +96,19 @@ elif fc_id == 'intel-llvm-cl' '/ignore:4286' # same as 4217, but more general ] +# options for ifx on linux +elif fc_id == 'intel-llvm' + compile_args += [ + '-fpe0', # Activate all floating point exceptions + '-fp-model=fast=2', + '-no-heap-arrays', + '-traceback', + '-diag-disable:7416', # f2008 warning + '-diag-disable:7025', # f2008 warning + '-diag-disable:5268', # Line too long + ] + link_args += '-static-intel' + endif # parallel build options