FindBLAS: Broken MKL libraries search
The merge request !3108 (merged) seems to have broken search for MKL libraries by FindBLAS.
After loading the environment (
LD_LIBRARY_PATH, ...) of a standard Linux installation of Intel Parallel Studio (includes MKL) and using the following CMakeLists:
cmake_minimum_required(VERSION 3.0) project(TestBLAS) find_package(BLAS)
the resulting library list is now
/opt/intel/compilers_and_libraries_2019.4.227/linux/mkl/lib/intel64_lin/libmkl_intel_lp64.so /opt/intel/compilers_and_libraries_2019.4.227/linux/mkl/lib/ia32_lin/libmkl_intel_thread.so /opt/intel/compilers_and_libraries_2019.4.227/linux/mkl/lib/ia32_lin/libmkl_core.so /opt/intel/compilers_and_libraries_2019.4.227/linux/compiler/lib/intel64_lin/libiomp5.so -lpthread -lm -ldl
i.e. it contains a mix of 32-bit and 64-bit libraries. Requesting explicitly
BLA_VENDOR=Intel10_64ilp does not help.
The code that was added in the above-mentioned branch includes this section:
if( SIZEOF_INTEGER EQUAL 8 ) set( _BLAS_MKL_PATH_PREFIX "intel64" ) else() set( _BLAS_MKL_PATH_PREFIX "ia32" ) endif()
SIZEOF_INTEGERis not defined by FindBLAS and there is no reason to assume that any other module used in the project does define this variable.
- Even if it was defined, the condition is simply wrong, because the two directories "ia32" and "intel64" correspond to 32-bit and 64-bit architecture, i.e. pointer size, not integer size.