diff --git a/.github/compat/compat.csv b/.github/compat/compat.csv index cb84cea..49b8758 100644 --- a/.github/compat/compat.csv +++ b/.github/compat/compat.csv @@ -1,10 +1,10 @@ -compiler,gcc,gcc,gcc,gcc,gcc,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,lfortran,lfortran,lfortran,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc -version,10,11,12,13,9,2021.1,2021.1.2,2021.2,2021.4,2022.0,2022.1,2022.2,2022.2.1,2023.0,2023.1,2023.2,2024.0,2024.1,2021.1,2021.1.2,2021.10,2021.2,2021.3,2021.4,2021.5,2021.6,2021.7,2021.7.1,2021.8,2021.9,0.31.0,0.32.0,0.33.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,✓,✓,✓,✓,✓,,,,,,✓,✓,,,✓,✓,✓,✓,,,✓,,,,,✓,✓,,,✓,✓,✓,✓,,,,,,,, +compiler,gcc,gcc,gcc,gcc,gcc,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,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-classic,intel-classic,lfortran,lfortran,lfortran,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc +version,10,11,12,13,9,2021.1,2021.1.2,2021.2,2021.4,2022.0,2022.1,2022.2,2022.2.1,2023.0,2023.1,2023.2,2024.0,2024.1,2021.1,2021.1.2,2021.10,2021.11,2021.12,2021.2,2021.3,2021.4,2021.5,2021.6,2021.7,2021.7.1,2021.8,2021.9,0.31.0,0.32.0,0.33.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,✓,✓,✓,✓,✓,,,,,,✓,✓,,,✓,✓,✓,✓,,,✓,✓,✓,,,,,✓,✓,,,✓,✓,✓,✓,,,,,,,, \ No newline at end of file diff --git a/.github/compat/long_compat.csv b/.github/compat/long_compat.csv index 49e7eee..4b63a3c 100644 --- a/.github/compat/long_compat.csv +++ b/.github/compat/long_compat.csv @@ -65,6 +65,8 @@ ubuntu-20.04,gcc,9,✓ ubuntu-20.04,intel-classic,2021.1.2,✓ ubuntu-20.04,intel-classic,2021.1,✓ ubuntu-20.04,intel-classic,2021.10,✓ +ubuntu-20.04,intel-classic,2021.11,✓ +ubuntu-20.04,intel-classic,2021.12,✓ ubuntu-20.04,intel-classic,2021.2,✓ ubuntu-20.04,intel-classic,2021.3, ubuntu-20.04,intel-classic,2021.4,✓ @@ -120,6 +122,8 @@ ubuntu-22.04,gcc,9,✓ ubuntu-22.04,intel-classic,2021.1.2,✓ ubuntu-22.04,intel-classic,2021.1,✓ ubuntu-22.04,intel-classic,2021.10,✓ +ubuntu-22.04,intel-classic,2021.11,✓ +ubuntu-22.04,intel-classic,2021.12,✓ ubuntu-22.04,intel-classic,2021.2,✓ ubuntu-22.04,intel-classic,2021.3, ubuntu-22.04,intel-classic,2021.4,✓ @@ -170,6 +174,8 @@ windows-2019,gcc,9,✓ windows-2019,intel-classic,2021.1.2, windows-2019,intel-classic,2021.1, windows-2019,intel-classic,2021.10,✓ +windows-2019,intel-classic,2021.11,✓ +windows-2019,intel-classic,2021.12,✓ windows-2019,intel-classic,2021.2, windows-2019,intel-classic,2021.3, windows-2019,intel-classic,2021.4, @@ -203,6 +209,8 @@ windows-2022,gcc,9,✓ windows-2022,intel-classic,2021.1.2, windows-2022,intel-classic,2021.1, windows-2022,intel-classic,2021.10,✓ +windows-2022,intel-classic,2021.11,✓ +windows-2022,intel-classic,2021.12,✓ windows-2022,intel-classic,2021.2, windows-2022,intel-classic,2021.3, windows-2022,intel-classic,2021.4, diff --git a/.github/compat/matrix.yml b/.github/compat/matrix.yml index 4b7b034..e4addd1 100644 --- a/.github/compat/matrix.yml +++ b/.github/compat/matrix.yml @@ -25,6 +25,8 @@ toolchain: - {compiler: intel, version: '2021.2'} - {compiler: intel, version: '2021.1.2'} - {compiler: intel, version: '2021.1'} + - {compiler: intel-classic, version: '2021.12'} + - {compiler: intel-classic, version: '2021.11'} - {compiler: intel-classic, version: '2021.10'} - {compiler: intel-classic, version: '2021.9'} - {compiler: intel-classic, version: '2021.8'} @@ -64,6 +66,19 @@ toolchain: - {compiler: nvidia-hpc, version: '20.9'} - {compiler: nvidia-hpc, version: '20.7'} exclude: + # intel-classic >= 2021.10.0 not available for mac + - os: macos-14 + toolchain: {compiler: intel-classic, version: 2021.12.0} + - os: macos-13 + toolchain: {compiler: intel-classic, version: 2021.12.0} + - os: macos-12 + toolchain: {compiler: intel-classic, version: 2021.12.0} + - os: macos-14 + toolchain: {compiler: intel-classic, version: 2021.11.0} + - os: macos-13 + toolchain: {compiler: intel-classic, version: 2021.11.0} + - os: macos-12 + toolchain: {compiler: intel-classic, version: 2021.11.0} # ifx not available for mac - os: macos-14 toolchain: {compiler: intel} @@ -89,4 +104,4 @@ exclude: - os: macos-14 toolchain: {compiler: gcc, version: 9} - os: macos-14 - toolchain: {compiler: gcc, version: 10} \ No newline at end of file + toolchain: {compiler: gcc, version: 10} diff --git a/README.md b/README.md index 98cf90d..a294f50 100644 --- a/README.md +++ b/README.md @@ -108,15 +108,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 9 | intel 2021.1 | intel 2021.1.2 | intel 2021.2 | intel 2021.4 | intel 2022.0 | intel 2022.1 | intel 2022.2 | intel 2022.2.1 | intel 2023.0 | intel 2023.1 | intel 2023.2 | intel 2024.0 | intel 2024.1 | intel-classic 2021.1 | intel-classic 2021.1.2 | 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 | intel-classic 2021.7.1 | intel-classic 2021.8 | intel-classic 2021.9 | lfortran 0.31.0 | lfortran 0.32.0 | lfortran 0.33.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 | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | ✓ | ✓ | | | ✓ | ✓ | ✓ | ✓ | | | ✓ | | | | | ✓ | ✓ | | | ✓ | ✓ | ✓ | ✓ | | | | | | | | | +| runner | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | +|:-------------|:--------|:--------|:--------|:--------|:--------|:--------|:--------|:--------| +| macos-11 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| macos-12 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| macos-13 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| 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/compat.csv b/compat.csv new file mode 100644 index 0000000..0a9f945 --- /dev/null +++ b/compat.csv @@ -0,0 +1,8 @@ +runner,6,7,8,9,10,11,12,13 +macos-11,✓,✓,✓,✓,✓,✓,✓,✓ +macos-12,✓,✓,✓,✓,✓,✓,✓,✓ +macos-13,✓,✓,✓,✓,✓,✓,✓,✓ +ubuntu-20.04,,✓,✓,✓,✓,✓,,✓ +ubuntu-22.04,,,,✓,✓,✓,✓,✓ +windows-2019,,,✓,✓,✓,✓,✓, +windows-2022,,,✓,✓,✓,✓,✓, diff --git a/setup-fortran.sh b/setup-fortran.sh index 5c71207..fbe9bcd 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -27,27 +27,12 @@ install_environment_modules_apt() { install_gcc_brew() { - # check if gcc preinstalled via brew - current=$(brew list --versions gcc | cut -d' ' -f2) - current_major=$(echo $current | cut -d'.' -f1) - # if already installed, nothing to do - if [ "$current_major" == "$version" ]; then - echo "GCC $version already installed" - else - # otherwise install selected version - brew install gcc@${version} - fi - - # link the selected version, but first try unlinking both - # without and with specified version (cover case in which - # multiple versions are already installed and/or linked) - brew unlink gcc - brew unlink gcc@${version} - brew link gcc@${version} + brew install --force gcc@${version} + # make an unversioned symlink os_ver=$(sw_vers -productVersion | cut -d'.' -f1) - # default homebrew bin dir changed with macos 14 if (( "$os_ver" > 13 )); then + # default homebrew bin dir changed with macos 14 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++ @@ -191,6 +176,12 @@ intel_version_map_l() local classic=$2 if $classic; then case $actual_version in + 2021.12.0 | 2021.12) + version=2024.1 + ;; + 2021.11.0 | 2021.11) + version=2024.0 + ;; 2021.10.0 | 2021.10) version=2023.2.0 ;; @@ -231,6 +222,12 @@ intel_version_map_l() 2023.2 | 2023.1 | 2023.0 | 2022.2 | 2022.1 | 2021.4 | 2021.2) version=$actual_version.0 ;; + 2024.1 | 2024.1.0) + version=2024.1 + ;; + 2024.0 | 2024.0.0) + version=2024.0 + ;; 2021.1) version=2021.1.1 ;; @@ -333,6 +330,12 @@ intel_version_map_w() local classic=$2 if $classic; then case $actual_version in + 2021.12.0 | 2021.12) + version=2024.1.0 + ;; + 2021.11.0 | 2021.11) + version=2024.0.1 + ;; 2021.10.0 | 2021.10) version=2023.2.0 ;; @@ -386,7 +389,7 @@ install_intel_apt() mkl_version_map_l $version require_fetch - local _KEY="GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB" + local _KEY="GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB" $fetch https://apt.repos.intel.com/intel-gpg-keys/$_KEY > $_KEY sudo apt-key add $_KEY rm $_KEY @@ -397,23 +400,34 @@ install_intel_apt() # c/cpp compiler package names changed with 2024+ case $version in 2024*) - cpp_name=dpcpp-cpp + sudo apt-get install \ + intel-oneapi-compiler-{fortran,dpcpp-cpp}-$version ;; *) - cpp_name=dpcpp-cpp-and-cpp-classic + sudo apt-get install \ + intel-oneapi-compiler-{fortran,dpcpp-cpp-and-cpp-classic}-$version ;; esac - if $install_mkl; then - sudo apt-get install -y \ - intel-oneapi-compiler-{fortran,"$cpp_name"}-$version \ - intel-oneapi-mkl-$mkl_version - else - sudo apt-get install -y \ - intel-oneapi-compiler-{fortran,"$cpp_name"}-$version + sudo apt-get install intel-oneapi-mkl-$mkl_version fi source /opt/intel/oneapi/setvars.sh + + if $classic; then + export FC="ifort" + export CC="icc" + export CXX="icpc" + else + export FC="ifx" + export CC="icx" + export CXX="icpx" + fi + if $install_mkl; then + export MKLLIB="$ONEAPI_ROOT/mkl/latest/lib/intel64" + export MKLROOT="$ONEAPI_ROOT/mkl/latest" + fi + export_intel_vars }