From 5a8c77a58599c181c72a622160a0305f0cbf340c Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Mon, 11 Nov 2024 11:57:55 -0500 Subject: [PATCH 1/2] ci(compilers): ci test with ifx, trim compiler compat test matrix --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5c74f065ec..b1887cfe741 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -369,13 +369,29 @@ jobs: - build - smoke_test runs-on: ${{ matrix.os }} - env: - FC: intel-classic - FC_V: "2021.7" strategy: fail-fast: false matrix: - os: [ubuntu-22.04, macos-13, windows-2022] + include: + # intel mac, ifort + - os: macos-13 + compiler: gcc + # ubuntu, ifx + - os: ubuntu-22.04 + compiler: intel + version: "2024.1" + # ubuntu, ifort + - os: ubuntu-22.04 + compiler: intel-classic + version: "2021.7" + # windows, ifx + - os: windows-2022 + compiler: intel + version: "2024.1" + # windows, ifort + - os: windows-2022 + compiler: intel-classic + version: "2021.7" defaults: run: shell: bash @@ -419,11 +435,11 @@ jobs: working-directory: modflow6 run: pixi run install - - name: Setup ${{ env.FC }} ${{ env.FC_V }} + - name: Setup ${{ matrix.compiler }} ${{ matrix.version }} uses: fortran-lang/setup-fortran@v1 with: - compiler: ${{ env.FC }} - version: ${{ env.FC_V }} + compiler: ${{ matrix.compiler }} + version: ${{ matrix.version }} - name: Update version files working-directory: modflow6 @@ -482,7 +498,7 @@ jobs: if: failure() uses: actions/upload-artifact@v4 with: - name: failed-${{ matrix.os }}-${{ env.FC }}-${{ env.FC_V }} + name: failed-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }} path: modflow6/autotest/.failed - name: Test scripts From 8ccb9e7171219d23a39a28f820f64a05d0fe4fa0 Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Mon, 11 Nov 2024 22:25:15 -0500 Subject: [PATCH 2/2] follow porting guide --- .github/workflows/ci.yml | 3 ++- meson.build | 30 ++++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1887cfe741..d47f739ea2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -375,7 +375,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 52c7849d295..49aec881e7e 100644 --- a/meson.build +++ b/meson.build @@ -29,7 +29,7 @@ message('Compiler ID:', 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,8 +68,9 @@ 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 '-no-heap-arrays', '-traceback', @@ -81,10 +80,11 @@ 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', + '/assume:nan_compares', '/heap-arrays:0', '/traceback', '/fpp', # Activate preprocessing @@ -96,6 +96,20 @@ 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', + '-assume nan_compares', + '-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