From 82ccb70b6bb788e70a19d4593e8deac7b3ef2038 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Thu, 7 Mar 2024 09:24:06 -0500 Subject: [PATCH 1/9] feat: set FPM environment variables (#63) * set FPM_FC/FPM_CC/FPM_CXX matching FC/CC/CXX * consolidate env var assignment in setup script --- .github/actions/test-cc/action.yml | 4 ++ .github/actions/test-cxx/action.yml | 4 ++ .github/actions/test-fc/action.yml | 4 ++ README.md | 6 +++ action.yml | 60 ++++++++++++++--------------- setup-fortran.sh | 51 +++++++++--------------- 6 files changed, 64 insertions(+), 65 deletions(-) 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 477bbc1..bca4e9e 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/README.md b/README.md index d95fc88..ed60893 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,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). diff --git a/action.yml b/action.yml index d3f8875..af0ba68 100644 --- a/action.yml +++ b/action.yml @@ -79,12 +79,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 @@ -103,42 +100,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 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/setup-fortran.sh b/setup-fortran.sh index 7dbde6c..ec436db 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -59,10 +59,6 @@ install_gcc_brew() ln -fs /usr/local/bin/g++-${version} /usr/local/bin/g++ fi fi - - export FC="gfortran" - export CC="gcc" - export CXX="g++" } install_gcc_apt() @@ -83,10 +79,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 +135,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 +161,10 @@ install_gcc() exit 1 ;; esac + + export FC="gfortran" + export CC="gcc" + export CXX="g++" } export_intel_vars() @@ -348,16 +340,6 @@ install_intel_apt() source /opt/intel/oneapi/setvars.sh export_intel_vars - - if $classic; then - export FC="ifort" - export CC="icc" - export CXX="icpc" - else - export FC="ifx" - export CC="icx" - export CXX="icpx" - fi } install_intel_dmg() @@ -428,10 +410,6 @@ install_intel_dmg() source /opt/intel/oneapi/setvars.sh export_intel_vars - - export FC="ifort" - export CC="icc" - export CXX="icpc" } install_intel_win() @@ -515,6 +493,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() @@ -563,14 +551,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() @@ -601,4 +582,8 @@ install_nvidiahpc() exit 1 ;; esac + + export FC="nvfortran" + export CC="nvc" + export CXX="nvc++" } \ No newline at end of file From 52b206faf9998023f2d58ab233e18d2806e34ae1 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Thu, 7 Mar 2024 16:40:05 -0500 Subject: [PATCH 2/9] feat: support intel 2024.0 on linux and windows (#64) --- .github/compat/compat.csv | 22 +++++++-------- .github/compat/long_compat.csv | 4 +++ .github/compat/matrix.yml | 1 + install-intel-windows.bat | 2 +- setup-fortran.sh | 51 +++++++++++++++++++--------------- 5 files changed, 46 insertions(+), 34 deletions(-) diff --git a/.github/compat/compat.csv b/.github/compat/compat.csv index 62c9e3d..f40d018 100644 --- a/.github/compat/compat.csv +++ b/.github/compat/compat.csv @@ -1,11 +1,11 @@ -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-11,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, +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 38dcbac..652e5b4 100644 --- a/.github/compat/long_compat.csv +++ b/.github/compat/long_compat.csv @@ -93,6 +93,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, @@ -136,6 +137,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, @@ -179,6 +181,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,✓ @@ -210,3 +213,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/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 ec436db..04c41ee 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -227,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 ;; @@ -304,6 +308,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 ;; @@ -335,8 +342,17 @@ install_intel_apt() | sudo tee /etc/apt/sources.list.d/oneAPI.list sudo apt-get update - sudo apt-get install \ - intel-oneapi-compiler-{fortran,dpcpp-cpp-and-cpp-classic}-$version + # c/cpp compiler package names changed with 2024+ + case $version in + 2024*) + sudo apt-get install \ + intel-oneapi-compiler-{fortran,dpcpp-cpp}-$version + ;; + *) + sudo apt-get install \ + intel-oneapi-compiler-{fortran,dpcpp-cpp-and-cpp-classic}-$version + ;; + esac source /opt/intel/oneapi/setvars.sh export_intel_vars @@ -419,49 +435,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 From d81080430d346dd0dbf52e6f49f6bf91d7860a4f Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Fri, 8 Mar 2024 11:52:51 -0500 Subject: [PATCH 3/9] fix(mac/gcc): always create unversioned gcc/g++/gfortran links (#65) * brew doesn't link gcc/g++ without version number like it does for gfortran * this was causing default mac gcc/g++ to be discovered on PATH * fix readme auto-update PR conditionals in reporting mode --- .github/workflows/test.yml | 6 +++--- setup-fortran.sh | 21 +++++++++------------ 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c9a60c6..df42e70 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -186,15 +186,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/setup-fortran.sh b/setup-fortran.sh index 04c41ee..05e4c5e 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -46,18 +46,15 @@ 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 } From 559bc0ae453b5849983d6ab69dc60d28e385f5b1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 15:03:07 -0500 Subject: [PATCH 4/9] Update compatibility matrix (#66) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/compat/compat.csv | 3 +-- README.md | 19 +++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/compat/compat.csv b/.github/compat/compat.csv index f40d018..5c8264f 100644 --- a/.github/compat/compat.csv +++ b/.github/compat/compat.csv @@ -1,10 +1,9 @@ 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-11,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, macos-12,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, macos-13,✓,✓,✓,✓,,,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, -macos-14,,✓,✓,✓,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +macos-14,,✓,✓,✓,,,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, ubuntu-20.04,✓,✓,,✓,✓,✓,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ ubuntu-22.04,✓,✓,✓,✓,,,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ windows-2019,✓,✓,✓,✓,,✓,✓,,✓,,,,,✓,,✓,✓,✓,,,,,,,✓,,✓,✓,✓,✓,✓,,,,,,,, diff --git a/README.md b/README.md index ed60893..5e96cb0 100644 --- a/README.md +++ b/README.md @@ -103,16 +103,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`). From 9e5ecaebca0820132b5a7c444ebc50a74e1b64a9 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Sat, 9 Mar 2024 09:46:40 -0500 Subject: [PATCH 5/9] ci: don't trigger when tags are pushed (#67) --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df42e70..349d60f 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 From d88f02ec9da5ab5656c0aaaa42b15fdd2d1ac914 Mon Sep 17 00:00:00 2001 From: Inga Ulusoy Date: Tue, 12 Mar 2024 08:34:16 +0100 Subject: [PATCH 6/9] correct typo --- setup-fortran.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/setup-fortran.sh b/setup-fortran.sh index 201b1a6..e3a7486 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -688,7 +688,6 @@ install_nvidiahpc() exit 1 ;; esac -} export FC="nvfortran" export CC="nvc" From 4c513f54678bf490c2cecd29f57a5823f4cad801 Mon Sep 17 00:00:00 2001 From: Inga Ulusoy Date: Tue, 12 Mar 2024 09:18:43 +0100 Subject: [PATCH 7/9] fix variable name --- setup-fortran.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup-fortran.sh b/setup-fortran.sh index e3a7486..5311218 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -380,10 +380,12 @@ install_intel_apt() # c/cpp compiler package names changed with 2024+ case $version in 2024*) - compiler_package_name=$(intel-oneapi-compiler-{fortran,dpcpp-cpp}-$version) + compiler_package_name=intel-oneapi-compiler-{fortran,dpcpp-cpp}-$version + echo $compiler_package_name ;; *) - compiler_package_name=$(intel-oneapi-compiler-{fortran,dpcpp-cpp-and-cpp-classic}-$version) + compiler_package_name=intel-oneapi-compiler-{fortran,dpcpp-cpp-and-cpp-classic}-$version + echo $compiler_package_name ;; esac From 1cb43592394692f4ec1338d59654733e886629aa Mon Sep 17 00:00:00 2001 From: Inga Ulusoy Date: Wed, 13 Mar 2024 13:37:50 +0100 Subject: [PATCH 8/9] pass cpp_name --- setup-fortran.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/setup-fortran.sh b/setup-fortran.sh index 5311218..02afbff 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -380,22 +380,20 @@ install_intel_apt() # c/cpp compiler package names changed with 2024+ case $version in 2024*) - compiler_package_name=intel-oneapi-compiler-{fortran,dpcpp-cpp}-$version - echo $compiler_package_name + cppname=dpcpp-cpp ;; *) - compiler_package_name=intel-oneapi-compiler-{fortran,dpcpp-cpp-and-cpp-classic}-$version - echo $compiler_package_name + cppname=dpcpp-cpp-and-cpp-classic ;; esac if $install_mkl; then sudo apt-get install \ - $compiler_package_name \ + intel-oneapi-compiler-{fortran,"$cpp_name"}-$version \ intel-oneapi-mkl-$mkl_version else sudo apt-get install \ - $compiler_package_name + intel-oneapi-compiler-{fortran,"$cpp_name"}-$version fi source /opt/intel/oneapi/setvars.sh From 1f4e59514eb5997ecca7fa0e3cddb7122bc02c6c Mon Sep 17 00:00:00 2001 From: Inga Ulusoy Date: Wed, 13 Mar 2024 13:39:17 +0100 Subject: [PATCH 9/9] pass cpp_name --- setup-fortran.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup-fortran.sh b/setup-fortran.sh index 02afbff..0564df7 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -380,10 +380,10 @@ install_intel_apt() # c/cpp compiler package names changed with 2024+ case $version in 2024*) - cppname=dpcpp-cpp + cpp_name=dpcpp-cpp ;; *) - cppname=dpcpp-cpp-and-cpp-classic + cpp_name=dpcpp-cpp-and-cpp-classic ;; esac