diff options
author | Jakub Benda <jakub.benda@seznam.cz> | 2018-10-03 21:40:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-10-08 17:21:08 (GMT) |
commit | d0fb3e6c522e656b121911d791defb46ddecbc3b (patch) | |
tree | e906c16be7d2d36e217c8098293d2ef2f8a79cb8 /Modules/FindLAPACK.cmake | |
parent | fd02538974dd952a8639d371c2c0067d30d5469a (diff) | |
download | CMake-d0fb3e6c522e656b121911d791defb46ddecbc3b.zip CMake-d0fb3e6c522e656b121911d791defb46ddecbc3b.tar.gz CMake-d0fb3e6c522e656b121911d791defb46ddecbc3b.tar.bz2 |
Find{BLAS,LAPACK}: Find also ILP64 MKL BLAS and LAPACK
Modern Intel MKL packages offer 64-bit BLAS and LAPACK libraries in any
of the eight combinations of the following three binary options:
- sequential or threaded
- LP64 or ILP64
- static or shared
The modules FindBLAS and FindLAPACK did not allow full selection of
arbitrary combination; in particular, only LP64 variant was used.
The original list of possible BLA_VENDOR values related to MKL,
Intel10_64lp
Intel10_64lp_seq
is thus extended by another pair of "vendors",
Intel10_64ilp
Intel10_64ilp_seq
Depending on the selection, either "_lp64", or "_ilp64" MKL libraries
are searched for. Some comments in the two CMake modules were modified
to indicate that even though the "vendors" contain the number "10",
they also apply to all further versions of MKL.
Diffstat (limited to 'Modules/FindLAPACK.cmake')
-rw-r--r-- | Modules/FindLAPACK.cmake | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index a3c87f8..7ca9950 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -278,6 +278,12 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") find_package(Threads REQUIRED) endif() + if (BLA_VENDOR MATCHES "_64ilp") + set(BLAS_mkl_ILP_MODE "ilp64") + else () + set(BLAS_mkl_ILP_MODE "lp64") + endif () + set(LAPACK_SEARCH_LIBS "") if (BLA_F95) @@ -292,7 +298,7 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") list(APPEND LAPACK_SEARCH_LIBS "mkl_intel_c") list(APPEND LAPACK_SEARCH_LIBS - "mkl_intel_lp64") + "mkl_intel_${BLAS_mkl_ILP_MODE}") else() set(LAPACK_mkl_SEARCH_SYMBOL "cheev") set(_LIBRARIES LAPACK_LIBRARIES) @@ -303,7 +309,7 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") "mkl_lapack") # new >= 10.3 list(APPEND LAPACK_SEARCH_LIBS - "mkl_gf_lp64") + "mkl_gf_${BLAS_mkl_ILP_MODE}") endif() # First try empty lapack libs @@ -332,6 +338,8 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") ) endif () endforeach () + + unset(BLAS_mkl_ILP_MODE) endif () endif() else() |