Skip to content

Commit

Permalink
Merge branch 'fortran-lang-main'
Browse files Browse the repository at this point in the history
  • Loading branch information
iulusoy committed Mar 27, 2024
2 parents 20eb13d + 8b18bbe commit e775f91
Show file tree
Hide file tree
Showing 10 changed files with 176 additions and 96 deletions.
4 changes: 3 additions & 1 deletion .github/actions/test-cc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
[[ "${{ 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
if ([ "$RUNNER_OS" == "Windows" ] && [[ "${{ inputs.compiler }}" =~ "intel" ]]); 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
ccv=$(cat "$RUNNER_TEMP/${{ env.CC }}.ver" | head -n 1)
Expand All @@ -27,6 +27,8 @@ runs:
elif ([ "$RUNNER_OS" == "Linux" ] && [[ "${{ inputs.compiler }}" == "nvidia-hpc" ]]); then
# Get the compiler version and extract the version number
ccv=$(${{ env.CC }} --version 2>&1 | awk '/nvc/ {print $2}' | cut -d'-' -f1)
elif ([[ "${{ inputs.compiler }}" == "lfortran" ]]); then
exit 0 # uses preinstalled gcc, skip version check
elif ([[ "${{ inputs.compiler }}" != "nvidia-hpc" ]]); then
ccv=$(${{ env.CC }} --version | head -n 1)
ccv=$(echo "$ccv" | grep -woE '[0123456789.]+' | head -n 1)
Expand Down
4 changes: 3 additions & 1 deletion .github/actions/test-cxx/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
[[ "${{ 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
if ([ "$RUNNER_OS" == "Windows" ] && [[ "${{ matrix.toolchain.compiler }}" =~ "intel" ]]); 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
cxxv=$(cat "$RUNNER_TEMP/${{ env.CXX }}.ver" | head -n 1)
Expand All @@ -27,6 +27,8 @@ runs:
elif ([ "$RUNNER_OS" == "Linux" ] && [[ "${{ matrix.toolchain.compiler}}" == "nvidia-hpc" ]]); then
# Get the compiler version and extract the version number
cxxv=$(${{ env.CXX }} --version 2>&1 | awk '/nvc++/ {print $2}' | cut -d'-' -f1)
elif ([[ "${{ inputs.compiler }}" == "lfortran" ]]); then
exit 0 # uses preinstalled gcc, skip version check
elif ([[ "${{ matrix.toolchain.compiler}}" != "nvidia-hpc" ]]); then
cxxv=$(${{ env.CXX }} --version | head -n 1)
cxxv=$(echo "$cxxv" | grep -woE '[0123456789.]+' | head -n 1)
Expand Down
13 changes: 8 additions & 5 deletions .github/actions/test-fc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
[[ "${{ 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
if ([ "$RUNNER_OS" == "Windows" ] && [[ "${{ inputs.compiler }}" =~ "intel" ]]); 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
fcv=$(cat "$RUNNER_TEMP/${{ env.FC }}.ver" | head -n 1)
Expand All @@ -27,6 +27,8 @@ runs:
elif ([ "$RUNNER_OS" == "Linux" ] && [[ "${{ inputs.compiler }}" == "nvidia-hpc" ]]); then
# Get the compiler version and extract the version number
fcv=$(${{ env.FC }} --version 2>&1 | awk '/nvfortran/ {print $2}' | cut -d'-' -f1)
elif ([[ "${{ inputs.compiler }}" == "lfortran" ]]); then
fcv=$(${{ env.FC }} --version | head -n 1 | grep -woE '[0123456789.]+')
elif ([[ "${{ inputs.compiler }}" != "nvidia-hpc" ]]); then
fcv=$(${{ env.FC }} --version | head -n 1)
fcv=$(echo "$fcv" | grep -woE '[0123456789.]+' | head -n 1)
Expand All @@ -38,14 +40,15 @@ runs:
shell: bash
run: |
# hello world program
${{ env.FC }} $args -o hw hw.f90
${{ env.FC }} -o hw hw.f90
output=$(./hw '2>&1')
[[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected Fortran program 'hw' output: $output"; exit 1)
rm hw
- name: Test compile Fortran (pwsh)
working-directory: test
if: ${{ (success() || failure()) && runner.os == 'Windows' }}
# todo: debug lfortran discovery issues (same for powershell and cmd below)
if: ${{ (success() || failure()) && runner.os == 'Windows' && inputs.compiler != 'lfortran' }}
shell: pwsh
run: |
${{ env.FC }} -o hw.exe hw.f90
Expand Down Expand Up @@ -76,7 +79,7 @@ runs:
- name: Test compile Fortran (powershell)
working-directory: test
if: ${{ (success() || failure()) && runner.os == 'Windows' }}
if: ${{ (success() || failure()) && runner.os == 'Windows' && inputs.compiler != 'lfortran' }}
shell: powershell
run: |
${{ env.FC }} -o hw.exe hw.f90
Expand All @@ -91,7 +94,7 @@ runs:
- name: Test compile Fortran (cmd)
working-directory: test
if: ${{ (success() || failure()) && runner.os == 'Windows' }}
if: ${{ (success() || failure()) && runner.os == 'Windows' && inputs.compiler != 'lfortran' }}
shell: cmd
run: |
${{ env.FC }} -o hw.exe hw.f90
Expand Down
20 changes: 10 additions & 10 deletions .github/compat/compat.csv
Original file line number Diff line number Diff line change
@@ -1,10 +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,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.10,2021.2,2021.3,2021.4,2021.5,2021.6,2021.7.1,2021.7,2021.8,2021.9,2021.1,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,✓,✓,✓,✓,,✓,✓,✓,,,,,✓,,✓,✓,✓,,,,,,,,✓,,✓,✓,✓,✓,✓,,,,,,,,
compiler,gcc,gcc,gcc,gcc,gcc,gcc,gcc,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,7,8,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,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,✓,✓,✓,✓,,✓,✓,,,,,,✓,✓,,✓,✓,✓,✓,,,✓,,,,,✓,✓,,✓,✓,✓,✓,✓,,,,,,,,
85 changes: 54 additions & 31 deletions .github/compat/long_compat.csv
Original file line number Diff line number Diff line change
@@ -1,30 +1,8 @@
runner,compiler,version,support
macos-13,intel-classic,2021.5,✓runner,compiler,version,support
macos-11,gcc,10,✓
macos-11,gcc,11,✓
macos-11,gcc,12,✓
macos-11,gcc,13,✓
macos-11,gcc,6,
macos-11,gcc,7,✓
macos-11,gcc,8,✓
macos-11,gcc,9,✓
macos-11,intel-classic,2021.1.2,
macos-11,intel-classic,2021.1,✓
macos-11,intel-classic,2021.10,✓
macos-11,intel-classic,2021.2,✓
macos-11,intel-classic,2021.3,✓
macos-11,intel-classic,2021.4,✓
macos-11,intel-classic,2021.5,✓
macos-11,intel-classic,2021.6,✓
macos-11,intel-classic,2021.7.1,✓
macos-11,intel-classic,2021.7,✓
macos-11,intel-classic,2021.8,✓
macos-11,intel-classic,2021.9,✓
macos-12,gcc,10,✓
macos-12,gcc,11,✓
macos-12,gcc,12,✓
macos-12,gcc,13,✓
macos-12,gcc,6,
macos-12,gcc,7,✓
macos-12,gcc,8,✓
macos-12,gcc,9,✓
Expand All @@ -40,14 +18,15 @@ macos-12,intel-classic,2021.7.1,✓
macos-12,intel-classic,2021.7,✓
macos-12,intel-classic,2021.8,✓
macos-12,intel-classic,2021.9,✓
macos-12,lfortran,0.31.0,✓
macos-12,lfortran,0.32.0,✓
macos-12,lfortran,0.33.0,✓
macos-13,gcc,10,✓
macos-13,gcc,11,✓
macos-13,gcc,12,✓
macos-13,gcc,13,✓
macos-13,gcc,6,
macos-13,gcc,7,
macos-13,gcc,8,
macos-13,gcc,9,
macos-13,intel-classic,2021.1.2,
macos-13,intel-classic,2021.1,✓
macos-13,intel-classic,2021.10,✓
Expand All @@ -60,17 +39,35 @@ macos-13,intel-classic,2021.7.1,✓
macos-13,intel-classic,2021.7,✓
macos-13,intel-classic,2021.8,✓
macos-13,intel-classic,2021.9,✓
macos-13,lfortran,0.31.0,✓
macos-13,lfortran,0.32.0,✓
macos-13,lfortran,0.33.0,✓
macos-14,gcc,11,✓
macos-14,gcc,12,✓
macos-14,gcc,13,✓
macos-14,gcc,7,
macos-14,intel-classic,2021.1.2,
macos-14,intel-classic,2021.1,✓
macos-14,intel-classic,2021.10,✓
macos-14,intel-classic,2021.2,✓
macos-14,intel-classic,2021.3,✓
macos-14,intel-classic,2021.4,✓
macos-14,intel-classic,2021.5,✓
macos-14,intel-classic,2021.6,✓
macos-14,intel-classic,2021.7.1,✓
macos-14,intel-classic,2021.7,✓
macos-14,intel-classic,2021.8,✓
macos-14,intel-classic,2021.9,✓
macos-14,lfortran,0.31.0,✓
macos-14,lfortran,0.32.0,✓
macos-14,lfortran,0.33.0,✓
ubuntu-20.04,gcc,10,✓
ubuntu-20.04,gcc,11,✓
ubuntu-20.04,gcc,12,
ubuntu-20.04,gcc,13,✓
ubuntu-20.04,gcc,6,
ubuntu-20.04,gcc,7,✓
ubuntu-20.04,gcc,8,✓
ubuntu-20.04,gcc,9,✓
macos-14,gcc,11,✓
macos-14,gcc,12,✓
macos-14,gcc,13,✓
ubuntu-20.04,intel-classic,2021.1.2,✓
ubuntu-20.04,intel-classic,2021.1,✓
ubuntu-20.04,intel-classic,2021.10,✓
Expand All @@ -95,13 +92,26 @@ 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,lfortran,0.31.0,✓
ubuntu-20.04,lfortran,0.32.0,✓
ubuntu-20.04,lfortran,0.33.0,✓
ubuntu-20.04,nvidia-hpc,20.11,✓
ubuntu-20.04,nvidia-hpc,20.7,
ubuntu-20.04,nvidia-hpc,20.9,
ubuntu-20.04,nvidia-hpc,21.1,
ubuntu-20.04,nvidia-hpc,21.11,✓
ubuntu-20.04,nvidia-hpc,21.3,
ubuntu-20.04,nvidia-hpc,21.5,
ubuntu-20.04,nvidia-hpc,21.7,
ubuntu-20.04,nvidia-hpc,21.9,
ubuntu-20.04,nvidia-hpc,22.1,
ubuntu-20.04,nvidia-hpc,22.11,✓
ubuntu-20.04,nvidia-hpc,22.2,
ubuntu-20.04,nvidia-hpc,22.3,
ubuntu-20.04,nvidia-hpc,22.5,
ubuntu-20.04,nvidia-hpc,22.7,
ubuntu-20.04,nvidia-hpc,22.9,
ubuntu-20.04,nvidia-hpc,23.1,
ubuntu-20.04,nvidia-hpc,23.11,✓
ubuntu-20.04,nvidia-hpc,23.3,✓
ubuntu-20.04,nvidia-hpc,23.5,✓
Expand All @@ -111,7 +121,6 @@ ubuntu-22.04,gcc,10,✓
ubuntu-22.04,gcc,11,✓
ubuntu-22.04,gcc,12,✓
ubuntu-22.04,gcc,13,✓
ubuntu-22.04,gcc,6,
ubuntu-22.04,gcc,7,
ubuntu-22.04,gcc,8,
ubuntu-22.04,gcc,9,✓
Expand Down Expand Up @@ -139,13 +148,23 @@ 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,lfortran,0.31.0,✓
ubuntu-22.04,lfortran,0.32.0,✓
ubuntu-22.04,lfortran,0.33.0,✓
ubuntu-22.04,nvidia-hpc,20.11,✓
ubuntu-22.04,nvidia-hpc,20.7,
ubuntu-22.04,nvidia-hpc,20.9,
ubuntu-22.04,nvidia-hpc,21.1,
ubuntu-22.04,nvidia-hpc,21.11,✓
ubuntu-22.04,nvidia-hpc,21.7,
ubuntu-22.04,nvidia-hpc,22.1,
ubuntu-22.04,nvidia-hpc,22.11,✓
ubuntu-22.04,nvidia-hpc,22.2,
ubuntu-22.04,nvidia-hpc,22.3,
ubuntu-22.04,nvidia-hpc,22.5,
ubuntu-22.04,nvidia-hpc,22.7,
ubuntu-22.04,nvidia-hpc,22.9,
ubuntu-22.04,nvidia-hpc,23.1,
ubuntu-22.04,nvidia-hpc,23.11,✓
ubuntu-22.04,nvidia-hpc,23.3,✓
ubuntu-22.04,nvidia-hpc,23.5,✓
Expand All @@ -155,7 +174,6 @@ windows-2019,gcc,10,✓
windows-2019,gcc,11,✓
windows-2019,gcc,12,✓
windows-2019,gcc,13,✓
windows-2019,gcc,6,
windows-2019,gcc,7,
windows-2019,gcc,8,✓
windows-2019,gcc,9,✓
Expand Down Expand Up @@ -183,11 +201,13 @@ windows-2019,intel,2023.0,✓
windows-2019,intel,2023.1,✓
windows-2019,intel,2023.2,✓
windows-2019,intel,2024.0,✓
windows-2019,lfortran,0.31.0,✓
windows-2019,lfortran,0.32.0,✓
windows-2019,lfortran,0.33.0,✓
windows-2022,gcc,10,✓
windows-2022,gcc,11,✓
windows-2022,gcc,12,✓
windows-2022,gcc,13,✓
windows-2022,gcc,6,
windows-2022,gcc,7,
windows-2022,gcc,8,✓
windows-2022,gcc,9,✓
Expand Down Expand Up @@ -215,3 +235,6 @@ windows-2022,intel,2023.0,✓
windows-2022,intel,2023.1,✓
windows-2022,intel,2023.2,✓
windows-2022,intel,2024.0,✓
windows-2022,lfortran,0.31.0,✓
windows-2022,lfortran,0.32.0,✓
windows-2022,lfortran,0.33.0,✓
7 changes: 3 additions & 4 deletions .github/compat/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ toolchain:
- {compiler: intel-classic, version: '2021.2'}
- {compiler: intel-classic, version: '2021.1.2'}
- {compiler: intel-classic, version: '2021.1'}
- {compiler: lfortran, version: '0.31.0'}
- {compiler: lfortran, version: '0.32.0'}
- {compiler: lfortran, version: '0.33.0'}
- {compiler: nvidia-hpc, version: '23.11'}
- {compiler: nvidia-hpc, version: '23.9'}
- {compiler: nvidia-hpc, version: '23.7'}
Expand Down Expand Up @@ -69,17 +72,13 @@ exclude:
toolchain: {compiler: intel}
- os: macos-12
toolchain: {compiler: intel}
- os: macos-11
toolchain: {compiler: intel}
# nvidia-hpc not available for mac
- os: macos-14
toolchain: {compiler: nvidia-hpc}
- os: macos-13
toolchain: {compiler: nvidia-hpc}
- os: macos-12
toolchain: {compiler: nvidia-hpc}
- os: macos-11
toolchain: {compiler: nvidia-hpc}
# nvidia-hpc not available for windows
- os: windows-2022
toolchain: {compiler: nvidia-hpc}
Expand Down
2 changes: 1 addition & 1 deletion .github/compat/wide_compat_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
index="runner",
columns=["compiler", "version"],
values="support",
sort=False,
sort=True,
aggfunc="first",
).sort_values(by=["runner"])

Expand Down
Loading

0 comments on commit e775f91

Please sign in to comment.