From 29e6cac4607576bdb97390257c4e1c43d680da2a Mon Sep 17 00:00:00 2001 From: Inga Ulusoy Date: Fri, 8 Mar 2024 09:28:25 +0100 Subject: [PATCH 1/3] correct passsing of include_mkl in example --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 685a432..6153578 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 From d21a421372702fa40456a3d6dacaadee981da96b Mon Sep 17 00:00:00 2001 From: Inga Ulusoy Date: Fri, 8 Mar 2024 13:56:42 +0100 Subject: [PATCH 2/3] don't source intel set vars --- setup-fortran.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup-fortran.sh b/setup-fortran.sh index dbf5fc9..433e1bc 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -389,7 +389,7 @@ install_intel_apt() intel-oneapi-compiler-{fortran,dpcpp-cpp-and-cpp-classic}-$version fi - source /opt/intel/oneapi/setvars.sh + # source /opt/intel/oneapi/setvars.sh if $classic; then export FC="ifort" @@ -502,7 +502,7 @@ install_intel_dmg() hdiutil detach /Volumes/"$(basename "$MACOS_HPCKIT_URL" .dmg)" -quiet rm m_HPCKit.dmg - source /opt/intel/oneapi/setvars.sh + # source /opt/intel/oneapi/setvars.sh export FC="ifort" export CC="icc" @@ -684,4 +684,4 @@ install_nvidiahpc() exit 1 ;; esac -} \ No newline at end of file +} From 5ef44c19ec09af6a164ec049139757aa01570178 Mon Sep 17 00:00:00 2001 From: Inga Ulusoy Date: Fri, 8 Mar 2024 15:02:25 +0100 Subject: [PATCH 3/3] run setvars, set MKLLIB --- .github/actions/test-mkl/action.yml | 3 +++ .github/workflows/test.yml | 6 +++--- setup-fortran.sh | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/actions/test-mkl/action.yml b/.github/actions/test-mkl/action.yml index 6016979..7b25e50 100644 --- a/.github/actions/test-mkl/action.yml +++ b/.github/actions/test-mkl/action.yml @@ -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" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 778457f..e7e1e21 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/setup-fortran.sh b/setup-fortran.sh index 433e1bc..4e290c1 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -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 @@ -389,7 +390,7 @@ install_intel_apt() intel-oneapi-compiler-{fortran,dpcpp-cpp-and-cpp-classic}-$version fi - # source /opt/intel/oneapi/setvars.sh + source /opt/intel/oneapi/setvars.sh if $classic; then export FC="ifort" @@ -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 } @@ -502,7 +504,7 @@ install_intel_dmg() hdiutil detach /Volumes/"$(basename "$MACOS_HPCKIT_URL" .dmg)" -quiet rm m_HPCKit.dmg - # source /opt/intel/oneapi/setvars.sh + source /opt/intel/oneapi/setvars.sh export FC="ifort" export CC="icc" @@ -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