diff --git a/.github/actions/test-cc/action.yml b/.github/actions/test-cc/action.yml index bb930ed..b6dceb7 100644 --- a/.github/actions/test-cc/action.yml +++ b/.github/actions/test-cc/action.yml @@ -14,6 +14,10 @@ runs: - name: Check compiler version shell: bash run: | + # check $CC == $FPM_CC + [[ "${{ env.CC }}" == "${{ env.FPM_CC }}" ]] && (echo "CC and FPM_CC match") || (echo "CC and FPM_CC don't match: ${{ env.CC }} != ${{ env.FPM_CC}}"; exit 1) + + # check compiler version if ([ "$RUNNER_OS" == "Windows" ] && [[ "${{ inputs.compiler }}" =~ "intel" ]] && [[ "${{ inputs.compiler }}" != "nvidia-hpc" ]]); then # only last line of output captured by command substitution, write to temp file instead ${{ env.CC }} //QV > "$RUNNER_TEMP/${{ env.CC }}.ver" 2>&1 diff --git a/.github/actions/test-cxx/action.yml b/.github/actions/test-cxx/action.yml index f7b3ae7..7e6c826 100644 --- a/.github/actions/test-cxx/action.yml +++ b/.github/actions/test-cxx/action.yml @@ -14,6 +14,10 @@ runs: - name: Check compiler version shell: bash run: | + # check $CXX == $FPM_CXX + [[ "${{ env.CXX }}" == "${{ env.FPM_CXX }}" ]] && (echo "CXX and FPM_CXX match") || (echo "CXX and FPM_CXX don't match: ${{ env.CXX }} != ${{ env.FPM_CXX}}"; exit 1) + + # check compiler version if ([ "$RUNNER_OS" == "Windows" ] && [[ "${{ matrix.toolchain.compiler }}" =~ "intel" ]] && [[ "${{ matrix.toolchain.compiler }}" != "nvidia-hpc" ]]); then # only last line of output captured by command substitution, write to temp file instead ${{ env.CXX }} //QV > "$RUNNER_TEMP/${{ env.CXX }}.ver" 2>&1 diff --git a/.github/actions/test-fc/action.yml b/.github/actions/test-fc/action.yml index 25e6e12..dac2ee4 100644 --- a/.github/actions/test-fc/action.yml +++ b/.github/actions/test-fc/action.yml @@ -14,6 +14,10 @@ runs: - name: Check compiler version shell: bash run: | + # check $FC == $FPM_FC + [[ "${{ env.FC }}" == "${{ env.FPM_FC }}" ]] && (echo "FC and FPM_FC match") || (echo "FC and FPM_FC don't match: ${{ env.FC }} != ${{ env.FPM_FC}}"; exit 1) + + # check compiler version if ([ "$RUNNER_OS" == "Windows" ] && [[ "${{ inputs.compiler }}" =~ "intel" ]] && [[ "${{ inputs.compiler }}" != "nvidia-hpc" ]]); then # only last line of output captured by command substitution, write to temp file instead ${{ env.FC }} //QV > "$RUNNER_TEMP/${{ env.FC }}.ver" 2>&1 diff --git a/.github/compat/compat.csv b/.github/compat/compat.csv index 62c9e3d..5c8264f 100644 --- a/.github/compat/compat.csv +++ b/.github/compat/compat.csv @@ -1,11 +1,10 @@ -compiler,gcc,gcc,gcc,gcc,gcc,gcc,gcc,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc -version,10,11,12,13,7,8,9,2021.1,2021.10,2021.2,2021.3,2021.4,2021.5,2021.6,2021.7.1,2021.7,2021.8,2021.9,2021.1.2,2021.1.2,2021.1,2021.2,2021.4,2022.0,2022.1,2022.2.1,2022.2,2023.0,2023.1,2023.2,20.11,21.11,22.11,23.11,23.3,23.5,23.7,23.9 -runner,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -macos-11,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,, -macos-12,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,, -macos-13,✓,✓,✓,✓,,,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,, -macos-14,,✓,✓,✓,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -ubuntu-20.04,✓,✓,,✓,✓,✓,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ -ubuntu-22.04,✓,✓,✓,✓,,,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ -windows-2019,✓,✓,✓,✓,,✓,✓,,✓,,,,,✓,,✓,✓,✓,,,,,,,✓,,✓,✓,✓,✓,,,,,,,, -windows-2022,✓,✓,✓,✓,,✓,✓,,✓,,,,,✓,,✓,✓,✓,,,,,,,✓,,✓,✓,✓,✓,,,,,,,, +compiler,gcc,gcc,gcc,gcc,gcc,gcc,gcc,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc +version,10,11,12,13,7,8,9,2021.1,2021.10,2021.2,2021.3,2021.4,2021.5,2021.6,2021.7.1,2021.7,2021.8,2021.9,2021.1.2,2021.1.2,2021.1,2021.2,2021.4,2022.0,2022.1,2022.2.1,2022.2,2023.0,2023.1,2023.2,2024.0,20.11,21.11,22.11,23.11,23.3,23.5,23.7,23.9 +runner,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +macos-12,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, +macos-13,✓,✓,✓,✓,,,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, +macos-14,,✓,✓,✓,,,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, +ubuntu-20.04,✓,✓,,✓,✓,✓,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ +ubuntu-22.04,✓,✓,✓,✓,,,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ +windows-2019,✓,✓,✓,✓,,✓,✓,,✓,,,,,✓,,✓,✓,✓,,,,,,,✓,,✓,✓,✓,✓,✓,,,,,,,, +windows-2022,✓,✓,✓,✓,,✓,✓,,✓,,,,,✓,,✓,✓,✓,,,,,,,✓,,✓,✓,✓,✓,✓,,,,,,,, diff --git a/.github/compat/long_compat.csv b/.github/compat/long_compat.csv index 7120963..fc29968 100644 --- a/.github/compat/long_compat.csv +++ b/.github/compat/long_compat.csv @@ -94,6 +94,7 @@ ubuntu-20.04,intel,2022.2,✓ ubuntu-20.04,intel,2023.0,✓ ubuntu-20.04,intel,2023.1,✓ ubuntu-20.04,intel,2023.2,✓ +ubuntu-20.04,intel,2024.0,✓ ubuntu-20.04,nvidia-hpc,20.11,✓ ubuntu-20.04,nvidia-hpc,20.7, ubuntu-20.04,nvidia-hpc,20.9, @@ -137,6 +138,7 @@ ubuntu-22.04,intel,2022.2,✓ ubuntu-22.04,intel,2023.0,✓ ubuntu-22.04,intel,2023.1,✓ ubuntu-22.04,intel,2023.2,✓ +ubuntu-22.04,intel,2024.0,✓ ubuntu-22.04,nvidia-hpc,20.11,✓ ubuntu-22.04,nvidia-hpc,20.7, ubuntu-22.04,nvidia-hpc,20.9, @@ -180,6 +182,7 @@ windows-2019,intel,2022.2,✓ windows-2019,intel,2023.0,✓ windows-2019,intel,2023.1,✓ windows-2019,intel,2023.2,✓ +windows-2019,intel,2024.0,✓ windows-2022,gcc,10,✓ windows-2022,gcc,11,✓ windows-2022,gcc,12,✓ @@ -211,3 +214,4 @@ windows-2022,intel,2022.2,✓ windows-2022,intel,2023.0,✓ windows-2022,intel,2023.1,✓ windows-2022,intel,2023.2,✓ +windows-2022,intel,2024.0,✓ diff --git a/.github/compat/matrix.yml b/.github/compat/matrix.yml index 6c6dcdf..c8a8ea8 100644 --- a/.github/compat/matrix.yml +++ b/.github/compat/matrix.yml @@ -14,6 +14,7 @@ toolchain: - {compiler: gcc, version: 9} - {compiler: gcc, version: 8} - {compiler: gcc, version: 7} + - {compiler: intel, version: '2024.0'} - {compiler: intel, version: '2023.2'} - {compiler: intel, version: '2023.1'} - {compiler: intel, version: '2023.0'} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e7e1e21..2e669aa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,8 @@ on: push: paths-ignore: - '**.md' + tags-ignore: + - v** pull_request: branches: - main @@ -195,15 +197,15 @@ jobs: fi - name: Update README - if: ${{ steps.diff.outputs.diff == 'true' && github.event_name == 'push' }} + if: ${{ steps.diff.outputs.diff == 'true' }} run: python .github/compat/update_compat_table.py ".github/compat/compat.md" "README.md" - name: Print README diff - if: ${{ steps.diff.outputs.diff == 'true' && github.event_name == 'push' }} + if: ${{ steps.diff.outputs.diff == 'true' }} run: git diff README.md - name: Create pull request - if: ${{ steps.diff.outputs.diff == 'true' && github.event_name == 'push' }} + if: ${{ steps.diff.outputs.diff == 'true' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | diff --git a/README.md b/README.md index 6153578..9763bff 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,12 @@ The same values are also set as environment variables: - `CC` - `CXX` +Corresponding FPM environment variables are also set: + +- `FPM_FC` +- `FPM_CC` +- `FPM_CXX` + These are made available to subsequent workflow steps via the [`GITHUB_ENV` environment file mechanism](https://docs.github.com/en/actions/learn-github-actions/environment-variables#passing-values-between-steps-and-jobs-in-a-workflow). @@ -101,16 +107,15 @@ These are made available to subsequent workflow steps via the [`GITHUB_ENV` envi Toolchain support varies across GitHub-hosted runner images. -| runner | gcc 10 | gcc 11 | gcc 12 | gcc 13 | gcc 7 | gcc 8 | gcc 9 | intel-classic 2021.1 | intel-classic 2021.10 | intel-classic 2021.2 | intel-classic 2021.3 | intel-classic 2021.4 | intel-classic 2021.5 | intel-classic 2021.6 | intel-classic 2021.7.1 | intel-classic 2021.7 | intel-classic 2021.8 | intel-classic 2021.9 | intel-classic 2021.1.2 | intel 2021.1.2 | intel 2021.1 | intel 2021.2 | intel 2021.4 | intel 2022.0 | intel 2022.1 | intel 2022.2.1 | intel 2022.2 | intel 2023.0 | intel 2023.1 | intel 2023.2 | nvidia-hpc 20.11 | nvidia-hpc 21.11 | nvidia-hpc 22.11 | nvidia-hpc 23.11 | nvidia-hpc 23.3 | nvidia-hpc 23.5 | nvidia-hpc 23.7 | nvidia-hpc 23.9 | -|:-------------|:----------------|:----------------|:----------------|:----------------|:---------------|:---------------|:---------------|:------------------------------|:-------------------------------|:------------------------------|:------------------------------|:------------------------------|:------------------------------|:------------------------------|:--------------------------------|:------------------------------|:------------------------------|:------------------------------|:--------------------------------|:------------------------|:----------------------|:----------------------|:----------------------|:----------------------|:----------------------|:------------------------|:----------------------|:----------------------|:----------------------|:----------------------|:--------------------------|:--------------------------|:--------------------------|:--------------------------|:-------------------------|:-------------------------|:-------------------------|:-------------------------| -| macos-11 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | -| macos-12 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | -| macos-13 | ✓ | ✓ | ✓ | ✓ | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | -| macos-14 | | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -| ubuntu-20.04 | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| ubuntu-22.04 | ✓ | ✓ | ✓ | ✓ | | | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| windows-2019 | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ | | | | | ✓ | | ✓ | ✓ | ✓ | | | | | | | ✓ | | ✓ | ✓ | ✓ | ✓ | | | | | | | | | -| windows-2022 | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ | | | | | ✓ | | ✓ | ✓ | ✓ | | | | | | | ✓ | | ✓ | ✓ | ✓ | ✓ | | | | | | | | | +| runner | gcc 10 | gcc 11 | gcc 12 | gcc 13 | gcc 7 | gcc 8 | gcc 9 | intel-classic 2021.1 | intel-classic 2021.10 | intel-classic 2021.2 | intel-classic 2021.3 | intel-classic 2021.4 | intel-classic 2021.5 | intel-classic 2021.6 | intel-classic 2021.7.1 | intel-classic 2021.7 | intel-classic 2021.8 | intel-classic 2021.9 | intel-classic 2021.1.2 | intel 2021.1.2 | intel 2021.1 | intel 2021.2 | intel 2021.4 | intel 2022.0 | intel 2022.1 | intel 2022.2.1 | intel 2022.2 | intel 2023.0 | intel 2023.1 | intel 2023.2 | intel 2024.0 | nvidia-hpc 20.11 | nvidia-hpc 21.11 | nvidia-hpc 22.11 | nvidia-hpc 23.11 | nvidia-hpc 23.3 | nvidia-hpc 23.5 | nvidia-hpc 23.7 | nvidia-hpc 23.9 | +|:-------------|:----------------|:----------------|:----------------|:----------------|:---------------|:---------------|:---------------|:------------------------------|:-------------------------------|:------------------------------|:------------------------------|:------------------------------|:------------------------------|:------------------------------|:--------------------------------|:------------------------------|:------------------------------|:------------------------------|:--------------------------------|:------------------------|:----------------------|:----------------------|:----------------------|:----------------------|:----------------------|:------------------------|:----------------------|:----------------------|:----------------------|:----------------------|:----------------------|:--------------------------|:--------------------------|:--------------------------|:--------------------------|:-------------------------|:-------------------------|:-------------------------|:-------------------------| +| macos-12 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | +| macos-13 | ✓ | ✓ | ✓ | ✓ | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | +| macos-14 | | ✓ | ✓ | ✓ | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | +| ubuntu-20.04 | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| ubuntu-22.04 | ✓ | ✓ | ✓ | ✓ | | | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| windows-2019 | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ | | | | | ✓ | | ✓ | ✓ | ✓ | | | | | | | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | +| windows-2022 | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ | | | | | ✓ | | ✓ | ✓ | ✓ | | | | | | | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | **Note:** Intel's `ifx` compiler is not supported on macOS, so the `intel` option redirects to `intel-classic` (`ifort`). diff --git a/action.yml b/action.yml index 99bcbaa..8c4bcc5 100644 --- a/action.yml +++ b/action.yml @@ -84,12 +84,9 @@ runs: ;; esac - if ! ([[ "$RUNNER_OS" == "Windows" ]] && [[ "${{ inputs.compiler }}" =~ "intel" ]]); then - # save environment variables - echo "FC=${FC}" >> $GITHUB_ENV - echo "CC=${CC}" >> $GITHUB_ENV - echo "CXX=${CXX}" >> $GITHUB_ENV - fi + echo "FC=${FC}" >> $GITHUB_ENV + echo "CC=${CC}" >> $GITHUB_ENV + echo "CXX=${CXX}" >> $GITHUB_ENV # save oneAPI cache and activate environment - name: Save cache @@ -108,43 +105,41 @@ runs: :: this script fails when install location is not the default call "%ONEAPI_ROOT%\compiler\%LATEST%\env\vars.bat" set | findstr /c:"oneAPI" >> "%GITHUB_ENV%" - # Intel compilers may have restored from cache so env vars may not be set, - # set them then set outputs for all compilers/toolchains + - name: Set outputs and env vars shell: bash id: outputs run: | + # Intel compilers may have restored from cache so env vars may not be set if [[ "$RUNNER_OS" == "Windows" ]]; then if [[ "${{ inputs.compiler }}" == "intel" ]]; then - echo fc=ifx>>$GITHUB_OUTPUT - echo cc=icx>>$GITHUB_OUTPUT - echo cxx=icx>>$GITHUB_OUTPUT - echo FC=ifx>>$GITHUB_ENV - echo CC=icx>>$GITHUB_ENV - echo CXX=icx>>$GITHUB_ENV + FC=ifx + CC=icx + CXX=icx + echo SETVARS_COMPLETED=1>>$GITHUB_ENV elif [[ "${{ inputs.compiler }}" == "intel-classic" ]]; then - echo fc=ifort>>$GITHUB_OUTPUT - echo cc=icl>>$GITHUB_OUTPUT - echo cxx=icl>>$GITHUB_OUTPUT - echo FC=ifort>>$GITHUB_ENV - echo CC=icl>>$GITHUB_ENV - echo CXX=icl>>$GITHUB_ENV - else - echo fc=$FC>>$GITHUB_OUTPUT - echo cc=$CC>>$GITHUB_OUTPUT - echo cxx=$CXX>>$GITHUB_OUTPUT + FC=ifort + CC=icl + CXX=icl + echo SETVARS_COMPLETED=1>>$GITHUB_ENV fi - else - echo fc=$FC>>$GITHUB_OUTPUT - echo cc=$CC>>$GITHUB_OUTPUT - echo cxx=$CXX>>$GITHUB_OUTPUT - echo MKLLIB=$MKLLIB>>$GITHUB_OUTPUT fi - # intel oneapi flag to indicate env has been activated - if [[ "${{ inputs.compiler }}" =~ "intel" ]]; then - echo SETVARS_COMPLETED=1>>$GITHUB_ENV - fi + # set env vars + echo FC=$FC>>$GITHUB_ENV + echo CC=$CC>>$GITHUB_ENV + echo CXX=$CXX>>$GITHUB_ENV + + # set fpm env vars + echo FPM_FC=$FC>>$GITHUB_ENV + echo FPM_CC=$CC>>$GITHUB_ENV + echo FPM_CXX=$CXX>>$GITHUB_ENV + + # set action outputs + echo fc=$FC>>$GITHUB_OUTPUT + echo cc=$CC>>$GITHUB_OUTPUT + echo cxx=$CXX>>$GITHUB_OUTPUT + # GitHub Actions prepends GNU linker to the PATH before all bash steps, hide it so MSVC linker is found - name: Hide GNU linker (Windows) if: runner.os == 'Windows' && contains(inputs.compiler, 'intel') diff --git a/install-intel-windows.bat b/install-intel-windows.bat index ba62671..8b85ddb 100644 --- a/install-intel-windows.bat +++ b/install-intel-windows.bat @@ -6,4 +6,4 @@ start /b /wait %TEMP%\webimage.exe -s -x -f %TEMP%\webimage_extracted --log %TEM del %TEMP%\webimage.exe :: run installer -%TEMP%\webimage_extracted\bootstrapper.exe -s --action install --components=intel.oneapi.win.cpp-compiler:intel.oneapi.win.ifort-compiler --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=%TEMP% +%TEMP%\webimage_extracted\bootstrapper.exe -s --action install --components=%2 --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=%TEMP% diff --git a/setup-fortran.sh b/setup-fortran.sh index 4e290c1..0564df7 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -46,23 +46,16 @@ install_gcc_brew() brew link gcc@${version} os_ver=$(sw_vers -productVersion | cut -d'.' -f1) - # brew link doesn't create aliases without version numbers before gcc 13 - if (( "$version" < 13 )); then - # default homebrew bin dir changed with macos 14 - if (( "$os_ver" > 13 )); then - ln -fs /opt/homebrew/bin/gfortran-${version} /usr/local/bin/gfortran - ln -fs /opt/homebrew/bin/gcc-${version} /usr/local/bin/gcc - ln -fs /opt/homebrew/bin/g++-${version} /usr/local/bin/g++ - else - ln -fs /usr/local/bin/gfortran-${version} /usr/local/bin/gfortran - ln -fs /usr/local/bin/gcc-${version} /usr/local/bin/gcc - ln -fs /usr/local/bin/g++-${version} /usr/local/bin/g++ - fi + # default homebrew bin dir changed with macos 14 + if (( "$os_ver" > 13 )); then + ln -fs /opt/homebrew/bin/gfortran-${version} /usr/local/bin/gfortran + ln -fs /opt/homebrew/bin/gcc-${version} /usr/local/bin/gcc + ln -fs /opt/homebrew/bin/g++-${version} /usr/local/bin/g++ + else + ln -fs /usr/local/bin/gfortran-${version} /usr/local/bin/gfortran + ln -fs /usr/local/bin/gcc-${version} /usr/local/bin/gcc + ln -fs /usr/local/bin/g++-${version} /usr/local/bin/g++ fi - - export FC="gfortran" - export CC="gcc" - export CXX="g++" } install_gcc_apt() @@ -83,10 +76,6 @@ install_gcc_apt() --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${version} \ --slave /usr/bin/gcov gcov /usr/bin/gcov-${version} \ --slave /usr/bin/g++ g++ /usr/bin/g++-${version} - - export FC="gfortran" - export CC="gcc" - export CXX="g++" } install_gcc_choco() @@ -143,10 +132,6 @@ install_gcc_choco() if [ -d "$FCDIR" ] && [ -f "$LNDIR/libgfortran-5.dll" ] && [ ! -f "$FCDIR/libgfortran-5.dll" ]; then ln -s "$LNDIR/libgfortran-5.dll" "$FCDIR/libgfortran-5.dll" fi - - export FC="gfortran" - export CC="gcc" - export CXX="g++" } install_gcc() @@ -173,6 +158,10 @@ install_gcc() exit 1 ;; esac + + export FC="gfortran" + export CC="gcc" + export CXX="g++" } export_intel_vars() @@ -238,6 +227,10 @@ intel_version_map_l() esac else case $actual_version in + # 2024 versions omit patch version number in pkg name + 2024.0*) + version=2024.0 + ;; 2022.0.0 | 2022.0) version=2022.0.2 ;; @@ -347,6 +340,9 @@ intel_version_map_w() esac else case $actual_version in + 2024 | 2024.0 | 2024.0.1) + version=2024.0.1 + ;; 2023.2 | 2023.1 | 2023.0) version=$actual_version.0 ;; @@ -381,13 +377,23 @@ install_intel_apt() | sudo tee /etc/apt/sources.list.d/oneAPI.list sudo apt-get update + # c/cpp compiler package names changed with 2024+ + case $version in + 2024*) + cpp_name=dpcpp-cpp + ;; + *) + cpp_name=dpcpp-cpp-and-cpp-classic + ;; + esac + if $install_mkl; then sudo apt-get install \ - intel-oneapi-compiler-{fortran,dpcpp-cpp-and-cpp-classic}-$version \ + intel-oneapi-compiler-{fortran,"$cpp_name"}-$version \ intel-oneapi-mkl-$mkl_version else sudo apt-get install \ - intel-oneapi-compiler-{fortran,dpcpp-cpp-and-cpp-classic}-$version + intel-oneapi-compiler-{fortran,"$cpp_name"}-$version fi source /opt/intel/oneapi/setvars.sh @@ -405,6 +411,7 @@ install_intel_apt() export MKLLIB="$ONEAPI_ROOT/mkl/latest/lib/intel64" export MKLROOT="$ONEAPI_ROOT/mkl/latest" fi + export_intel_vars } @@ -526,49 +533,40 @@ install_intel_win() intel_version_map_w $version $classic case $version in + 2024.0.1) + WINDOWS_HPCKIT_URL=https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7a6db8a1-a8b9-4043-8e8e-ca54b56c34e4/w_HPCKit_p_2024.0.1.35_offline.exe + WINDOWS_HPCKIT_COMPONENTS=intel.oneapi.win.ifort-compiler:intel.oneapi.win.cpp-dpcpp-common + ;; 2023.2.0) WINDOWS_HPCKIT_URL=https://registrationcenter-download.intel.com/akdlm/IRC_NAS/438527fc-7140-422c-a851-389f2791816b/w_HPCKit_p_2023.2.0.49441_offline.exe + WINDOWS_HPCKIT_COMPONENTS=intel.oneapi.win.ifort-compiler:intel.oneapi.win.cpp-compiler ;; 2023.1.0) WINDOWS_HPCKIT_URL=https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2a13d966-fcc5-4a66-9fcc-50603820e0c9/w_HPCKit_p_2023.1.0.46357_offline.exe + WINDOWS_HPCKIT_COMPONENTS=intel.oneapi.win.ifort-compiler:intel.oneapi.win.cpp-compiler ;; 2023.0.0) WINDOWS_HPCKIT_URL=https://registrationcenter-download.intel.com/akdlm/irc_nas/19085/w_HPCKit_p_2023.0.0.25931_offline.exe + WINDOWS_HPCKIT_COMPONENTS=intel.oneapi.win.ifort-compiler:intel.oneapi.win.cpp-compiler ;; 2022.3.1) WINDOWS_HPCKIT_URL=https://registrationcenter-download.intel.com/akdlm/irc_nas/18976/w_HPCKit_p_2022.3.1.19755_offline.exe + WINDOWS_HPCKIT_COMPONENTS=intel.oneapi.win.ifort-compiler:intel.oneapi.win.cpp-compiler ;; 2022.3.0) WINDOWS_HPCKIT_URL=https://registrationcenter-download.intel.com/akdlm/irc_nas/18857/w_HPCKit_p_2022.3.0.9564_offline.exe + WINDOWS_HPCKIT_COMPONENTS=intel.oneapi.win.ifort-compiler:intel.oneapi.win.cpp-compiler ;; 2022.2.0) WINDOWS_HPCKIT_URL=https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18680/w_HPCKit_p_2022.2.0.173_offline.exe + WINDOWS_HPCKIT_COMPONENTS=intel.oneapi.win.ifort-compiler:intel.oneapi.win.cpp-compiler ;; - # the installer versions below fail - # 2022.1.2) - # WINDOWS_HPCKIT_URL=https://registrationcenter-download.intel.com/akdlm/irc_nas/18529/w_HPCKit_p_2022.1.2.116_offline.exe - # ;; - # 2022.1.0) - # WINDOWS_HPCKIT_URL=https://registrationcenter-download.intel.com/akdlm/irc_nas/18417/w_HPCKit_p_2022.1.0.93_offline.exe - # ;; - # 2021.4.0) - # WINDOWS_HPCKIT_URL=https://registrationcenter-download.intel.com/akdlm/irc_nas/18247/w_HPCKit_p_2021.4.0.3340_offline.exe - # ;; - # 2021.3.0) - # WINDOWS_HPCKIT_URL=https://registrationcenter-download.intel.com/akdlm/irc_nas/17940/w_HPCKit_p_2021.3.0.3227_offline.exe - # ;; - # 2021.2.0) - # WINDOWS_HPCKIT_URL=https://registrationcenter-download.intel.com/akdlm/irc_nas/17762/w_HPCKit_p_2021.2.0.2901_offline.exe - # ;; - # 2021.1.0) - # WINDOWS_HPCKIT_URL=https://registrationcenter-download.intel.com/akdlm/irc_nas/17392/w_HPCKit_p_2021.1.0.2682_offline.exe - # ;; *) exit 1 ;; esac - "$GITHUB_ACTION_PATH/install-intel-windows.bat" $WINDOWS_HPCKIT_URL + "$GITHUB_ACTION_PATH/install-intel-windows.bat" $WINDOWS_HPCKIT_URL $WINDOWS_HPCKIT_COMPONENTS # don't call export_intel_vars here because the install may have # been restored from cache. export variables in action.yml after @@ -601,6 +599,16 @@ install_intel() exit 1 ;; esac + + if $classic; then + export FC="ifort" + export CC="icc" + export CXX="icpc" + else + export FC="ifx" + export CC="icx" + export CXX="icpx" + fi } export_nvidiahpc_vars() @@ -649,14 +657,7 @@ install_nvidiahpc_apt() echo "NVIDIA HPC SDK $version module loaded." # set environment variables - echo "Setting environment variables..." export_nvidiahpc_vars $version - - # set environment variables - export FC="nvfortran" - export CC="nvc" - export CXX="nvc++" - echo "Environment variables set." } install_nvidiahpc() @@ -687,4 +688,8 @@ install_nvidiahpc() exit 1 ;; esac + + export FC="nvfortran" + export CC="nvc" + export CXX="nvc++" }