Superconducting Toolkit
修订版 | 47b35f06bcc39fe4c53d630b92f45e659a516213 (tree) |
---|---|
时间 | 2020-11-03 20:29:26 |
作者 | Daniele Cesarini <d.cesarini@cine...> |
Commiter | Daniele Cesarini |
Fixed bug to pick up serial/threaded MKL/ARMPL precisely
@@ -197,7 +197,32 @@ add_library(QE::LAPACK ALIAS qe_lapack) | ||
197 | 197 | qe_install_targets(qe_lapack) |
198 | 198 | ####################################################################### |
199 | 199 | if(NOT QE_LAPACK_INTERNAL) |
200 | - find_package(LAPACK) | |
200 | + if(NOT BLA_VENDOR) | |
201 | + if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(^i.86$)") | |
202 | + message(STATUS "Trying to find LAPACK from Intel MKL") | |
203 | + if(QE_ENABLE_OPENMP) | |
204 | + SET(BLA_VENDOR Intel10_64lp) | |
205 | + else() | |
206 | + SET(BLA_VENDOR Intel10_64lp_seq) | |
207 | + endif() | |
208 | + find_package(LAPACK) | |
209 | + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") | |
210 | + message(STATUS "Trying to find LAPACK from ARM Performance Library") | |
211 | + if(QE_ENABLE_OPENMP) | |
212 | + SET(BLA_VENDOR Arm_mp) | |
213 | + else() | |
214 | + SET(BLA_VENDOR Arm) | |
215 | + endif() | |
216 | + find_package(LAPACK) | |
217 | + endif() | |
218 | + if(NOT LAPACK_FOUND) | |
219 | + message(STATUS "Trying to find alternative LAPACK libraries") | |
220 | + SET(BLA_VENDOR All) | |
221 | + find_package(LAPACK) | |
222 | + endif() | |
223 | + else() | |
224 | + find_package(LAPACK) | |
225 | + endif() | |
201 | 226 | if(LAPACK_FOUND) |
202 | 227 | list(APPEND _lapack_libs |
203 | 228 | ${BLAS_LIBRARIES} |