Skip to content

Commit

Permalink
mkl link (#77)
Browse files Browse the repository at this point in the history
fix mkl link
  • Loading branch information
teseoch authored Jul 17, 2024
1 parent e95fdef commit fdd346e
Showing 1 changed file with 27 additions and 59 deletions.
86 changes: 27 additions & 59 deletions cmake/recipes/mkl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ set_property(CACHE MKL_LINKING PROPERTY STRINGS ${MKL_LINKINK_CHOICES})
message(STATUS "MKL linking strategy: ${MKL_LINKING}")

# MKL version
set(MKL_VERSION "2021.3.0" CACHE STRING "MKL version to use (2020.4 or 2021.3.0)")
set(MKL_VERSION_CHOICES 2020.4 2021.3.0)
set(MKL_VERSION "2022.2.1" CACHE STRING "MKL version to use (2022.2.1)")
set(MKL_VERSION_CHOICES 2022.2.1)
set_property(CACHE MKL_VERSION PROPERTY STRINGS ${MKL_VERSION_CHOICES})
message(STATUS "MKL version: ${MKL_VERSION}")

Expand Down Expand Up @@ -78,66 +78,34 @@ elseif(UNIX)
set(MKL_PLATFORM linux-64)
endif()

if(MKL_VERSION VERSION_EQUAL 2020.4)
# To compute the md5 checksums for each lib, use the following bash script (replace the target version number):
# for f in mkl mkl-include mkl-static mkl-devel; do for os in linux osx win; do cat <(printf "$f-$os-64-md5") <(conda search --override-channel --channel intel $f=2020.4 --platform $os-64 -i | grep md5 | cut -d : -f 2); done; done
set(mkl-linux-64-md5 f85891f97a04c7b2fbf619d1b903d7f5)
set(mkl-osx-64-md5 735d7f93c7fbcffe658f1ccf67418cb3)
set(mkl-win-64-md5 37ade09cace5cd73053b16574a3ee3c3)
set(mkl-include-linux-64-md5 8b2bf0e42bd95dd700d9877add1ca6de)
set(mkl-include-osx-64-md5 26043328553952cdb064c5aab8b50c78)
set(mkl-include-win-64-md5 87e9a73a6e6757a8ed0dbc87d50d7f60)
set(mkl-static-linux-64-md5 9f589a1508fb083c3e73427db459ca4c)
set(mkl-static-osx-64-md5 2f9e1b8b6d6b0903e81a573084e4494f)
set(mkl-static-win-64-md5 5ae780c06edd0be62966c6d8ab47d5fb)
set(mkl-devel-linux-64-md5 b571698ef237c0e61abe15b7d300f157)
set(mkl-devel-osx-64-md5 ee58da0463676d910eeab9aec0470f0e)
set(mkl-devel-win-64-md5 8a7736b81b9bc2d5c044b88d6ac8af6e)

# To compute file names, we use the following bash script:
# for f in mkl mkl-include mkl-static mkl-devel; do for os in linux osx win; do cat <(printf "$f-$os-64-file") <(conda search --override-channel --channel intel $f=2020.4 --platform $os-64 -i | grep file | cut -d : -f 2); done; done
set(mkl-linux-64-file mkl-2020.4-intel_304.tar.bz2)
set(mkl-osx-64-file mkl-2020.4-intel_301.tar.bz2)
set(mkl-win-64-file mkl-2020.4-intel_311.tar.bz2)
set(mkl-include-linux-64-file mkl-include-2020.4-intel_304.tar.bz2)
set(mkl-include-osx-64-file mkl-include-2020.4-intel_301.tar.bz2)
set(mkl-include-win-64-file mkl-include-2020.4-intel_311.tar.bz2)
set(mkl-static-linux-64-file mkl-static-2020.4-intel_304.tar.bz2)
set(mkl-static-osx-64-file mkl-static-2020.4-intel_301.tar.bz2)
set(mkl-static-win-64-file mkl-static-2020.4-intel_311.tar.bz2)
set(mkl-devel-linux-64-file mkl-devel-2020.4-intel_304.tar.bz2)
set(mkl-devel-osx-64-file mkl-devel-2020.4-intel_301.tar.bz2)
set(mkl-devel-win-64-file mkl-devel-2020.4-intel_311.tar.bz2)
elseif(MKL_VERSION VERSION_EQUAL 2021.3.0)
if(MKL_VERSION VERSION_EQUAL 2022.2.1)
# To compute the md5 checksums for each lib, use the following bash script (replace the target version number):
# for f in mkl mkl-include mkl-static mkl-devel; do for os in linux osx win; do cat <(printf "$f-$os-64-md5") <(conda search --override-channel --channel intel $f=2021.3.0 --platform $os-64 -i | grep md5 | cut -d : -f 2); done; done
set(mkl-linux-64-md5 2501643729c00b24fddb9530b339aea7)
set(mkl-osx-64-md5 d6129ae9dfba58671667a65c160d0776)
set(mkl-win-64-md5 264213ea4c5cb6b6d81ea97f59e757ab)
set(mkl-include-linux-64-md5 70b4f9a53401a3d11ce27d7ddb0e2511)
set(mkl-include-osx-64-md5 6da50c06992b78c4127a1881d39c1804)
set(mkl-include-win-64-md5 28d785eb22d28512d4e40e5890a817dc)
set(mkl-static-linux-64-md5 1469ad60a34269d4d0c5666bc131b82a)
set(mkl-static-osx-64-md5 4a099581ba95cc50bb538598b26389e4)
set(mkl-static-win-64-md5 69aef10428893314bc486e81397e1b25)
set(mkl-devel-linux-64-md5 2432ad963e3f7e4619ffc7f896178fbe)
set(mkl-devel-osx-64-md5 61b84a60715a3855a2097a3b619a00c8)
set(mkl-devel-win-64-md5 6128dee67d2b20ff534cf54757f623e0)
# set(mkl-linux-64-md5 2501643729c00b24fddb9530b339aea7)
# set(mkl-win-64-md5 264213ea4c5cb6b6d81ea97f59e757ab)

# set(mkl-include-linux-64-md5 70b4f9a53401a3d11ce27d7ddb0e2511)
# set(mkl-include-win-64-md5 28d785eb22d28512d4e40e5890a817dc)

# set(mkl-static-linux-64-md5 1469ad60a34269d4d0c5666bc131b82a)
# set(mkl-static-win-64-md5 69aef10428893314bc486e81397e1b25)

# set(mkl-devel-linux-64-md5 2432ad963e3f7e4619ffc7f896178fbe)
# set(mkl-devel-win-64-md5 6128dee67d2b20ff534cf54757f623e0)

# To compute file names, we use the following bash script:
# for f in mkl mkl-include mkl-static mkl-devel; do for os in linux osx win; do cat <(printf "$f-$os-64-file") <(conda search --override-channel --channel intel $f=2021.3.0 --platform $os-64 -i | grep file | cut -d : -f 2); done; done
set(mkl-linux-64-file mkl-2021.3.0-intel_520.tar.bz2)
set(mkl-osx-64-file mkl-2021.3.0-intel_517.tar.bz2)
set(mkl-win-64-file mkl-2021.3.0-intel_524.tar.bz2)
set(mkl-include-linux-64-file mkl-include-2021.3.0-intel_520.tar.bz2)
set(mkl-include-osx-64-file mkl-include-2021.3.0-intel_517.tar.bz2)
set(mkl-include-win-64-file mkl-include-2021.3.0-intel_524.tar.bz2)
set(mkl-static-linux-64-file mkl-static-2021.3.0-intel_520.tar.bz2)
set(mkl-static-osx-64-file mkl-static-2021.3.0-intel_517.tar.bz2)
set(mkl-static-win-64-file mkl-static-2021.3.0-intel_524.tar.bz2)
set(mkl-devel-linux-64-file mkl-devel-2021.3.0-intel_520.tar.bz2)
set(mkl-devel-osx-64-file mkl-devel-2021.3.0-intel_517.tar.bz2)
set(mkl-devel-win-64-file mkl-devel-2021.3.0-intel_524.tar.bz2)
set(mkl-linux-64-file mkl-2022.2.1-h6508926_16999.tar.bz2)
set(mkl-win-64-file mkl-2022.2.1-h4060db9_19760.tar.bz2)

set(mkl-include-linux-64-file mkl-include-2022.2.1-ha957f24_16999.tar.bz2)
set(mkl-include-win-64-file mkl-include-2022.2.1-h66d3029_19760.tar.bz2)

set(mkl-static-linux-64-file mkl-static-2022.2.1-h6508926_16999.tar.bz2)
set(mkl-static-win-64-file mkl-static-2022.2.1-h4060db9_19760.tar.bz2)

set(mkl-devel-linux-64-file mkl-devel-2022.2.1-ha957f24_16999.tar.bz2)
set(mkl-devel-win-64-file mkl-devel-2022.2.1-h66d3029_19760.tar.bz2)
endif()

# On Windows, `mkl-devel` contains the .lib files (needed at link time),
Expand All @@ -153,8 +121,8 @@ include(CPM)
foreach(name IN ITEMS ${MKL_REMOTES})
CPMAddPackage(
NAME ${name}
URL https://anaconda.org/intel/${name}/${MKL_VERSION}/download/${MKL_PLATFORM}/${${name}-${MKL_PLATFORM}-file}
URL_MD5 ${${name}-${MKL_PLATFORM}-md5}
URL https://anaconda.org/conda-forge/${name}/${MKL_VERSION}/download/${MKL_PLATFORM}/${${name}-${MKL_PLATFORM}-file}
# URL_MD5 ${${name}-${MKL_PLATFORM}-md5}
)
endforeach()

Expand Down

0 comments on commit fdd346e

Please sign in to comment.