Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix failing macos tests #6

Merged
merged 84 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
3dcb945
info-on-mac
iulusoy Feb 22, 2024
b677d89
set mkl version explicitly
iulusoy Feb 22, 2024
2d3e230
more debug on mac
iulusoy Feb 22, 2024
c996703
fix variable typo for linux mkl version
iulusoy Feb 22, 2024
4cdea3e
only test on ubuntu
iulusoy Feb 22, 2024
b2afe28
matrix
iulusoy Feb 22, 2024
4b7c472
matrix
iulusoy Feb 22, 2024
ea9a7a7
fix version selection
iulusoy Feb 22, 2024
b75c611
check both classic and new
iulusoy Feb 22, 2024
787b6b1
verify dmg
iulusoy Feb 22, 2024
77fa734
check hpckit
iulusoy Feb 22, 2024
d3b4e5d
check hpckit
iulusoy Feb 22, 2024
a9359b5
restrict basekit versions
iulusoy Feb 23, 2024
6d8cd7a
pass install_mkl and test mkl
iulusoy Feb 23, 2024
70da94b
set input in main action
iulusoy Feb 23, 2024
5e232c5
set input in main action
iulusoy Feb 23, 2024
485d7ac
set input in script
iulusoy Feb 23, 2024
f187ec0
fix typo
iulusoy Feb 23, 2024
b4e960a
change linker options
iulusoy Feb 23, 2024
bec77de
source env
iulusoy Feb 23, 2024
7f0cd4a
export DYLD path for Mac
iulusoy Feb 23, 2024
8e8a297
include explicit library path in linker
iulusoy Feb 23, 2024
0112467
export mklroot in script
iulusoy Feb 23, 2024
735fa50
export mklroot to GH env
iulusoy Mar 4, 2024
eb56ff5
export mklroot to GH env
iulusoy Mar 4, 2024
02353bc
export mklroot in script
iulusoy Mar 4, 2024
57c21d0
correct typo
iulusoy Mar 4, 2024
5ecc433
another typo
iulusoy Mar 4, 2024
b2bf31b
debug env vars
iulusoy Mar 4, 2024
138ea0e
debug env vars
iulusoy Mar 4, 2024
d33dd3e
debug env vars
iulusoy Mar 4, 2024
cbd5a58
debug env vars
iulusoy Mar 4, 2024
9e25500
debug env vars
iulusoy Mar 4, 2024
7ed1f3f
debug env vars
iulusoy Mar 4, 2024
21feae2
debug env vars
iulusoy Mar 4, 2024
ffb0fd1
debug env vars
iulusoy Mar 4, 2024
a68fe2b
typo and relative reference mklroot
iulusoy Mar 4, 2024
cb810fc
debug mklroot path
iulusoy Mar 4, 2024
0f557ed
debug mklroot path
iulusoy Mar 4, 2024
40c4431
typo
iulusoy Mar 4, 2024
4da25c7
find include dir
iulusoy Mar 4, 2024
f190175
find include dir
iulusoy Mar 4, 2024
b5facc7
debug mac os dyld path
iulusoy Mar 4, 2024
13a511f
check all ubuntu
iulusoy Mar 4, 2024
47ebe77
no mkl for gcc and nvidia-hpc
iulusoy Mar 4, 2024
f7314fb
mkl lates
iulusoy Mar 4, 2024
7bd5ab4
check compiler vars
iulusoy Mar 4, 2024
5451690
mkl dir for macos
iulusoy Mar 4, 2024
f5c6a21
debug
iulusoy Mar 4, 2024
05cd116
debug
iulusoy Mar 4, 2024
5829dcc
adapt test structure
iulusoy Mar 5, 2024
dfb0fcd
remove double testing
iulusoy Mar 5, 2024
3c5cc85
conditional in bash
iulusoy Mar 5, 2024
d7671d3
conditional in bash
iulusoy Mar 5, 2024
d94fb8b
conditional in bash
iulusoy Mar 5, 2024
bdf7b09
conditional in bash
iulusoy Mar 5, 2024
423f4ee
typo
iulusoy Mar 5, 2024
83f6003
pass missing variable
iulusoy Mar 5, 2024
5ce1c28
test them all
iulusoy Mar 5, 2024
4885722
test them all
iulusoy Mar 5, 2024
ac0480f
check macos mkl path
iulusoy Mar 5, 2024
b1abcb3
set full library path in script
iulusoy Mar 5, 2024
b19267e
export DYLD in env
iulusoy Mar 5, 2024
aa0afbc
test them all
iulusoy Mar 5, 2024
4e8f45c
exclude mkl tests on windows
iulusoy Mar 5, 2024
b1e6350
exclude mkl tests on windows
iulusoy Mar 5, 2024
6741cb2
check for dyld
iulusoy Mar 5, 2024
6332452
rename mkllib in gh env
iulusoy Mar 5, 2024
11f0147
shuffle version mapping for mac
iulusoy Mar 5, 2024
5bc651f
export DYLD in script
iulusoy Mar 5, 2024
cbef671
shuffle mkl version numbers
iulusoy Mar 6, 2024
614251e
find installed mkl version
iulusoy Mar 6, 2024
3f1e27d
try without mkl
iulusoy Mar 6, 2024
b527060
try without mkl
iulusoy Mar 6, 2024
a32e153
find installed mkl version
iulusoy Mar 6, 2024
d3b0937
find installed mkl version
iulusoy Mar 6, 2024
be2ccc1
shuffle mkl vs ifort version
iulusoy Mar 6, 2024
8f95c66
find mkl for 2021.5
iulusoy Mar 6, 2024
b414151
skip mkl for 2021.5 macos and remove double export of dyld
iulusoy Mar 6, 2024
b41f19b
less chatty, .5 exception
iulusoy Mar 6, 2024
309641e
last changes?
iulusoy Mar 6, 2024
934c95a
test 2021.5 only
iulusoy Mar 6, 2024
de0700f
test them all
iulusoy Mar 6, 2024
cffc803
export dyld in action
iulusoy Mar 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/actions/test-fc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,22 @@ runs:
}
rm hw.exe

- name: Test compile Fortran (pwsh)
working-directory: test
if: ${{ (success() || failure()) && runner.os == 'Windows' }}
shell: pwsh
run: |
${{ env.FC }} -o hw.exe hw.f90
$output=$(& ".\hw.exe")
if ($output -match "hello world") {
write-output $output
} else {
write-output "unexpected output: $output"
exit 1
}
rm hw.exe


- name: Test compile Fortran (powershell)
working-directory: test
if: ${{ (success() || failure()) && runner.os == 'Windows' }}
Expand Down
31 changes: 31 additions & 0 deletions .github/actions/test-mkl/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test mkl
description: Test installation of mkl libraries
inputs:
compiler:
description: "Toolchain or compiler to install"
required: true
version:
description: "Version of toolchain or compiler"
required: true
install_mkl:
description: "If MKL should be installed along with the compiler"
required: false
default: "false"
runs:
using: "composite"
steps:
- name: Test compile and link mkl (bash)
working-directory: test
shell: bash
run: |
if [[ "${{ inputs.compiler }}" =~ "intel" ]] && [[ "${{ inputs.install_mkl }}" == "true" ]] && ([[ "${{ inputs.version }}" != "2021.5" ]] && [[ "$runner.os" != "macOS" ]]); then
if [ "$RUNNER_OS" == "macOS" ]; then
export DYLD_LIBRARY_PATH="${{ env.MKLLIB }}:$DYLD_LIBRARY_PATH"
fi
linking="-L${{ env.MKLLIB }} -lmkl_intel_lp64 -lmkl_sequential -lmkl_core"
# hello world with blas call program
${{ env.FC }} $args $linking -o hw_mkl hw_mkl.f90
output=$(./hw_mkl '2>&1')
[[ "$output" == *"hello world 9.00000000000000"* ]] && echo "$output" || (echo "Unexpected Fortran program 'hw_mkl' output: $output"; exit 1)
rm hw_mkl
fi
1 change: 1 addition & 0 deletions .github/compat/long_compat.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
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,✓
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Test
# Push and pull request run in assert mode.
# Schedule and dispatch run in report mode.
on:
push:
paths-ignore:
- '**.md'
# push:
# paths-ignore:
# - '**.md'
pull_request:
branches:
- main
Expand Down Expand Up @@ -71,6 +71,7 @@ jobs:
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}
install_mkl: true

- name: Test Fortran compiler
if: steps.setup-fortran.outcome == 'success'
Expand All @@ -79,6 +80,14 @@ jobs:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}

- name: Test MKL libraries
if: steps.setup-fortran.outcome == 'success' && runner.os != 'windows'
uses: ./.github/actions/test-mkl
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}
install_mkl: true

- name: Test C compiler
continue-on-error: true
if: needs.options.outputs.mode == 'report' && steps.setup-fortran.outcome == 'success'
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- {compiler: gcc, version: 13}
- {compiler: intel, version: '2023.2'}
- {compiler: intel-classic, version: '2021.10'}
- {compiler: intel-classic, version: '2021.10', install_mkl: 'true'}
- {compiler: nvidia-hpc, version: '23.11'}
include:
- os: ubuntu-latest
Expand Down Expand Up @@ -68,6 +69,7 @@ jobs:
- *intel-classic* (for `ifort`)
- *nvidia-hpc* (for `nvfortran`)
- *version*: Version of the compiler toolchain. See [runner compatibility](#runner-compatibility) charts below.
- *install_mkl*: If MKL libraries should be installed alongsider the intel compiler. Defaults to `false`.


## Outputs
Expand Down Expand Up @@ -112,6 +114,8 @@ Toolchain support varies across GitHub-hosted runner images.

**Note:** Intel's `ifx` compiler is not supported on macOS, so the `intel` option redirects to `intel-classic` (`ifort`).

**Note:** MKL libraries can only be installed for the Intel Fortran compiler, and only on linux and MacOS operating systems; with the exception of intel-classic 2021.5, for which no compatible library is available.

## License

Licensed under the Apache License, Version 2.0 (the “License”);
Expand Down
10 changes: 8 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ inputs:
version:
description: "Version of toolchain or compiler"
required: false
install_mkl:
description: "If MKL should be installed along with the compiler"
required: false
default: "false"
outputs:
fc:
description: "Path to Fortran compiler"
Expand Down Expand Up @@ -50,6 +54,7 @@ runs:
env:
COMPILER: ${{ inputs.compiler }}
VERSION: ${{ inputs.version }}
INSTALL_MKL: ${{ inputs.install_mkl }}
run: |
action_path=$(echo '/${{ github.action_path }}' | sed -e 's/\\/\//g' -e 's/://')
source "$action_path/setup-fortran.sh"
Expand All @@ -64,11 +69,11 @@ runs:
;;
intel-classic)
version=${VERSION:-2023.2.0}
install_intel $platform true
install_intel $platform true ${{ inputs.install_mkl }}
;;
intel)
version=${VERSION:-2023.2.0}
install_intel $platform false
install_intel $platform false ${{ inputs.install_mkl }}
;;
nvidia-hpc)
version=${VERSION:-23.11}
Expand Down Expand Up @@ -133,6 +138,7 @@ runs:
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
Expand Down
Loading
Loading