From 9d97bd8ec445ea64d5d57030913f607f65abbf58 Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Mon, 11 Nov 2024 11:57:55 -0500 Subject: [PATCH 1/3] ci(compilers): ci test with ifx, trim compiler compat test matrix --- .github/workflows/ci.yml | 40 ++++++++++++++---- .github/workflows/compilers.yml | 75 +++++++-------------------------- 2 files changed, 47 insertions(+), 68 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3135735207a..6fa88cec7ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -198,16 +198,22 @@ jobs: fail-fast: false matrix: include: - - os: macos-12 + # intel mac, release mode + - os: macos-13 debug: false + # arm mac, release mode - os: macos-14 debug: false + # arm mac, debug mode - os: macos-14 debug: true + # ubuntu, release mode - os: ubuntu-22.04 debug: false + # ubuntu, debug mode - os: ubuntu-22.04 debug: true + # windows, release mode - os: windows-2022 debug: false defaults: @@ -366,13 +372,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-12, 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 @@ -416,11 +438,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 @@ -480,7 +502,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 diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index 87e2f5683e7..e76638851c6 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -15,30 +15,19 @@ jobs: # combinations from https://github.com/fortran-lang/setup-fortran#runner-compatibility include: # gfortran - - {os: ubuntu-20.04, compiler: gcc, version: 11} - {os: ubuntu-22.04, compiler: gcc, version: 11} - {os: ubuntu-22.04, compiler: gcc, version: 12} - {os: ubuntu-22.04, compiler: gcc, version: 13} - - {os: macos-11, compiler: gcc, version: 11} - - {os: macos-11, compiler: gcc, version: 12} - - {os: macos-11, compiler: gcc, version: 13} - - {os: macos-12, compiler: gcc, version: 11} - - {os: macos-12, compiler: gcc, version: 12} - - {os: macos-12, compiler: gcc, version: 13} - - {os: windows-2019, compiler: gcc, version: 11} - - {os: windows-2019, compiler: gcc, version: 12} - - {os: windows-2019, compiler: gcc, version: 13} + - {os: macos-13, compiler: gcc, version: 11} + - {os: macos-13, compiler: gcc, version: 12} + - {os: macos-13, compiler: gcc, version: 13} + - {os: macos-14, compiler: gcc, version: 11} + - {os: macos-14, compiler: gcc, version: 12} + - {os: macos-14, compiler: gcc, version: 13} - {os: windows-2022, compiler: gcc, version: 11} - {os: windows-2022, compiler: gcc, version: 12} - {os: windows-2022, compiler: gcc, version: 13} # ifx - - {os: ubuntu-20.04, compiler: intel, version: 2024.1} - - {os: ubuntu-20.04, compiler: intel, version: "2024.0"} - - {os: ubuntu-20.04, compiler: intel, version: 2023.2} - - {os: ubuntu-20.04, compiler: intel, version: 2023.1} - - {os: ubuntu-20.04, compiler: intel, version: "2023.0"} - - {os: ubuntu-20.04, compiler: intel, version: 2022.2.1} - - {os: ubuntu-20.04, compiler: intel, version: 2022.2} - {os: ubuntu-22.04, compiler: intel, version: 2024.1} - {os: ubuntu-22.04, compiler: intel, version: "2024.0"} - {os: ubuntu-22.04, compiler: intel, version: 2023.2} @@ -46,13 +35,6 @@ jobs: - {os: ubuntu-22.04, compiler: intel, version: "2023.0"} - {os: ubuntu-22.04, compiler: intel, version: 2022.2.1} - {os: ubuntu-22.04, compiler: intel, version: 2022.2} - # no ifx on mac - - {os: windows-2019, compiler: intel, version: 2024.1} - - {os: windows-2019, compiler: intel, version: "2024.0"} - - {os: windows-2019, compiler: intel, version: 2023.2} - - {os: windows-2019, compiler: intel, version: 2023.1} - - {os: windows-2019, compiler: intel, version: "2023.0"} - - {os: windows-2019, compiler: intel, version: 2022.2} - {os: windows-2022, compiler: intel, version: 2024.1} - {os: windows-2022, compiler: intel, version: "2024.0"} - {os: windows-2022, compiler: intel, version: 2023.2} @@ -60,16 +42,6 @@ jobs: - {os: windows-2022, compiler: intel, version: "2023.0"} - {os: windows-2022, compiler: intel, version: 2022.2} # ifort - - {os: ubuntu-20.04, compiler: intel-classic, version: "2021.10"} - - {os: ubuntu-20.04, compiler: intel-classic, version: 2021.9} - - {os: ubuntu-20.04, compiler: intel-classic, version: 2021.8} - - {os: ubuntu-20.04, compiler: intel-classic, version: 2021.7} - - {os: ubuntu-20.04, compiler: intel-classic, version: 2021.6} - - {os: ubuntu-20.04, compiler: intel-classic, version: 2021.5} - - {os: ubuntu-20.04, compiler: intel-classic, version: 2021.4} - - {os: ubuntu-20.04, compiler: intel-classic, version: 2021.3} - - {os: ubuntu-20.04, compiler: intel-classic, version: 2021.2} - - {os: ubuntu-20.04, compiler: intel-classic, version: 2021.1} - {os: ubuntu-22.04, compiler: intel-classic, version: "2021.10"} - {os: ubuntu-22.04, compiler: intel-classic, version: 2021.9} - {os: ubuntu-22.04, compiler: intel-classic, version: 2021.8} @@ -80,31 +52,16 @@ jobs: - {os: ubuntu-22.04, compiler: intel-classic, version: 2021.3} - {os: ubuntu-22.04, compiler: intel-classic, version: 2021.2} - {os: ubuntu-22.04, compiler: intel-classic, version: 2021.1} - - {os: macos-11, compiler: intel-classic, version: "2021.10"} - - {os: macos-11, compiler: intel-classic, version: 2021.9} - - {os: macos-11, compiler: intel-classic, version: 2021.8} - - {os: macos-11, compiler: intel-classic, version: 2021.7} - - {os: macos-11, compiler: intel-classic, version: 2021.6} - - {os: macos-11, compiler: intel-classic, version: 2021.5} - - {os: macos-11, compiler: intel-classic, version: 2021.4} - - {os: macos-11, compiler: intel-classic, version: 2021.3} - - {os: macos-11, compiler: intel-classic, version: 2021.2} - - {os: macos-11, compiler: intel-classic, version: 2021.1} - - {os: macos-12, compiler: intel-classic, version: "2021.10"} - - {os: macos-12, compiler: intel-classic, version: 2021.9} - - {os: macos-12, compiler: intel-classic, version: 2021.8} - - {os: macos-12, compiler: intel-classic, version: 2021.7} - - {os: macos-12, compiler: intel-classic, version: 2021.6} - - {os: macos-12, compiler: intel-classic, version: 2021.5} - - {os: macos-12, compiler: intel-classic, version: 2021.4} - - {os: macos-12, compiler: intel-classic, version: 2021.3} - - {os: macos-12, compiler: intel-classic, version: 2021.2} - - {os: macos-12, compiler: intel-classic, version: 2021.1} - - {os: windows-2019, compiler: intel-classic, version: "2021.10"} - - {os: windows-2019, compiler: intel-classic, version: 2021.9} - - {os: windows-2019, compiler: intel-classic, version: 2021.8} - - {os: windows-2019, compiler: intel-classic, version: 2021.7} - - {os: windows-2019, compiler: intel-classic, version: 2021.6} + - {os: macos-13, compiler: intel-classic, version: "2021.10"} + - {os: macos-13, compiler: intel-classic, version: 2021.9} + - {os: macos-13, compiler: intel-classic, version: 2021.8} + - {os: macos-13, compiler: intel-classic, version: 2021.7} + - {os: macos-13, compiler: intel-classic, version: 2021.6} + - {os: macos-13, compiler: intel-classic, version: 2021.5} + - {os: macos-13, compiler: intel-classic, version: 2021.4} + - {os: macos-13, compiler: intel-classic, version: 2021.3} + - {os: macos-13, compiler: intel-classic, version: 2021.2} + - {os: macos-13, compiler: intel-classic, version: 2021.1} - {os: windows-2022, compiler: intel-classic, version: "2021.10"} - {os: windows-2022, compiler: intel-classic, version: 2021.9} - {os: windows-2022, compiler: intel-classic, version: 2021.8} From 4fc426695f07aaf57e4bf2a813c4c435c38e2ad8 Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Mon, 11 Nov 2024 20:52:20 -0500 Subject: [PATCH 2/3] use classic linker for all gfortran mac tests (because newer xcode clt) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fa88cec7ca..7bb0c707200 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -257,7 +257,7 @@ jobs: run: pixi run install - name: Set LDFLAGS (macOS) - if: matrix.os == 'macos-14' + if: runner.os == 'macOS' run: | os_ver=$(sw_vers -productVersion | cut -d'.' -f1) if (( "$os_ver" > 12 )); then From 5a9fc2e5e684cc2f8bc38738b6de4b3d069ffa71 Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Mon, 11 Nov 2024 22:25:15 -0500 Subject: [PATCH 3/3] 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 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..047b4b14d10 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,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