Skip to content

Commit

Permalink
Check usage of marketplace action (#7)
Browse files Browse the repository at this point in the history
* correct passsing of include_mkl in example

* don't source intel set vars

* run setvars, set MKLLIB
  • Loading branch information
iulusoy authored Mar 11, 2024
1 parent d712ae0 commit 3b77edb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/actions/test-mkl/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ runs:
run: |
if [[ "${{ inputs.compiler }}" =~ "intel" ]] && [[ "${{ inputs.install_mkl }}" == "true" ]] && ([[ "${{ inputs.version }}" != "2021.5" ]] && [[ "$runner.os" != "macOS" ]]); then
if [ "$RUNNER_OS" == "macOS" ]; then
# required for macOS 11, intel-classic 2021.1-2021.10
# required for macOS 12, intel-classic 2021.1, 2021.4, 2021.6, 2021.10
# for all others, setting DYLD path through environment works correctly
export DYLD_LIBRARY_PATH="${{ env.MKLLIB }}:$DYLD_LIBRARY_PATH"
fi
linking="-L${{ env.MKLLIB }} -lmkl_intel_lp64 -lmkl_sequential -lmkl_core"
Expand Down
6 changes: 3 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
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +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: intel-classic, version: '2021.10'}
- {compiler: nvidia-hpc, version: '23.11'}
include:
- os: ubuntu-latest
Expand All @@ -49,11 +49,13 @@ jobs:
toolchain: {compiler: nvidia-hpc, version: '23.11'}

steps:
- uses: fortran-lang/setup-fortran@v1
- uses: ssciwr/setup-fortran@v0.1
id: setup-fortran
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}
install_mkl: "true"


- run: |
${{ env.FC }} ... # environment vars FC, CC, and CXX are set
Expand Down
5 changes: 4 additions & 1 deletion setup-fortran.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ LIBRARY_PATH=$LIBRARY_PATH
INFOPATH=$INFOPATH
MANPATH=$MANPATH
MKLLIB=$MKLLIB
MKLROOT=$MKLROOT
DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
ONEAPI_ROOT=$ONEAPI_ROOT
CLASSPATH=$CLASSPATH
Expand Down Expand Up @@ -402,6 +403,7 @@ install_intel_apt()
fi
if $install_mkl; then
export MKLLIB="$ONEAPI_ROOT/mkl/latest/lib/intel64"
export MKLROOT="$ONEAPI_ROOT/mkl/latest"
fi
export_intel_vars
}
Expand Down Expand Up @@ -510,6 +512,7 @@ install_intel_dmg()

if $install_mkl; then
export MKLLIB="$ONEAPI_ROOT/mkl/latest/lib"
export MKLROOT="$ONEAPI_ROOT/mkl/latest"
export DYLD_LIBRARY_PATH="$MKLLIB":$DYLD_LIBRARY_PATH
fi

Expand Down Expand Up @@ -684,4 +687,4 @@ install_nvidiahpc()
exit 1
;;
esac
}
}

0 comments on commit 3b77edb

Please sign in to comment.