Skip to content

Commit

Permalink
Add mkl on win
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed Oct 14, 2023
1 parent 9793da1 commit 7a0bec7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/master-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,12 @@ jobs:
overwrite: true
windows-master:
runs-on: windows-2022
timeout-minutes: 100
timeout-minutes: 120
strategy:
matrix:
vtk: [ ON, OFF ]
avx: [ ON, OFF ]
vtk: [ ON, OFF ]
mkl: [ ON, OFF ]
steps:
- name: Clone
uses: actions/checkout@v4
Expand All @@ -157,17 +158,34 @@ jobs:
run: |
C:/msys64/usr/bin/wget.exe -q https://github.com/TLCFEM/prebuilds/releases/download/latest/VTK-9.2.6-win.7z
7z x VTK-9.2.6-win.7z
- name: MKL
if: matrix.mkl == 'ON'
shell: cmd
run: |
C:/msys64/usr/bin/wget.exe -q https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2b9cdf66-5291-418e-a7e8-f90515cc9098/w_onemkl_p_2023.2.0.49500_offline.exe
C:/msys64/usr/bin/wget.exe -q https://registrationcenter-download.intel.com/akdlm/IRC_NAS/1720594b-b12c-4aca-b7fb-a7d317bac5cb/w_fortran-compiler_p_2023.2.1.7_offline.exe
start /b /wait w_onemkl_p_2023.2.0.49500_offline.exe -s -x -f extracted --log extract.log
extracted\bootstrapper.exe -s --action install --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=1 --log-dir=.
rd /s/q "extracted"
start /b /wait w_fortran-compiler_p_2023.2.1.7_offline.exe -s -x -f extracted --log extract.log
extracted\bootstrapper.exe -s --action install --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=1 --log-dir=.
rd /s/q "extracted"
- name: Compile
run: |
go build Checker/updater.go
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_AVX=${{ matrix.avx }} -DBUILD_MULTITHREAD=ON -DUSE_EXTERNAL_VTK=${{ matrix.vtk }} -DVTK_DIR=D:/a/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_AVX=${{ matrix.avx }} -DBUILD_MULTITHREAD=ON -DUSE_EXTERNAL_VTK=${{ matrix.vtk }} -DVTK_DIR=D:/a/suanPan/suanPan/lib/cmake/vtk-9.2/ -DUSE_MKL=${{ matrix.mkl }} -DMKLROOT="C:/Program Files (x86)/Intel/oneAPI/mkl/latest" -DLINK_DYNAMIC_MKL=OFF -DCMAKE_INSTALL_PREFIX=dist ..
cmake --build . --target install --config Release -j 4
- name: Pack
shell: bash
run: |
cp updater.exe build/dist/bin
file_name="suanPan-win-openblas"
file_name="suanPan-win"
if [ "${{ matrix.mkl }}" == "ON" ]; then
file_name+="-mkl"
else
file_name+="-openblas"
fi
if [ "${{ matrix.vtk }}" == "ON" ]; then
file_name+="-vtk"
fi
Expand Down
2 changes: 1 addition & 1 deletion Option.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ if (USE_MKL)
if (COMPILER_IDENTIFIER MATCHES "IntelLLVM")
set(USE_INTEL_OPENMP ON CACHE BOOL "" FORCE)
endif ()
if (USE_INTEL_OPENMP)
if (USE_INTEL_OPENMP OR COMPILER_IDENTIFIER MATCHES "vs")
if (MKLROOT MATCHES "(oneapi|oneAPI)")
if (COMPILER_IDENTIFIER MATCHES "linux")
find_library(IOMPPATH iomp5 ${MKLROOT}/../../compiler/latest/linux/compiler/lib/intel64_lin)
Expand Down

0 comments on commit 7a0bec7

Please sign in to comment.