Skip to content

Commit

Permalink
strict fpmodel
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Nov 12, 2024
1 parent 4fc4266 commit 5ff7867
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 21 additions & 8 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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 += [
Expand All @@ -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',
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5ff7867

Please sign in to comment.